stable

Clone or download

Read-only

feat: Have a reactive "new item label"

How to test: - In your web container, enable the feature flag: `tuleap config-set feature_flag_create_artifact 1` - Edit an artifact with an artifact link field with the modal (kanban, TTM or planning view) - When you enter some text in the search input of the lazybox for link selection in the artifact modal, the translated text of the button updates to include the text ("Create new artifact "<your text>"...") - When you click that button, the lazybox is still replaced by a creation inline form. The text input of that form is NOT auto-filled yet, this will be done later. - In the pullrequest overview page, edit the labels of a pullrequest. When you enter some text in the search input of the lazybox (in the modal), the translated text of the button updates to include the text. - No other functional change expected. Notes: I chose to use events instead of keeping the search callback in SearchInput. Using an event makes it easier to add more than one listener. Adding a separate listener for the "search-input" event in the Dropdown getter felt more clear than doing everything in a single callback. Similarly, the Dropdown now dispatches an event instead of using directly the callback from the options. It means LazyboxElement is responsible for dealing with the Options, while its components (Dropdown, SearchInput) do not need to know about them. They just send events up. part of story #28823 [modal] create artifact Change-Id: Idce56cf51bc9b6e4646356b4962deb414ed3507c

Modified Files

Name
M lib/frontend/lazybox/src/LazyboxElement.test.ts +70 −7 Go to diff View file
M lib/frontend/lazybox/src/LazyboxElement.ts +19 −5 Go to diff View file
M lib/frontend/lazybox/src/Options.ts +5 −4 Go to diff View file
M lib/frontend/lazybox/src/SearchInput.test.ts +33 −35 Go to diff View file
M lib/frontend/lazybox/src/SearchInput.ts +6 −11 Go to diff View file
M lib/frontend/lazybox/src/dropdown/DropdownElement.test.ts +24 −29 Go to diff View file
M lib/frontend/lazybox/src/dropdown/DropdownElement.ts +20 −27 Go to diff View file
M lib/frontend/lazybox/tests/builders/OptionsBuilder.ts +13 −9 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/po/fr_FR.po +5 −2 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/Labels/PullRequestManageLabelsModal.vue +6 −3 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/tests/stubs/LazyboxStub.ts +3 −3 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/po/fr_FR.po +4 −1 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/po/pt_BR.po +3 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/LinkField.ts +7 −2 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/gettext-catalog.ts +2 −0 Go to diff View file
M src/scripts/tlp-doc/src/lazybox.js +13 −17 Go to diff View file
M src/www/tlp-doc/resources/forms/lazybox/doc.html +2 −2 Go to diff View file
M src/www/tlp-doc/resources/forms/lazybox/example.html +12 −11 Go to diff View file