Repository navigation
Conversation
Test cases to make sure that file previews/thumbnails are displayed in the file picker when inserting an image into a document Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev> Assisted-by: ClaudeCode:claude-opus-5[1m]
This is necessary for the file picker to be displayed correctly and for file previews/thumbnails to be presented. Also imports the styles into DocumentTargetPicker.vue as it was missing there. Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev> Assisted-by: ClaudeCode:claude-opus-5[1m]
juliusknorr
left a comment
There was a problem hiding this comment.
Thanks, that's a pretty sane fix, and nice to have an e2e test that actually fails without it 👍 One small comment inside. Backports? Only the stable branches already on @nextcloud/dialogs 7 need this.
| import SaveAs from '../components/Modal/SaveAs.vue' | ||
| import { getCurrentDirectory } from '../helpers/filesApp.js' | ||
|
|
||
| import '@nextcloud/dialogs/style.css' |
There was a problem hiding this comment.
Not a blocker: should we rather import the stylesheet once per entrypoint (viewer.js, reference.js, personal.js, ...) instead of in single modules? SaveAs.vue, ZoteroHint.vue, PersonalSettings.vue, SettingsFont.vue and mixins/version.js also use toasts from @nextcloud/dialogs without importing it, so they probably only look right because server ships the same build.
| cy.get('@preview') | ||
| .should('be.visible') | ||
| .and('have.css', 'width', '32px') | ||
| .and('have.css', 'height', '32px') |
There was a problem hiding this comment.
Pinning 32px ties the test to the current dialogs CSS, so a later dialogs bump could break it even though nothing is wrong. Could we just check that width and height are not 0px? That still fails without the stylesheet.
Fixes #6326
The file picker did not import the
@nextcloud/dialogsstylesheet so previews were not displaying and the styles were wrong. This seems to happen when the version of@nextcloud/dialogsin server vs. richdocuments are mismatched.