Skip to content

[O2B-1556] Configure filtering model observability to set active filters to the url#2142

Merged
graduta merged 128 commits intomainfrom
feature/O2B-1556/Configure-FilteringModel-observability-to-set-active-filters-to-the-url
May 5, 2026
Merged

[O2B-1556] Configure filtering model observability to set active filters to the url#2142
graduta merged 128 commits intomainfrom
feature/O2B-1556/Configure-FilteringModel-observability-to-set-active-filters-to-the-url

Conversation

@NarrowsProjects
Copy link
Copy Markdown
Collaborator

@NarrowsProjects NarrowsProjects commented Apr 21, 2026

I have a JIRA ticket

  • branch and/or PR name(s) include(s) JIRA ID
  • issue has "Fix version" assigned
  • issue "Status" is set to "In review"
  • PR labels are selected

Notable changes for users:

  • When configuring a filter a string version will then appear in the URL

Notable changes for developers:

  • FilteringModel now has a router argument for its constructor.
  • All pages that use a filteringModel must explicitly set filteringModel.pageIdentifier. This identifier determines if this specific filteringModel instance should sync its active filters to the URL, and which page’s URL should be used to initialize the filter values for that filteringModel.
    • This is currently done by passing the identifier page identifier via the constructor
  • All overview page reset() functions have gained a clearUrl boolean argument, that determines if running the reset function should also remove the filters from the url.

Changes made to the database:

  • N/A

Guust and others added 30 commits February 20, 2026 10:23
* Filtering by stableBeamsStart and stableBeamsEnd has been added to LHC Fills overview page
* lhcFills endpoint & DTO validation modified and testing added for the aforementioned changes
---------

Co-authored-by: GuustMetz <guust.metz@cern.ch>
Co-authored-by: Guust <metzguust@gmail.com>
* Replaced the two-query pattern with a single queryBuilder in GetAllEnvironmentsUseCase. The previous approach was redundant following Sequelize performance improvements; furthermore, the original implementation's logic was flawed which resulted in the pagination bug.
Comment thread test/public/Filters/filtersToUrl.test.js Fixed
Comment thread test/public/Filters/filtersToUrl.test.js Fixed
@NarrowsProjects NarrowsProjects changed the base branch from main to improv/O2B-1557/Force-all-filters-managed-by-FilteringModel-to-extend-FilterModel-or-SelectionModel April 23, 2026 12:06
@NarrowsProjects NarrowsProjects force-pushed the feature/O2B-1556/Configure-FilteringModel-observability-to-set-active-filters-to-the-url branch from 04ce63d to cbd335d Compare April 23, 2026 14:31
Comment thread test/public/defaults.js
module.exports.fillInput = async (page, inputSelector, value, events = ['input']) => {
await page.waitForSelector(inputSelector);
await page.evaluate((inputSelector, value, events) => {
await page.waitForFunction((inputSelector, value, events) => {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

To the reviewers:
This is a stealth fix for a problem that happens for a couple of tests occasionally:

     TypeError: Cannot set properties of null (setting 'value')
      at evaluate (evaluate at module.exports.fillInput (test/public/defaults.js:671:16), <anonymous>:2:22)

This happens because between waitForSelector and the evaluate the selector ceases to be valid.
The waitForFunction guard is more more robust waitForSelector in this scenario.

As this PR adds tests that make back-to-back use of fillInput I thought it appropriate to add it here.

@NarrowsProjects NarrowsProjects force-pushed the feature/O2B-1556/Configure-FilteringModel-observability-to-set-active-filters-to-the-url branch from 4a30d27 to ae6c287 Compare April 27, 2026 07:17
NarrowsProjects added 2 commits May 4, 2026 18:10
…odel-to-extend-FilterModel-or-SelectionModel' into feature/O2B-1556/Configure-FilteringModel-observability-to-set-active-filters-to-the-url
Base automatically changed from improv/O2B-1557/Force-all-filters-managed-by-FilteringModel-to-extend-FilterModel-or-SelectionModel to main May 4, 2026 17:41
Copy link
Copy Markdown
Member

@graduta graduta left a comment

Choose a reason for hiding this comment

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

I think it would be good if we also move away from page identifiers as hard-coded strings and use a map/enum for this. Could you please create a ticket so that we do not forget about this?

@graduta graduta merged commit ca5d12b into main May 5, 2026
56 of 59 checks passed
@graduta graduta deleted the feature/O2B-1556/Configure-FilteringModel-observability-to-set-active-filters-to-the-url branch May 5, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend javascript Pull requests that update Javascript code

Development

Successfully merging this pull request may close these issues.

3 participants