Skip to content

feat(HighlightedText): support multiple highlight words - #61

Merged
Zayooo00 merged 1 commit into
mainfrom
feat/highlighted-text-multi-word
Jun 24, 2026
Merged

feat(HighlightedText): support multiple highlight words#61
Zayooo00 merged 1 commit into
mainfrom
feat/highlighted-text-multi-word

Conversation

@Zayooo00

Copy link
Copy Markdown
Contributor

What

HighlightedText now accepts string | string[] for the highlight prop, so multiple words can be highlighted in one pass (e.g. ["APE", "GME"]).

Why

react-highlight-words doesn't split on spaces and autoEscape treats each search word as a literal, so a single string can only ever match one phrase. Passing an array is the only way to highlight several distinct words.

Changes

  • highlight: string | string[] — normalized internally to an array
  • Register description documents passing an array via a dynamic value

Compatibility

Backward compatible — existing single-string callers are unchanged.

Usage

<HighlightedText
  text="APE overview for the GME department"
  highlight={["APE", "GME"]}
/>

Accept `string | string[]` for the `highlight` prop so multiple words can
be highlighted at once (e.g. ["APE", "GME"]). Single-string usage is
unchanged. Register description documents the array-via-dynamic-value path.
@Zayooo00 Zayooo00 self-assigned this Jun 24, 2026
@Zayooo00
Zayooo00 requested a review from dosmiko7 June 24, 2026 07:11
@Zayooo00
Zayooo00 merged commit d5c479d into main Jun 24, 2026
2 checks passed
@Zayooo00
Zayooo00 deleted the feat/highlighted-text-multi-word branch June 24, 2026 07:12
Zayooo00 added a commit to myevaluations/myevals-plasmic-utils that referenced this pull request Jun 24, 2026
…Icon — MET-2954) (#3)

* feat(Combobox): add disabled property to options (MET-2795) (fullstackhouse#59)

* feat(Combobox): add disabled property to options (MET-2795)

* feat(Combobox): add disabled option styling

* feat(Combobox): add per-option optionLeftIcon slot with `$ctx.option data` (MET-2954) (fullstackhouse#60)

Adds an `optionLeftIcon` render slot to RawCombobox, rendered once per
option. Each option is wrapped in a MemoDataProvider exposing the current
option as `$ctx.option`, so the slot content can adapt per option (e.g.
render a status icon based on the option's data).

- new props: optionLeftIcon (slot), optionLeftIconClassName,
  optionContentClassName
- providesData: true so Studio surfaces $ctx.option in the data picker
- label/description wrapped in optionContentClassName for icon-left layout

* feat(HighlightedText): support multiple highlight words (MET-2954) (fullstackhouse#61)

Accept `string | string[]` for the `highlight` prop so multiple words can
be highlighted at once (e.g. ["APE", "GME"]). Single-string usage is
unchanged. Register description documents the array-via-dynamic-value path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants