-
Notifications
You must be signed in to change notification settings - Fork 94
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
fix: Use resize observer to calculate menubar icon limit #4637
Conversation
Passing run #11537 ↗︎Details:
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
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.
Code changes look good. So much cleaner indeed.
I did not give it a try. Happy to hear it also fixes things in deck.
I have one minor question in the review.
Also... backports?
42fdb59
to
2766bfb
Compare
/compile |
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 for looking into this! We still a listener on resize
in getClientWidth()
at src/store/plugin.js
and in src/mixins/isMobile.js
.
Also in src/components/Editor/EditorOutline.vue
we implement our own $resizeObserver
.
Maybe it would be good to consolidate all of them? 🤔
Sounds like a good idea. For the isMobile mixin we can actually rely on the one from I'd do that in a follow up to have the bugfix isolated for backports |
Need to double check, cypress failure looks like it could be related not showing the menubar on direct editing. |
89a51a8
to
6e3ecf0
Compare
Pushed a fix to set the ready state in any case as for plain text files we don't have a resize observer as the menubar isn't there. |
/compile amend / |
Signed-off-by: Julius Härtl <jus@bitgrid.net>
6e3ecf0
to
180cc39
Compare
/compile |
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
/backport 180cc39 to stable27 |
/backport 180cc39 to stable26 |
The backport to stable27 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable27
git pull origin stable27
# Create the new backport branch
git checkout -b fix/foo-stable27
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable27 More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
The backport to stable26 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable26
git pull origin stable26
# Create the new backport branch
git checkout -b fix/foo-stable26
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable26 More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
|
Signed-off-by: Julius Härtl jus@bitgrid.net
📝 Summary
Make the icon limit recalculation more reliable by using a resize observer on the actual element and makes the code much cleaner
@vueuse/core
is already a dependency through@nextcloud/vue
Fixes nextcloud/deck#4970
🏁 Checklist
npm run lint
/npm run stylelint
/composer run cs:check
)