Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove config options "disablePreviews", "displayThumbnails" and "previewFileMimeTypes" #11209

Merged
merged 6 commits into from
Jul 18, 2024

Conversation

AlexAndBear
Copy link
Contributor

@AlexAndBear AlexAndBear commented Jul 17, 2024

Description

Related Issue

Motivation and Context

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests
  • Documentation
  • Maintenance (e.g. dependency updates or tooling)

Open tasks:

  • ...

Copy link

update-docs bot commented Jul 17, 2024

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@AlexAndBear AlexAndBear changed the title Fix displayThumbnails wrong statement Remove config options "disablePreviews" and "displayThumbnails" Jul 17, 2024
@AlexAndBear
Copy link
Contributor Author

@ScharfViktor I have the gut feeling, that this makes the e2e tests flaky.
Maybe these are API call checks or something,
any idea ?

@ScharfViktor
Copy link
Contributor

@ScharfViktor I have the gut feeling, that this makes the e2e tests flaky.

I see this step await sidebar.openPanel({ page, name: '' }) started failing often. if we fix it in one place - we fix all tests because a lot of the tests use it

I'll try to reproduce it localy and fix

@kulmann
Copy link
Member

kulmann commented Jul 18, 2024

We found one more: options.previewFileMimeTypes can be hardcoded, because we now only have ocis as backend and know which mime types are supported.

@ScharfViktor
Copy link
Contributor

e2e tests have 2 problem

    1. new Uncaught error
image - 2. existing flaky (not releated this PR) image

@AlexAndBear AlexAndBear changed the title Remove config options "disablePreviews" and "displayThumbnails" Remove config options "disablePreviews", "displayThumbnails" and "previewFileMimeTypes" Jul 18, 2024
@AlexAndBear AlexAndBear marked this pull request as ready for review July 18, 2024 12:13
Copy link

sonarcloud bot commented Jul 18, 2024

@@ -864,7 +864,7 @@ export default defineComponent({
return this.clipboardResources.some((r) => r.id === resource.id)
},
shouldDisplayThumbnails(item: Resource) {
return this.areThumbnailsDisplayed && !isResourceTxtFileAlmostEmpty(item)
return !isResourceTxtFileAlmostEmpty(item)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about dropping this whole function as well? While I get the intention, I still always think that it might be confusing at the same time that sometimes .txt files have a preview/thumbnail and sometimes they don't. Yes, the thumbnail is a white box if the text file is empty. But well, so be it... I'm in favour of reducing complexity / confusion and remove the helper and its usages entirely. Would fit in this PR...

Copy link
Contributor Author

@AlexAndBear AlexAndBear Jul 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently idk, it seems that the server is throwing an error, when you request a preview on an empty text file which triggers, the CI to fail.

Copy link
Member

@kulmann kulmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏅

@AlexAndBear AlexAndBear merged commit ae939de into master Jul 18, 2024
3 checks passed
ownclouders pushed a commit that referenced this pull request Jul 18, 2024
…viewFileMimeTypes" (#11209)

* Purge config previewFileMimeTypes, displayThumbnails and disablePreviews option

---------

Co-authored-by: Viktor Scharf <[email protected]>
@kulmann kulmann deleted the issues/11207 branch September 5, 2024 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Thumbnails are displayed in some places and in some places not
3 participants