-
Couldn't load subscription status.
- Fork 107
fix(files.js): check,ether "show folder descr." is set or not #7788
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
Conversation
Signed-off-by: janbaum <jan.baumgarten@tutanota.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7788 +/- ##
=======================================
Coverage 60.19% 60.19%
=======================================
Files 502 502
Lines 38561 38562 +1
Branches 1135 1135
=======================================
+ Hits 23210 23211 +1
Misses 15245 15245
Partials 106 106 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I dont fully understand why, this is just an observation... This also results in some weired behaviour of some edge cases, e.g:
So it should actually also be prevented, that the option shows off, when a This also works the other way around, because I am pretty convinced that the problem is in the inital state, that is not updated, other than from reloading |
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.
Thanks a lot for tackling this. Tested and works well.
The user has to reload the page though, since the function, that checks the state of this setting, is somehow only called when the site gets reloaded.
Yeah, that's because the whole "new file" menu is created when the page is loaded. As you can see in the source file where you made the changes, addNewFileMenuEntry() is called inside addMenuRichWorkspace() which in turn is called in src/init.js. To my knowledge there's no way at the moment to remove menu entries from the files app "new file" menu dynamically. So the fix certainly is good enough for now. (Un)selecting "Show folder description" as well required a reload to become active.
|
/backport to stable32 |
|
/backport to stable31 |
📝 Summary
With this PR, the option 'Add folder description' is not more visible, if 'Show folder description' is turned off.
The user has to reload the page though, since the function, that checks the state of this setting, is somehow only called when the site gets reloaded.
🚧 TODO
"files-setting-richworkspace"(FilesSettings.vue) when '+New' menu is opened ?🏁 Checklist
npm run lint/npm run stylelint/composer run cs:check)