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(LeftSidebar): revert temp styles and fix conversation styling #10818
Conversation
adjustScrollerHeight() { | ||
const scrollerContainer = this.$refs.scroller.$el.querySelector( | ||
'.vue-recycle-scroller__item-wrapper' | ||
) | ||
const minHeight = this.conversations.length * this.CONVERSATION_ITEM_SIZE + 2 | ||
scrollerContainer.style.minHeight = minHeight + 'px' | ||
}, |
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.
We should not do this to fix the border...
- It updates only on conversation list update, but it doesn't work on height change, e.g. window resize. It can be fixed by
window
'sresize
event or resize observer, but it's not great for performance to do it just for a border. - It directly mutates DOM nodes that are rendered and managed by Vue with Virtual DOM. We should never mutate Vue's DOM. It has many ways to break.
- It also searches for an element with a query selector, which is not a big issue but can be easily broken by a small layout change with a class rename.
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.
Ferdinand just suggested an alternative solution for such issues in NcCheckboxRadioSwitch
: using outline-offset
-2px
. Then the outline it inside the element, and there is no issue with overflow. Maybe try using it here? Or fix it on the nextcloud/vue side...
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.
Or to try to add a 2px footer in the virtual scroller
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.
The outline-offset
is the optimal solution IMO but would rather change it in nextcloud/vue . If so, I will also add the overflow: hidden
there too.
UPD: .. or not :p , let's keep it here as the outline might be off for other apps like Mail where there is a timestamp near the top-right edge.
9b0f903
to
c4bd1d8
Compare
Signed-off-by: DorraJaouad <dorra.jaoued7@gmail.com>
c4bd1d8
to
48b1a66
Compare
Replaced the milestone with 28 as the PR targets main. |
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.
☑️ Resolves
overflow: hidden
solved it though🖌️ UI Checklist
🖼️ Screenshots / Screencasts
🚧 Tasks
🏁 Checklist