Skip to content

Refactor search results to use PF breadcrumbs#331

Merged
apinkert merged 1 commit into
RedHatInsights:masterfrom
apinkert:update-search-bread
May 29, 2026
Merged

Refactor search results to use PF breadcrumbs#331
apinkert merged 1 commit into
RedHatInsights:masterfrom
apinkert:update-search-bread

Conversation

@apinkert

@apinkert apinkert commented May 29, 2026

Copy link
Copy Markdown
Collaborator

For RHCLOUD-47950. Replacing this with PF's breadcrumb fixes the spacing/styling issues.

Before:
image

After:
image

@coderabbitai

coderabbitai Bot commented May 29, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 6db6e48f-a42d-4741-a270-f10e19ce44df

📥 Commits

Reviewing files that changed from the base of the PR and between 52a5b93 and ba2bded.

📒 Files selected for processing (2)
  • src/components/HelpPanel/HelpPanelTabs/SearchPanel/SearchResultItem.scss
  • src/components/HelpPanel/HelpPanelTabs/SearchPanel/SearchResultItem.tsx

Summary by CodeRabbit

Release Notes

  • Style

    • Refined breadcrumb font sizing in search results for improved visual consistency.
  • Refactor

    • Refactored search result breadcrumb rendering with enhanced component structure.

Walkthrough

SearchResultItem refactors its breadcrumb rendering to use PatternFly's Breadcrumb and BreadcrumbItem components instead of custom JSX. A new helper function extracts breadcrumb configuration logic, and styling is added to control breadcrumb item font size.

Changes

Breadcrumb component refactor

Layer / File(s) Summary
Breadcrumb helper and imports
src/components/HelpPanel/HelpPanelTabs/SearchPanel/SearchResultItem.tsx
PatternFly imports are updated to add Breadcrumb and BreadcrumbItem components and remove the previous Content import. A new getBreadcrumbConfig(type) helper function extracts breadcrumb configuration logic, computing tabType, sectionTitle, and icon for each SearchResult type.
Breadcrumb rendering and styling
src/components/HelpPanel/HelpPanelTabs/SearchPanel/SearchResultItem.tsx, src/components/HelpPanel/HelpPanelTabs/SearchPanel/SearchResultItem.scss
Breadcrumb JSX rendering is updated to use the new PatternFly Breadcrumb and BreadcrumbItem components with configuration from the helper, replacing the previous custom JSX structure. SCSS styling is added to set the --pf-v6-c-breadcrumb__item--FontSize custom property to 0.75rem for .lr-c-search-result-breadcrumb.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description includes the ticket link, before/after screenshots, and explanation of the fix. However, it is missing several template sections including description of changes, accessibility checklist, and other required elements. Expand the description to follow the template more completely: add a 2-3 sentence summary of what changed and why, complete the checklist items, and note any accessibility considerations or AI tool usage if applicable.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: refactoring search results to use PatternFly breadcrumbs instead of a custom implementation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Stylelint (17.12.0)
src/components/HelpPanel/HelpPanelTabs/SearchPanel/SearchResultItem.scss

ConfigurationError: Could not find "stylelint-config-recommended-scss". Do you need to install the package or use the "configBasedir" option?
at getModulePath (file:///usr/local/lib/node_modules/stylelint/lib/utils/getModulePath.mjs:29:9)
at loadExtendedConfig (file:///usr/local/lib/node_modules/stylelint/lib/augmentConfig.mjs:285:21)
at extendConfig (file:///usr/local/lib/node_modules/stylelint/lib/augmentConfig.mjs:252:25)
at augmentConfigBasic (file:///usr/local/lib/node_modules/stylelint/lib/augmentConfig.mjs:85:26)
at augmentConfigFull (file:///usr/local/lib/node_modules/stylelint/lib/augmentConfig.mjs:138:30)
at getConfigForFile (file:///usr/local/lib/node_modules/stylelint/lib/getConfigForFile.mjs:102:32)
at async resolveOptionValue (file:///usr/local/lib/node_modules/stylelint/lib/utils/resolveOptionValue.mjs:27:24)
at async standalone (file:///usr/local/lib/node_modules/stylelint/lib/standalone.mjs:127:22)


Comment @coderabbitai help to get the list of available commands and usage tips.

@apinkert
apinkert merged commit dc407f0 into RedHatInsights:master May 29, 2026
9 checks passed
@apinkert
apinkert deleted the update-search-bread branch May 29, 2026 20:12
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