-
Notifications
You must be signed in to change notification settings - Fork 25
fix: only render drop content when opened #1498
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
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.
Pull Request Overview
This PR modifies the useFileListHeaderPosition composable to defer the initial refresh call until after the next Vue tick when the component is mounted. Previously, refresh() was called directly in onMounted; now it's wrapped in an async callback that awaits nextTick() before calling refresh().
- Wraps the
onMountedrefresh call in an async function that awaitsnextTick()before executing
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/web-pkg/src/composables/fileListHeaderPosition/useFileListHeaderPosition.ts
Outdated
Show resolved
Hide resolved
bd3665d to
68afbf1
Compare
68afbf1 to
3e451ff
Compare
This fixes a small UI glitch when closing the file context menu and an unwanted displacement of the table header row in certain edge cases.
3271965 to
5027331
Compare
| it.each<SizeType | 'remove'>([ | ||
| 'xsmall', | ||
| 'small', | ||
| 'medium', | ||
| 'large', | ||
| 'xlarge', | ||
| 'xxlarge', | ||
| 'remove' | ||
| ])('handles padding size prop for value %s', async (size) => { | ||
| const { wrapper } = dom({ paddingSize: size }) | ||
|
|
||
| const drop = wrapper.findComponent({ name: 'oc-drop' }) | ||
| await nextTick() | ||
|
|
||
| const tailwindClassObj = getTailwindPaddingClass(size) | ||
| const tailwindClass = Object.entries(tailwindClassObj).find(([, v]) => v)?.[0] | ||
| expect(drop.html().includes(tailwindClass)).toBeTruthy() | ||
| }) | ||
|
|
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.
I added a dedicated unit test for getTailwindPaddingClass instead of testing it implicitly here.
5027331 to
4a41c21
Compare
kulmann
left a comment
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 the fix, seems to work 💪
fix: only render drop content when opened
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
This fixes a small UI glitch when closing the file context menu and an unwanted displacement of the table header row in certain edge cases.
fixes #1477