stable

Clone or download

Read-only

refactor: Lazybox custom element

How to test: - Pressing "enter" while focusing the search input in the artifact modal should no longer submit the modal. - No other functional change expected. Notes: - Lazybox no longer needs a `<select>` element to be created. It is a standalone element itself. - Some `<span>` elements were removed. Their properties have been moved to the selection or dropdown custom elements. The selection element is focusable directly. - resetSelection was renamed to clearSelection. - setDropdownContent was renamed to replaceDropdownContent, to better communicate what happens. - destroy method is removed. The element takes care of removing event handlers by itself when it is disconnected from the DOM. part of request #31583 Lazybox big clean-up Change-Id: I667d271bdcf61fba17e86cd532f0e6e244b8b66e

Modified Files

Name
M lib/frontend/lazybox/package.json +1 −1 Go to diff View file
R lib/frontend/lazybox/src/helpers/hide-selectbox-helper.test.ts Go to diff View file
A lib/frontend/lazybox/src/CreateLazybox.ts +37 −0 Go to diff View file
R lib/frontend/lazybox/src/items/GroupCollection.ts Go to diff View file
A lib/frontend/lazybox/src/LazyboxElement.test.ts +303 −0 Go to diff View file
A lib/frontend/lazybox/src/LazyboxElement.ts +235 −0 Go to diff View file
R lib/frontend/lazybox/src/type.ts Go to diff View file
M lib/frontend/lazybox/src/SearchInput.test.ts +4 −5 Go to diff View file
M lib/frontend/lazybox/src/SearchInput.ts +10 −6 Go to diff View file
M lib/frontend/lazybox/src/SelectionBadgeCallbackDefaulter.ts +2 −2 Go to diff View file
M lib/frontend/lazybox/src/dropdown/DropdownElement.test.ts +8 −25 Go to diff View file
M lib/frontend/lazybox/src/dropdown/DropdownElement.ts +4 −21 Go to diff View file
M lib/frontend/lazybox/src/dropdown/GroupTemplate.test.ts +1 −1 Go to diff View file
M lib/frontend/lazybox/src/dropdown/GroupTemplate.ts +1 −1 Go to diff View file
D lib/frontend/lazybox/src/events/EventManager.test.ts +0 −159 Go to diff View file
D lib/frontend/lazybox/src/events/EventManager.ts +0 −108 Go to diff View file
M lib/frontend/lazybox/src/events/ScrollingManager.ts +5 −1 Go to diff View file
D lib/frontend/lazybox/src/lazybox.ts +0 −115 Go to diff View file
R lib/frontend/lazybox/src/index.ts Go to diff View file
D lib/frontend/lazybox/src/navigation/FieldFocusManager.test.ts +0 −62 Go to diff View file
D lib/frontend/lazybox/src/navigation/FieldFocusManager.ts +0 −51 Go to diff View file
D lib/frontend/lazybox/src/renderers/BaseComponentRenderer.test.ts +0 −79 Go to diff View file
D lib/frontend/lazybox/src/renderers/BaseComponentRenderer.ts +0 −125 Go to diff View file
M lib/frontend/lazybox/src/selection/ClearSelectionTemplate.test.ts +1 −1 Go to diff View file
M lib/frontend/lazybox/src/selection/SelectionBadge.ts +4 −2 Go to diff View file
M lib/frontend/lazybox/src/selection/SelectionElement.test.ts +1 −44 Go to diff View file
M lib/frontend/lazybox/src/selection/SelectionElement.ts +4 −49 Go to diff View file
M lib/frontend/lazybox/src/selection/selection-badge.scss +2 −2 Go to diff View file
M lib/frontend/lazybox/tests/builders/GroupCollectionBuilder.ts +7 −19 Go to diff View file
M lib/frontend/lazybox/tests/builders/OptionsBuilder.ts +37 −24 Go to diff View file
A lib/frontend/lazybox/tests/stubs/GroupOfItemsStub.ts +31 −0 Go to diff View file
M lib/frontend/lazybox/tests/stubs/LazyboxItemStub.ts +1 −1 Go to diff View file
M lib/frontend/lazybox/tests/stubs/SelectionBadgeCallbackStub.ts +1 −1 Go to diff View file
M lib/frontend/lazybox/tests/stubs/TemplatingCallbackStub.ts +2 −2 Go to diff View file
A lib/frontend/lazybox/themes/_dropdown.scss +147 −0 Go to diff View file
A lib/frontend/lazybox/themes/_selection.scss +104 −0 Go to diff View file
M lib/frontend/lazybox/themes/style.scss +23 −269 Go to diff View file
M lib/frontend/lazybox/tsconfig.json +1 −1 Go to diff View file
M lib/frontend/lazybox/vite.config.ts +1 −1 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/Labels/PullRequestManageLabelsModal.test.ts +13 −16 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/Labels/PullRequestManageLabelsModal.vue +8 −7 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/Labels/autocomplete/LabelsAutocompleter.ts +2 −2 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/Reviewers/PullRequestManageReviewersModal.test.ts +16 −18 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/Reviewers/PullRequestManageReviewersModal.vue +8 −8 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/Reviewers/autocomplete/ReviewersAutocompleter.ts +4 −4 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/tests/stubs/LazyboxStub.ts +27 −17 Go to diff View file
R lib/frontend/lazybox/src/helpers/hide-selectbox-helper.ts Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/tsconfig.json +1 −2 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/LinkField.test.ts +22 −28 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/LinkField.ts +8 −19 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/link-field.scss +1 −6 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/tests/stubs/LazyboxStub.ts +18 −3 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/tsconfig.json +1 −1 Go to diff View file
M src/scripts/tlp-doc/src/editors.js +19 −16 Go to diff View file
M src/www/tlp-doc/resources/forms/lazybox/doc.html +11 −12 Go to diff View file
M src/www/tlp-doc/resources/forms/lazybox/example.html +32 −16 Go to diff View file