Conversation
02d5569 to
e4b0293
Compare
b34b96a to
1682559
Compare
JammingBen
commented
Feb 19, 2026
| </oc-button> | ||
| <context-menu-quick-action | ||
| ref="contextMenuButtonRef" | ||
| :ref="(el: any) => (contextMenuDrops[item.id] = el?.drop)" |
Member
Author
There was a problem hiding this comment.
any cast can be removed when we switch to script setup. But I don't want to bloat this already big PR even more.
Comment on lines
-66
to
-79
| it('should show the context menu on right click', async () => { | ||
| const groups = getGroupMocks() | ||
| const spyDisplayPositionedDropdown = vi.mocked(displayPositionedDropdown) | ||
| const { wrapper } = getWrapper({ mountType: mount, groups }) | ||
| await wrapper.find(`[data-item-id="${groups[0].id}"]`).trigger('contextmenu') | ||
| expect(spyDisplayPositionedDropdown).toHaveBeenCalledTimes(1) | ||
| }) | ||
| it('should show the context menu on context menu button click', async () => { | ||
| const groups = getGroupMocks() | ||
| const spyDisplayPositionedDropdown = vi.mocked(displayPositionedDropdown) | ||
| const { wrapper } = getWrapper({ mountType: mount, groups }) | ||
| await wrapper.find('.groups-table-btn-action-dropdown').trigger('click') | ||
| expect(spyDisplayPositionedDropdown).toHaveBeenCalledTimes(1) | ||
| }) |
Member
Author
There was a problem hiding this comment.
We can't unit test that the drop is being called because the ref to the drop element doesn't exist.
| }, | ||
|
|
||
| methods: { | ||
| cycleRoles(event: KeyboardEvent) { |
Member
Author
There was a problem hiding this comment.
This was broken for the link role dropdown and other drop menus don't have this functionality, hence I decided to remove it.
| expect(wrapper.html()).toMatchSnapshot() | ||
|
|
||
| expect(wrapper.findAll('#oc-files-context-menu > ul').length).toEqual(menuSections.length) | ||
| expect(wrapper.findAll('.oc-files-context-action-drop').length).toEqual(3) |
Member
Author
There was a problem hiding this comment.
Drop menus are not rendered initially anymore.
4888ff7 to
f290db3
Compare
We don't use this for other drop menus and it was broken for public links anyways.
f290db3 to
82fc531
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces tippy.js with the more modern Floating UI. This results in some breaking changes when using the
OcDropcomponent.OcDropbreaking changespopperOptionshas been removedtargethas been removedoffsetis now supposed to be given as a single digit number and controls the vertical offsettippyhas been removedtoggleeven inmanualmode.Floating UI in general is more lightweight and much more similar to a JS native implementation. It basically offers you a set of helpers to position your floating element correctly, but you have to take care of things like event handling, showing/hiding the floating element etc.
closes #1929