stable

Clone or download

Read-only

feat: Manage filters creation/deletion

Part of story #35821: Pull request new home page - Filter on Authors This contribution introduces the management of filters creation and deletion. For the moment, it is only possible to create a filter at a time, so we disable the lazy-autocompleter once a filter is created. How to test: - Go to the list of pull-requests --> The "Clear all filters" button is disabled - Open the dropdown --> The Author item is not disabled - Click on Author --> The authors are loaded - Select an Author --> The list is emptied --> It says "you can only select one author" --> The search input has been cleared and disabled --> The Author menu item is disabled - Close the dropdown --> A tlp-badge saying [Author: user (username)] has been added below the buttons --> The "clear all filters" button is enabled - Open the dropdown again --> The author item is still disabled --> The autocompleter is still empty and disabled - Click on the cross in the badge --> The filter is removed - Open the dropdown again --> The author item is not disabled anymore --> You can pick another user - Pick another user - Close the dropdown - Click on "clear all filter" --> The filter is removed --> You can pick another author Change-Id: Iff4a3b5ba12eeb3742e89ad7e10d24048c825af3

Modified Files

Name
M lib/frontend/lazybox/src/LazyAutocompleterElement.test.ts +40 −1 Go to diff View file
M lib/frontend/lazybox/src/LazyAutocompleterElement.ts +21 −0 Go to diff View file
M plugins/pullrequest/scripts/lib/selectors-dropdown/src/elements/SelectorsDropdown.ts +9 −3 Go to diff View file
M plugins/pullrequest/scripts/lib/selectors-dropdown/src/elements/SelectorsDropdownAutocompleter.test.ts +14 −26 Go to diff View file
M plugins/pullrequest/scripts/lib/selectors-dropdown/src/elements/SelectorsDropdownAutocompleter.ts +27 −23 Go to diff View file
M plugins/pullrequest/scripts/lib/selectors-dropdown/src/elements/SelectorsDropdownController.test.ts +1 −1 Go to diff View file
M plugins/pullrequest/scripts/lib/selectors-dropdown/src/elements/SelectorsDropdownController.ts +1 −1 Go to diff View file
M plugins/pullrequest/scripts/lib/selectors-dropdown/src/elements/SelectorsDropdownTemplate.test.ts +14 −4 Go to diff View file
M plugins/pullrequest/scripts/lib/selectors-dropdown/src/elements/SelectorsDropdownTemplate.ts +26 −16 Go to diff View file
A plugins/pullrequest/scripts/lib/selectors-dropdown/src/elements/autocompleter/ContentGroupBuilder.test.ts +71 −0 Go to diff View file
A plugins/pullrequest/scripts/lib/selectors-dropdown/src/elements/autocompleter/ContentGroupBuilder.ts +51 −0 Go to diff View file
A plugins/pullrequest/scripts/lib/selectors-dropdown/src/elements/autocompleter/OnSelectionCallback.test.ts +86 −0 Go to diff View file
A plugins/pullrequest/scripts/lib/selectors-dropdown/src/elements/autocompleter/OnSelectionCallback.ts +49 −0 Go to diff View file
M plugins/pullrequest/scripts/lib/selectors-dropdown/src/main.ts +1 −0 Go to diff View file
M plugins/pullrequest/scripts/lib/selectors-dropdown/tests/SelectorEntryStub.ts +9 −7 Go to diff View file
M plugins/pullrequest/scripts/lib/selectors-dropdown/themes/style.scss +4 −0 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-homepage/po/fr_FR.po +9 −0 Go to diff View file
A plugins/pullrequest/scripts/pullrequest-homepage/src/components/Filters/Author/AuthorFilter.test.ts +37 −0 Go to diff View file
A plugins/pullrequest/scripts/pullrequest-homepage/src/components/Filters/Author/AuthorFilter.ts +41 −0 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-homepage/src/components/Filters/Author/AuthorSelectorEntry.ts +14 −7 Go to diff View file
A plugins/pullrequest/scripts/pullrequest-homepage/src/components/Filters/ListFiltersStore.test.ts +94 −0 Go to diff View file
A plugins/pullrequest/scripts/pullrequest-homepage/src/components/Filters/ListFiltersStore.ts +67 −0 Go to diff View file
A plugins/pullrequest/scripts/pullrequest-homepage/src/components/Filters/PullRequestListFilters.test.ts +106 −0 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-homepage/src/components/Filters/PullRequestListFilters.vue +69 −1 Go to diff View file
A plugins/pullrequest/scripts/pullrequest-homepage/src/components/Filters/PullRequestsListFilter.ts +31 −0 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-homepage/src/components/HomePage.vue +3 −1 Go to diff View file
A plugins/pullrequest/scripts/pullrequest-homepage/tests/stubs/AuthorFilterStub.ts +34 −0 Go to diff View file
M src/www/tlp-doc/resources/forms/lazy-autocompleter/doc.html +6 −0 Go to diff View file