Skip to content

[O2B-1558] Set filters from url upon page reload#2144

Open
NarrowsProjects wants to merge 21 commits into
mainfrom
feature/O2B-1558/Set-filters-from-URL-upon-page-reload
Open

[O2B-1558] Set filters from url upon page reload#2144
NarrowsProjects wants to merge 21 commits into
mainfrom
feature/O2B-1558/Set-filters-from-URL-upon-page-reload

Conversation

@NarrowsProjects
Copy link
Copy Markdown
Collaborator

@NarrowsProjects NarrowsProjects commented Apr 27, 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 a filters on overview pages are set, the active filters will appear in the url, when reloading the page, these filters will be applied automatically.

Notable changes for developers:

  • Backend:
    • A new singleton class called FilterLogger has been added.
      • This class has been used to pass filter configurations to InfoLogger
  • Frontend:
    • The eorReason filter component has been changed to match its reasonType and Category with its model

Changes made to the database:

  • N/A

@NarrowsProjects NarrowsProjects self-assigned this Apr 27, 2026
@NarrowsProjects NarrowsProjects added frontend javascript Pull requests that update Javascript code labels Apr 27, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

❌ Patch coverage is 0% with 55 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.80%. Comparing base (7a03dd1) to head (7939594).

Files with missing lines Patch % Lines
lib/public/views/Runs/Overview/RunsWithQcModel.js 0.00% 14 Missing ⚠️
...public/components/Filters/common/FilteringModel.js 0.00% 11 Missing ⚠️
...ib/public/views/Logs/Overview/LogsOverviewModel.js 0.00% 9 Missing ⚠️
...Runs/RunPerPeriod/RunsPerLhcPeriodOverviewModel.js 0.00% 4 Missing ⚠️
...mulationPass/RunsPerSimulationPassOverviewModel.js 0.00% 4 Missing ⚠️
...uns/RunPerDataPass/RunsPerDataPassOverviewModel.js 0.00% 3 Missing ⚠️
...c/views/LhcFills/Overview/LhcFillsOverviewModel.js 0.00% 2 Missing ⚠️
.../components/runEorReasons/runEorReasonSelection.js 0.00% 1 Missing ⚠️
...public/views/DataPasses/DataPassesOverviewModel.js 0.00% 1 Missing ⚠️
.../Environments/Overview/EnvironmentOverviewModel.js 0.00% 1 Missing ⚠️
... and 5 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2144      +/-   ##
==========================================
- Coverage   45.88%   45.80%   -0.09%     
==========================================
  Files        1035     1035              
  Lines       17165    17195      +30     
  Branches     3123     3132       +9     
==========================================
  Hits         7877     7877              
- Misses       9288     9318      +30     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@NarrowsProjects NarrowsProjects changed the base branch from main to impov/O2B-1555/Add-normalize-setter-functions-to-all-classes-that-extend-FilterModel-and-SelectionModel April 27, 2026 07:50
@NarrowsProjects NarrowsProjects force-pushed the feature/O2B-1558/Set-filters-from-URL-upon-page-reload branch 4 times, most recently from 82c8d41 to e157e08 Compare April 29, 2026 08:41
@NarrowsProjects NarrowsProjects force-pushed the impov/O2B-1555/Add-normalize-setter-functions-to-all-classes-that-extend-FilterModel-and-SelectionModel branch 5 times, most recently from beca3c1 to 319bb4d Compare May 11, 2026 06:50
@NarrowsProjects NarrowsProjects force-pushed the feature/O2B-1558/Set-filters-from-URL-upon-page-reload branch 2 times, most recently from 767f763 to 6add680 Compare May 25, 2026 16:50
Base automatically changed from impov/O2B-1555/Add-normalize-setter-functions-to-all-classes-that-extend-FilterModel-and-SelectionModel to main May 26, 2026 14:19
@NarrowsProjects NarrowsProjects force-pushed the feature/O2B-1558/Set-filters-from-URL-upon-page-reload branch from 6add680 to d23795c Compare May 27, 2026 08:52
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.

Comment for general description of the PR, it does more than what you mention:

  • changes the use of textInput component
  • changes EOR
  • adds the logger

Comments for the logger - as you are introducing lots of duplicated code, I belive this would be better to be added as a middleware method and separate ticket
Comment for the call to set from URL. Could this not be added in a common space, perhaps something like in the setter of pageIdentifier?

Comment thread lib/public/components/Filters/common/FilteringModel.js Outdated
Comment thread lib/public/components/Filters/common/FilteringModel.js Outdated
Comment thread lib/public/components/Filters/common/FilteringModel.js Outdated
Comment thread test/public/Filters/index.js Outdated
*/
const listDataPassesHandler = async (req, res) => {
const { path, session: { id }, query } = req;
const filters = query?.filters;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I believe it is filter without the s

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.

You're right

Comment thread lib/public/views/Runs/Overview/RunsWithQcModel.js Outdated
Comment thread lib/server/Loggers/FilterLogger.js Outdated
}
}

module.exports = new FilterLogger;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Missing bracket initialization

Comment thread lib/public/views/Runs/RunPerPeriod/RunsPerLhcPeriodOverviewModel.js
@NarrowsProjects NarrowsProjects requested a review from graduta May 27, 2026 13:26
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 believe I identified a bug that needs to be taken care of:

  • open a summary page (let's say logs)
  • set a filter (let's say "No Anonymous")
  • pages succesfully gets updated and the URL as well
  • use the browser "Go Back" navigation button
  • URL gets updated but the request towards the backend will still contain the filter applied

When fixing the test, please add a test for this scenario as well

* @param {boolean} resetUrl Whether to remove all the active filters from the urls
* @return {void}
*/
resetFiltering(fetch = true, clearUrl = false) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think you updated the docs from the other file similar changes, but you did not apply the change to the implementaiton

Comment thread test/public/Filters/index.js Fixed
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.

2 participants