Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enforce prefix for persisted route query values #9226

Merged
merged 3 commits into from
Jun 15, 2023

Conversation

kulmann
Copy link
Member

@kulmann kulmann commented Jun 14, 2023

Description

Pagination for admin-settings has been introduced recently. A weird-ish url query was used for the items per page: admin-settings-items-per-page. With this PR I'm streamlining that to be items-per-page in both the admin-settings and files apps respectively by enforcing a prefix for persisting the query value into the localStorage. A kind of prefix already existed before: it was named routeName, which is too specific, so I renamed it. As a result the items per page in the files app will be persisted into oc-options_files_items-per-page and the items per page in the admin-settings app will be persisted into oc-options_admin-settings_items-per-page.

Motivation and Context

Consistency in a) localStorage, b) url query and c) developer experience

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • changelog item
  • fix unit tests

@update-docs
Copy link

update-docs bot commented Jun 14, 2023

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@kulmann kulmann force-pushed the fix-items-per-page-route-queries branch from 58b9dfd to 41850d3 Compare June 14, 2023 10:06
@kulmann kulmann marked this pull request as ready for review June 14, 2023 14:22
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

77.3% 77.3% Coverage
0.0% 0.0% Duplication

@kulmann kulmann self-assigned this Jun 14, 2023
@kulmann kulmann merged commit a854904 into master Jun 15, 2023
@delete-merged-branch delete-merged-branch bot deleted the fix-items-per-page-route-queries branch June 15, 2023 07:36
@micbar micbar mentioned this pull request Jul 24, 2023
68 tasks
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