Skip to content

Conversation

@JammingBen
Copy link
Contributor

@JammingBen JammingBen commented Nov 3, 2025

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

@JammingBen JammingBen self-assigned this Nov 3, 2025
Copilot AI review requested due to automatic review settings November 3, 2025 14:53
Copy link
Contributor

Copilot AI left a 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 onMounted refresh call in an async function that awaits nextTick() before executing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JammingBen JammingBen marked this pull request as draft November 3, 2025 15:11
@JammingBen JammingBen force-pushed the fix/table-header-offset branch from bd3665d to 68afbf1 Compare November 4, 2025 06:37
@JammingBen JammingBen changed the title fix: file table offset fix: only render drops when they are opened Nov 4, 2025
@JammingBen JammingBen force-pushed the fix/table-header-offset branch from 68afbf1 to 3e451ff Compare November 4, 2025 08:33
@JammingBen JammingBen changed the title fix: only render drops when they are opened fix: only render drop content when opened Nov 4, 2025
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.
@JammingBen JammingBen force-pushed the fix/table-header-offset branch from 3271965 to 5027331 Compare November 4, 2025 09:13
Comment on lines -56 to -74
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()
})

Copy link
Contributor Author

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.

@JammingBen JammingBen force-pushed the fix/table-header-offset branch from 5027331 to 4a41c21 Compare November 4, 2025 09:16
@JammingBen JammingBen marked this pull request as ready for review November 4, 2025 09:42
Copy link
Contributor

@kulmann kulmann left a 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 💪

@JammingBen JammingBen merged commit cc5b93b into main Nov 5, 2025
28 checks passed
@JammingBen JammingBen deleted the fix/table-header-offset branch November 5, 2025 10:04
@openclouders openclouders mentioned this pull request Nov 5, 2025
1 task
openclouders pushed a commit that referenced this pull request Nov 5, 2025
fix: only render drop content when opened
@JammingBen
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
stable-4.2

Questions ?

Please refer to the Backport tool documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Space description edit moves table header

3 participants