Skip to content

Conversation

@huuaho
Copy link

@huuaho huuaho commented Jan 20, 2026

Description

We are enabling the constructed query feature as seen in CCDI Hub. However our implementation will restrict which fields appear in the URL. For the facet filter this is configured by a new field called "updateURL".

Query Bar -
There currently exists a bug that the unknown ages filter does not get encoded in the indirect URL generation. We resolved this within this implementation update

Local Find -
Within the search box and upload modal generators, we added a new function method configuration that updates the URL during operation. We follow CCDI's implementation here with this function configuration method, however we do differ on its implementation on the FE because we want to filter which of the active filters will appear in the URL.

Facet Filter -

  • Abstracted out Checkboxes to a base checkbox view
  • The majority of the affected files is just passing down the query params and update URL function defined in the frontend.
  • The checkboxes all receive the same update as they trigger URL updates if the facet has updateURL.
  • The facet modal and redux new facet view have updated defined clear behaviors to make sure they wipe the filter but also update the URL if applicable.
  • We also changed our implementation of useNavigate to redirect the page. This is because every time it would trigger a rerender. By using the window.history.replaceState method we can update the URL without triggering a refresh. The refresh trigger was an issue because we would reload with only the ones defined in the URL and we would lose our current context with the active filters not defined in the URL.
  • Because we do not update the URL, when the user would visit the explore page from a copied link. That copied link would be treated as the 'base URL' we also had to update the original build function to get the most up to date base URL (As seen in this commit)
  • We also had an issue where the upload modal was not being memorized in the query update which is why we had to do this commit, we would see a URL that would ignore the active upload modal filter.

Fixes # (issue)
C3DC-1912
C3DC-1935

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements a constructed URL feature that enables selective URL parameter updates based on facet filter configurations. The implementation addresses a bug where unknown ages filters were not encoded in URL generation and establishes a framework for controlling which filters appear in the URL through a new updateURL configuration field.

Changes:

  • Fixed Query Bar bug preventing unknown ages state from being encoded in URLs
  • Added URL update functionality to Local Find components (SearchBox and UploadModal) with configurable callbacks
  • Implemented selective URL updates for Facet Filter checkboxes controlled by updateURL flag, using window.history.replaceState to avoid page reloads

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/query-bar/src/components/QueryUrl.js Extracts and includes unknownAges state in query string generation
packages/query-bar/package.json Version bump to 1.0.0-c3dc.12
packages/local-find/src/UploadModal/config.js Adds updateBrowserUrl callback configuration
packages/local-find/src/UploadModal/UploadModalGenerator.js Implements URL update on file upload submission
packages/local-find/src/SearchBox/config.js Adds updateBrowserUrl callback configuration
packages/local-find/src/SearchBox/SearchBoxGenerator.js Implements URL update on search selection changes
packages/local-find/package.json Version bump to 1.0.0-c3dc.6
packages/facet-filter/src/components/inputs/checkbox/*.js Adds URL update logic to checkbox views when updateURL flag is true
packages/facet-filter/src/components/inputs/SearchFilterItems.js Passes queryParams and onUrlUpdate props to child components
packages/facet-filter/src/components/inputs/ModalFilterItems.js Passes queryParams prop to checkbox components
packages/facet-filter/src/components/inputs/FilterItems.js Passes onUrlUpdate prop to checkbox components
packages/facet-filter/src/components/facet/ReduxNewFacetView.js Implements URL updates for clear actions and syncs participant IDs
packages/facet-filter/src/components/facet/NewSearchFacetView.js Threads onUrlUpdate prop through component hierarchy
packages/facet-filter/src/components/facet/NewFacetView.js Threads onUrlUpdate prop through component hierarchy
packages/facet-filter/src/components/facet/FacetModal.js Implements URL update on clear section action
packages/facet-filter/src/NewFacetFilterView.js Threads onUrlUpdate prop through component hierarchy
packages/facet-filter/src/NewFacetFilterController.js Threads onUrlUpdate prop through component hierarchy
packages/facet-filter/package.json Version bump to 1.0.1-c3dc.12 and adds @bento-core/util dependency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@huuaho huuaho requested a review from Copilot January 20, 2026 21:29
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@huuaho huuaho requested a review from Copilot January 20, 2026 21:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@huuaho huuaho requested a review from amattu2 January 20, 2026 21:46
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