stable

Clone or download

Read-only

refactor: DRY filename preview property

As of today the filename preview is displayed by two different components that: * detect if the preview can be displayed * compute the preview * display the preview with additional info (tooltip) While what the preview be like is specific (new version vs new file), how and when to display it is common to both, it can be extracted to avoid to repeat ourselves too much. No functional changes. Part of story #24192 preview file name at upload Change-Id: Ide6bcf6eb97caa9cf031c96b4cb14ebe9a76b0e4

Modified Files

Name
M plugins/document/scripts/document/components/Folder/DropDown/NewVersion/PreviewFilenameNewVersion.test.ts +2 −22 Go to diff View file
M plugins/document/scripts/document/components/Folder/DropDown/NewVersion/PreviewFilenameNewVersion.vue +8 −22 Go to diff View file
M plugins/document/scripts/document/components/Folder/ModalCommon/PreviewFilename.test.ts +2 −17 Go to diff View file
M plugins/document/scripts/document/components/Folder/ModalCommon/PreviewFilename.vue +8 −22 Go to diff View file
A plugins/document/scripts/document/components/Folder/ModalCommon/PreviewFilenameProperty.test.ts +98 −0 Go to diff View file
A plugins/document/scripts/document/components/Folder/ModalCommon/PreviewFilenameProperty.vue +60 −0 Go to diff View file