Skip to content

Simplify component search result cards#2459

Open
Mbeaulne wants to merge 1 commit into
06-23-add_context-aware_component_search_suggestionsfrom
06-23-simplify_component_search_result_cards
Open

Simplify component search result cards#2459
Mbeaulne wants to merge 1 commit into
06-23-add_context-aware_component_search_suggestionsfrom
06-23-simplify_component_search_result_cards

Conversation

@Mbeaulne

@Mbeaulne Mbeaulne commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Description

Refreshes the component search result UI in both the Flow sidebar and the Dashboard components view for a cleaner, more compact presentation.

Flow sidebar (ComponentItem):

  • Replaces the File/FileBadge icon with Package and updates icon colors: violet for subgraphs, orange for owned components, blue for others.
  • Removes the published_by author line and the digest fallback line from each row.
  • Strips the leading "Matched " prefix and trailing period from match explanations via a new formatComponentItemMatchSummary helper.
  • Tightens hover/active background tokens and adjusts padding.
  • Action buttons now fade in on hover via a group-hover opacity transition.

Dashboard components view (DashboardComponentsV2View):

  • Adds an isDetailOpen prop to ComponentCard that switches the card into a compact single-column row when the detail pane is open, and expands to a responsive multi-column grid otherwise.
  • Strips trailing Annotations: … noise from component descriptions via cleanComponentCardDescription.
  • Replaces the "matched: field" badge list with a single inline "Why: …" summary line using the new formatComponentCardMatchSummary helper (same prefix/suffix trimming as the sidebar).
  • Hides published_by, lifecycle badges, and relevance score badges in compact mode.
  • Widens the detail-open sidebar column from 360 px to 420 px.
  • Converts the "Generate AI description" button to a smaller outline style with a Sparkles icon and an "Optional" label.
  • Wraps browse and search result lists in a CSS grid for the responsive two-column layout.

Internals:

  • COMPONENT_SEARCH_MATCH_FIELD_LABEL is now module-private (no longer exported).
  • Adds a test asserting that search result cards in compact mode do not render the full input/output detail pane content.

Related Issue and Pull requests

Type of Change

  • Bug fix
  • New feature
  • Improvement
  • Cleanup/Refactor
  • Breaking change
  • Documentation update

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

Test Instructions

  1. Open the Flow sidebar and search for a component — confirm the row shows the "Why: …" explanation without "Matched " prefix, no author line, and no digest fallback.
  2. Open the Dashboard components view and search — confirm results render in a two-column grid when the detail pane is closed and a single column when it is open.
  3. Select a result with the detail pane open and confirm the card switches to compact mode (no description, no badges, smaller padding).
  4. Verify the "Generate AI description" button renders as a small outline button with a Sparkles icon.

Additional Comments

The COMPONENT_SEARCH_MATCH_FIELD_LABEL export removal is a non-breaking internal change; the constant is only consumed within componentSearchExplanations.ts.

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: 06-23-simplify_component_search_result_cards/ce6e6ab

Copy link
Copy Markdown
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Mbeaulne Mbeaulne force-pushed the 06-23-simplify_component_search_result_cards branch from c84f2d9 to 3f017a2 Compare June 23, 2026 19:56
@Mbeaulne Mbeaulne force-pushed the 06-23-add_context-aware_component_search_suggestions branch from aca3713 to 514ce6a Compare June 24, 2026 18:11
@Mbeaulne Mbeaulne force-pushed the 06-23-simplify_component_search_result_cards branch from 3f017a2 to 36abcff Compare June 24, 2026 18:11
@Mbeaulne Mbeaulne force-pushed the 06-23-add_context-aware_component_search_suggestions branch from 514ce6a to d7eb41c Compare June 24, 2026 18:24
@Mbeaulne Mbeaulne force-pushed the 06-23-simplify_component_search_result_cards branch from 36abcff to 2abbc71 Compare June 24, 2026 18:24
@Mbeaulne Mbeaulne force-pushed the 06-23-add_context-aware_component_search_suggestions branch from d7eb41c to cbff091 Compare June 24, 2026 18:36
@Mbeaulne Mbeaulne force-pushed the 06-23-simplify_component_search_result_cards branch 2 times, most recently from 03a9087 to edaa1fe Compare June 24, 2026 18:52
@Mbeaulne Mbeaulne force-pushed the 06-23-add_context-aware_component_search_suggestions branch from cbff091 to a5c0c78 Compare June 24, 2026 18:52
@Mbeaulne Mbeaulne marked this pull request as ready for review June 24, 2026 18:56
@Mbeaulne Mbeaulne requested a review from a team as a code owner June 24, 2026 18:56
@Mbeaulne Mbeaulne force-pushed the 06-23-add_context-aware_component_search_suggestions branch from a5c0c78 to 67d60c5 Compare June 24, 2026 19:52
@Mbeaulne Mbeaulne force-pushed the 06-23-simplify_component_search_result_cards branch from edaa1fe to 02eada8 Compare June 24, 2026 19:52
@Mbeaulne Mbeaulne force-pushed the 06-23-add_context-aware_component_search_suggestions branch from 67d60c5 to 48c5305 Compare June 25, 2026 15:55
@Mbeaulne Mbeaulne force-pushed the 06-23-simplify_component_search_result_cards branch 2 times, most recently from 5a383ad to efdd26a Compare June 25, 2026 19:38
@Mbeaulne Mbeaulne force-pushed the 06-23-simplify_component_search_result_cards branch from efdd26a to ce6e6ab Compare June 25, 2026 19:43
@Mbeaulne Mbeaulne force-pushed the 06-23-add_context-aware_component_search_suggestions branch from 41c25b4 to 6da5934 Compare June 25, 2026 19:43
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.

1 participant