-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix: restrict mime type list depending on check operator #50259
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
base: master
Are you sure you want to change the base?
Conversation
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
|
@susnux may I kindly ask you for a review, please? |
|
@nextcloud/server-frontend anyone who could give me feedback, please? |
| computed: { | ||
| options() { | ||
| return [...this.predefinedTypes, this.customValue] | ||
| return ['is', '!is'].includes(this.operator) ? this.predefinedTypes : [this.customValue] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That does not work, because some predefined types are actually regex, like Images and Office documents, so those needs matches, while the others need is.
So we should have two lists of default values. Ideally things like "PDF documents" should be in both lists, once as regex and once as value to not confuse users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Thanks for your feedback @come-nc. I adjusted the code so that it now uses two predefined lists (with some intersections - for example for pdf there's a non-regex and a regex version now).
To be discusses: right now the custom value will only be visible on matches / !matches (regex). We could theoretically also allow custom non-regex mime-types but I didn't want to change this behavior.
Sidenote: I took the liberty to fix the custom values placeholder as well as this needs to be a valid regex
53ef912 to
7bd2d6a
Compare
7bd2d6a to
0d320d3
Compare
fixes #23666 Signed-off-by: Robin Windey <[email protected]>
0d320d3 to
3249ee2
Compare
|
@come-nc the failing cypress tests seem to be unrelated? AFAIK there are no workflowengine E2E tests ... |
Summary
Checklist