Repository navigation
Conversation
Previously all resources of an application (context) shared a single viewSetting object. Because the per-view localViewSetting chain ends up referencing that same object, entering a search term above one view mutated the shared object and thereby filtered every view in the application at once. Clearing the search once decoupled only that one view (the deep clone in setSearchString), which made the behavior inconsistent depending on interaction order. View settings (search string, filters, hidden columns, sorting) are now kept per resource, keyed by the resource key, and reset when the application is reloaded. Fixes: nextcloud#3008 Assisted-by: pi:glm-5.3-flash Signed-off-by: Alexander R. Krug <krug@coll.mpg.de>
Add a Cypress spec asserting that a search term entered above one view of an application filters only that view while the other views of the application stay uninterrupted, and that clearing the search un-filters it. Guards against a regression of the shared viewSetting object that previously leaked the search across all views (fixes nextcloud#3008). To make the fixture buildable and the assertions robust: - extend the createContext command with optional resource titles, driven through the creation modal's contextResourceForm typeahead - add stable data-cy hooks: contextTableNode / contextViewNode on the context page's per-resource wrappers and elementSearchInput on the shared per-element search input, so the tests can scope to one resource's search input without depending on markup or class order - add the spec to the committed e2e test list - collapse two pre-existing double blank lines in commands.js flagged by lint Signed-off-by: Alexander R. Krug <krug@coll.mpg.de>
Add a search field at the application (context) level that filters all resources of the application at once, as requested in nextcloud#1992. The search term is debounced (500ms, same as the per-view search) and passed down to every resource as a contextSearchString prop. NcTable applies it as the effective search string when the view itself has no search string set, so per-view search restrictions keep working independently and keep precedence when both are set. The filtered state is also reflected in the 'Export filtered rows' action. Assisted-by: pi:glm-5.3-flash Signed-off-by: Alexander R. Krug <krug@coll.mpg.de>
Assert that the application-level search field filters all resources of the application at once and that clearing it restores them, covering the context-wide search introduced with nextcloud#1992. The context search input is exposed as data-cy="contextSearchInput". Assisted-by: pi:glm-5.3-flash Signed-off-by: Alexander R. Krug <krug@coll.mpg.de>
2 of 5 tasks
Replace the Cypress regression test for the per-view search scope (nextcloud#3008) with a Playwright spec, addressing the review feedback on the PR: - Playwright instead of Cypress - no wait(): the debounced search is synchronized with retrying toHaveCount assertions instead of waitForTimeout - no inter-test reliance: every test builds its own fixture through the per-test userPage fixture (own random user per test), and the suite runs fully parallel The createContext helper in the Playwright support code gains optional resource titles, driven through the creation modal's contextResourceForm typeahead. The data-cy hooks (contextTableNode/contextViewNode/elementSearchInput) are unchanged. The Cypress spec, its createContext extension and the spec-list entry are removed again. Assisted-by: pi:glm-5.3-flash Signed-off-by: Alexander R. Krug <krug@coll.mpg.de>
Assert that the application-level search field filters all resources of the application at once and that clearing it restores them, covering the context-wide search introduced with nextcloud#1992. Runs as an independent Playwright test with its own fixture, no waits and no reliance on other tests. The context search input is exposed as data-cy="contextSearchInput". Assisted-by: pi:glm-5.3-flash Signed-off-by: Alexander R. Krug <krug@coll.mpg.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a follow-up to PR #3055 and adds a Context-wide search box under the Context description, in reaction to issue #1992
If you prefer a different placement/UX of the search input box, let me know?
🖼️ Screenshots
🏁 Checklist
/backport to stableX.X🤖 AI (if applicable)