vueuse icon indicating copy to clipboard operation
vueuse copied to clipboard

feat(useContextMenu): new function

Open vaakian opened this issue 3 years ago • 5 comments

Description

Add custom contextMenu to an Element.

this PR depends on 2 changes:

  • https://github.com/vueuse/vueuse/pull/2143
  • https://github.com/vueuse/vueuse/pull/2161

https://user-images.githubusercontent.com/30516060/187668848-80200739-b3ce-4430-bc95-c930236816f7.mov

Additional context

I closed the previous PR because the commit history is too messy. And of course feel free to correct my English grammar issues in the files~ 🤪


What is the purpose of this pull request?

  • [ ] Bug fix
  • [x] New Feature
  • [ ] Documentation update
  • [ ] Other

Before submitting the PR, please make sure you do the following

  • [x] Read the Contributing Guidelines.
  • [x] Read the Pull Request Guidelines.
  • [x] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • [x] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • [x] Ideally, include relevant tests that fail without this PR but pass with it.

vaakian avatar Aug 31 '22 11:08 vaakian

You don't have to close the previous pr. If it is closed, you need to review it again. Can you do some unit testing on this feature and fix the previous review. #2136

An unit testing file is included in the latest commit. but t's quite verbose in some way(:

vaakian avatar Sep 01 '22 08:09 vaakian

I think any changes to other composables(e.g. useMouseInElement) should be done in separate PRs

wheatjs avatar Sep 01 '22 14:09 wheatjs

I think any changes to other composables(e.g. useMouseInElement) should be done in separate PRs

I thought the same, but this PR needs those changes to make the new function work, so I must wait until those separate PRs are merged before opening this PR, otherwise the CI would fail.

Sorry about my terrible git skill, is there a decent workaround to do this?

vaakian avatar Sep 01 '22 14:09 vaakian

It would be best to open up the other PRs and just make a note of it in this one that it depends on the other PRs. Once those are merged you can then bring this on up to date with main and then the tests will pass

wheatjs avatar Sep 01 '22 14:09 wheatjs

Thanks, sounds nice. I will do this later.

vaakian avatar Sep 01 '22 14:09 vaakian

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 06 '22 12:11 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 13 '23 10:06 stale[bot]

There seems to be no other PRs, is it time for it to move forward?

YunYouJun avatar Nov 27 '23 06:11 YunYouJun