Skip to content

feat: add filter distribution sidebar with per-version selection - #333

Open
Bhavishya07-Tech wants to merge 2 commits into
openmainframeproject:masterfrom
Bhavishya07-Tech:feat/filter-distribution-sidebar
Open

Bhavishya07-Tech wants to merge 2 commits into
openmainframeproject:masterfrom
Bhavishya07-Tech:feat/filter-distribution-sidebar

Conversation

@Bhavishya07-Tech

Copy link
Copy Markdown
Contributor

Closes #321

Summary

Adds a "Filter distribution" section to the sidebar, allowing users to filter search results by specific point-release versions within a distro family (e.g. Debian 12 vs 11), rather than only by parent distribution.

Changes

  • New FilterSidebar component: collapsible distro groups with per-version checkboxes, plus the "Refine results on this page" search moved here from the results panel (per @pleia2's feedback on the mock-up).
  • SearchBar: replaced flat parent-distro checkbox state with per-version state (selectedVersions), and bit-flag generation now sums selected version flags directly.
  • SearchResults: removed local refine-input state, now receives refinePackageName as a prop from the shared sidebar.

Testing

Verified locally with mock distro data — sidebar renders, groups expand/collapse independently, checkbox selection clears "No distribution selected" warning correctly. Full end-to-end search flow needs a live backend to verify against.

@pleia2 ready for review — this follows the mock-up you approved.

@pleia2

pleia2 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

@TusharB-07 Thanks for your work on this! I think the results sidebar is working, but when I load up these changes in my development environment the list of distributions disappears. Any thoughts?

image

@vmuralictr Can you take a look at the failing npm test?

@TusharB-07

Copy link
Copy Markdown
Collaborator

hi @pleia2 , Think you meant to tag @Bhavishya07-Tech — not my PR, but the failing npm audit check overlaps with a CI gate I worked on, so I dug into the sidebar bug too.

Root cause: FilterSidebar is rendered inside {searchPerformed && (...)} in SearchBar.jsx (~line 249). searchPerformed starts false, so the distro list never mounts until after a search — on master it rendered unconditionally on page load.

Fix: move <FilterSidebar ... /> outside that gate so it renders immediately (osList defaults to {}, so it's safe), keeping only results-main gated on searchPerformed.

- {searchPerformed && (
-   <div className="results-layout">
-     <FilterSidebar ... />
-     <div className="results-main">
+ <div className="results-layout">
+   <FilterSidebar ... />
+   {searchPerformed && (
+     <div className="results-main">

Tested locally — confirmed the list now shows on page load:
image

@pleia2

pleia2 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

That's what I get for reviewing too many PRs on one afternoon, sorry about that, Tushar!

@Bhavishya07-Tech Can you look at my and @TusharB-07's comments above?

@Bhavishya07-Tech

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback, @pleia2 and @TusharB-07!

I'm currently looking into this. I'll apply the structural fix to FilterSidebar so it renders on initial page load and resolve the npm audit failure. Will ping you both once the updates are pushed.

@pleia2

pleia2 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

@Bhavishya07-Tech Any luck on this? I'm aiming to do some user testing over the next couple weeks, and this sidebar is an important feature for the users who are evaluating the new version of the tool.

@pleia2
pleia2 requested review from pleia2 and vmuralictr September 23, 2026 15:07
Bhavishya07-Tech and others added 2 commits October 6, 2026 08:55
Signed-off-by: Bhavishya Goyal <bhavishya13n@gmail.com>
Signed-off-by: vmuralictr <vmurali.ctr@gmail.com>
- Move FilterSidebar outside searchPerformed gate so distro list
  shows on initial page load (fixes issue reported by @pleia2)
- Hide 'Refine results on this page' box until after first search
- Fix sidebar position consistency by always rendering results-main
  and adding width:100% to SearchBar root div
- Move HeroSection into results-main to fill space before search
- Auto-trigger search when distro version checkboxes change

Root cause identified by @TusharB-07, original PR by @Bhavishya07-Tech.

Signed-off-by: vmuralictr <vmurali.ctr@gmail.com>

@vmuralictr vmuralictr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally — all fixes verified:

Distro list shows on page load
Sidebar position is consistent before and after search
"Refine results" box hidden until after first search
Auto-search triggers on checkbox change

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.

[Feature]: Add a "Filter distribution" section to the UI

4 participants