stable

Clone or download

Read-only

feat: Open a side panel when user clicks on item

part of story #35821 Pull request new home page - Filter on Authors This contribution introduce an empty side panel which is displayed only when the user selects an item in the menu. This side panel will contain the autocompleter bound to the currently active SelectorEntry. Note: I chose not to add additional classes to TLP, because it feels like we are implementing a specific use case here, and I wanted to avoid the suffering of having to rebuild tlp + the lib + the app. Note 2: I needed tlp-dropdown to make the menu dispatch shown/hidden events for testing purposes. How to test: - Open the dropdown by clicking on [+ Add filter] - Click on "Author" in the menu --> a wild side panel appears - Click out to close the dropdown - Open it again --> no side panel - Click "Author" again in the menu --> the side panel opens again Change-Id: Id7621cc6f00228962152b7bf079d9a33ae61ce8a

Modified Files

Name
M lib/frontend/tlp-dropdown/src/dropdowns.ts +2 −0 Go to diff View file
M plugins/pullrequest/scripts/lib/selectors-dropdown/package.json +1 −0 Go to diff View file
M plugins/pullrequest/scripts/lib/selectors-dropdown/pnpm-lock.yaml +7 −4 Go to diff View file
M plugins/pullrequest/scripts/lib/selectors-dropdown/src/elements/SelectorsDropdown.ts +8 −0 Go to diff View file
M plugins/pullrequest/scripts/lib/selectors-dropdown/src/elements/SelectorsDropdownController.test.ts +41 −3 Go to diff View file
M plugins/pullrequest/scripts/lib/selectors-dropdown/src/elements/SelectorsDropdownController.ts +15 −1 Go to diff View file
M plugins/pullrequest/scripts/lib/selectors-dropdown/src/elements/SelectorsDropdownTemplate.test.ts +76 −3 Go to diff View file
M plugins/pullrequest/scripts/lib/selectors-dropdown/src/elements/SelectorsDropdownTemplate.ts +59 −16 Go to diff View file
A plugins/pullrequest/scripts/lib/selectors-dropdown/src/scss-shims.d.ts +23 −0 Go to diff View file
A plugins/pullrequest/scripts/lib/selectors-dropdown/tests/ControlSelectorsDropdownStub.ts +31 −0 Go to diff View file
A plugins/pullrequest/scripts/lib/selectors-dropdown/themes/style.scss +54 −0 Go to diff View file