stable

Clone or download

Read-only

feat: Display dropdown for search results

Description =========== Every search result items now offers a dropdown menu in order to be able to fully interact with it. Every actions that are available when we browse the tree are available for each type of items. When an item is updated and modification can have an impact on displayed search results (update of properties, new item, permissions, …) then the whole page is reloaded. For now the label of the button is only an ellipsis, we might change it later to a text label if we find inspiration. Implementation notes ==================== Delayed display of dropdown --------------------------- Since the result is an array of ItemSearchResult, which is not compatible with Item, we need to do a query to retrieve the full item when we open the dropdown. Blocking modal -------------- When a new version (or file item) is being uploaded, we don't want the user to screw up the upload with navigation. The user should be aware that an upload is ongoing. While the current folder has progress bars (in header and in content) it is not the case yet in search result. The easiest/fastest solution is to display a blocking modal until the upload is finished. So now the TLP modals accept a new option in order to control the click on the backdrop (click to close), to be used in combination with `keyboard` option (ESC to close). Externalized dropdown menu -------------------------- The structure of the search results DOM (horizontally scrollable table) prevents the display of the dropdown menu. When it is displayed, according to situations/resolutions it might be hidden behind the overflow, forcing the user to scroll the table to see menu options. However TLP dropdowns must be initialized with menu as a sibling of its trigger button. In order to solve the issue, once the TLP dropdown is initialized for search results items, the menu is moved directly at the end of `document.body`. That way the floating menu is displayed above all content and is not anymore under the overflow of the table. Manipulating DOM element inside Vue component sounds a little bit cheaty, but I didn't find a better way to achieve the result unless to rework the WOW of TLP dropdowns. --- Part of story #24197: search for Documents with criteria Change-Id: I18b7a77280263770441cf7f3c52a372940f4ef83

Modified Files

Name
M lib/frontend/tlp-modal/src/modal.test.ts +37 −0 Go to diff View file
M lib/frontend/tlp-modal/src/modal.ts +23 −4 Go to diff View file
A plugins/document/scripts/document/components/AdvancedSearch/OngoingUploadModal.test.ts +215 −0 Go to diff View file
A plugins/document/scripts/document/components/AdvancedSearch/OngoingUploadModal.vue +171 −0 Go to diff View file
M plugins/document/scripts/document/components/AdvancedSearch/SearchContainer.test.ts +35 −0 Go to diff View file
M plugins/document/scripts/document/components/AdvancedSearch/SearchContainer.vue +26 −1 Go to diff View file
M plugins/document/scripts/document/components/AdvancedSearch/SearchHeader.vue +15 −4 Go to diff View file
A plugins/document/scripts/document/components/AdvancedSearch/SearchItemModals.test.ts +69 −0 Go to diff View file
A plugins/document/scripts/document/components/AdvancedSearch/SearchItemModals.vue +282 −0 Go to diff View file
M plugins/document/scripts/document/components/AdvancedSearch/SearchResult/Cells/CellTitle.vue +41 −16 Go to diff View file
A plugins/document/scripts/document/components/AdvancedSearch/SearchResult/Cells/SearchItemDropdown.test.ts +112 −0 Go to diff View file
A plugins/document/scripts/document/components/AdvancedSearch/SearchResult/Cells/SearchItemDropdown.vue +178 −0 Go to diff View file
A plugins/document/scripts/document/components/AdvancedSearch/SearchResult/Cells/__snapshots__/SearchItemDropdown.test.ts.snap +47 −0 Go to diff View file
M plugins/document/scripts/document/components/EmbeddedDisplay/ActionsHeader.vue +2 −1 Go to diff View file
M plugins/document/scripts/document/components/Folder/DropDown/DropDownButton.test.ts +8 −7 Go to diff View file
M plugins/document/scripts/document/components/Folder/DropDown/DropDownButton.vue +15 −1 Go to diff View file
M plugins/document/scripts/document/components/Folder/DropDown/DropDownCurrentFolder.vue +2 −9 Go to diff View file
M plugins/document/scripts/document/components/Folder/DropDown/DropDownDisplayedEmbedded.vue +2 −9 Go to diff View file
M plugins/document/scripts/document/components/Folder/DropDown/DropDownMenu.vue +4 −15 Go to diff View file
M plugins/document/scripts/document/components/Folder/DropDown/DropDownMenuTreeView.vue +1 −6 Go to diff View file
M plugins/document/scripts/document/components/Folder/DropDown/DropDownQuickLook.vue +2 −5 Go to diff View file
M plugins/document/scripts/document/components/Folder/EmptyState/EmptyFolderForWriters.vue +2 −1 Go to diff View file
M plugins/document/scripts/document/components/Folder/FolderContentRow.vue +1 −0 Go to diff View file
M plugins/document/scripts/document/components/Folder/FolderHeaderAction.vue +2 −1 Go to diff View file
M plugins/document/scripts/document/components/Folder/ProgressBar/GlobalUploadProgressBar.vue +14 −4 Go to diff View file
M plugins/document/scripts/document/helpers/emitter.ts +44 −10 Go to diff View file
M plugins/document/scripts/document/po/fr_FR.po +9 −0 Go to diff View file
M plugins/document/scripts/document/store/actions-create.test.ts +6 −1 Go to diff View file
M plugins/document/scripts/document/store/actions-create.ts +2 −0 Go to diff View file
M plugins/document/scripts/document/store/actions-delete.test.ts +11 −0 Go to diff View file
M plugins/document/scripts/document/store/actions-delete.ts +3 −0 Go to diff View file
M plugins/document/scripts/document/store/actions-helpers/create-new-file.ts +3 −0 Go to diff View file
M plugins/document/scripts/document/store/actions-helpers/upload-file.ts +4 −0 Go to diff View file
M plugins/document/scripts/document/store/actions-retrieve.ts +9 −0 Go to diff View file
M plugins/document/scripts/document/store/actions-update.test.ts +47 −40 Go to diff View file
M plugins/document/scripts/document/store/actions-update.ts +10 −0 Go to diff View file
M plugins/document/scripts/document/store/clipboard/clipboard-actions.test.ts +21 −0 Go to diff View file
M plugins/document/scripts/document/store/clipboard/clipboard-actions.ts +2 −0 Go to diff View file
M plugins/document/scripts/document/store/permissions/permissions-actions.test.ts +11 −0 Go to diff View file
M plugins/document/scripts/document/store/permissions/permissions-actions.ts +3 −0 Go to diff View file
M plugins/document/scripts/document/store/properties/properties-actions.test.ts +13 −0 Go to diff View file
M plugins/document/scripts/document/store/properties/properties-actions.ts +3 −0 Go to diff View file
M plugins/document/themes/_search.scss +47 −2 Go to diff View file
M src/www/tlp-doc/resources/flyover/modals/usage/doc.html +33 −9 Go to diff View file