8000 feat(useElementOverflow): new function by inside5545 · Pull Request #4094 · vueuse/vueuse · GitHub
[go: up one dir, main page]

Skip to content

feat(useElementOverflow): new function #4094

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

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

inside5545
Copy link
@inside5545 inside5545 commented Jul 11, 2024

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

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

Warning: Slowing down new functions

As the VueUse audience continues to grow, we have been inundated with an overwhelming number of feature requests and pull requests. As a result, maintaining the project has become increasingly challenging and has stretched our capacity to its limits. As such, in the near future, we may need to slow down our acceptance of new features and prioritize the stability and quality of existing functions. Please note that new features for VueUse may not be accepted at this time. If you have any new ideas, we suggest that you first incorporate them into your own codebase, iterate on them to suit your needs, and assess their generalizability. If you strongly believe that your ideas are beneficial to the community, you may submit a pull request along with your use cases, and we would be happy to review and discuss them. Thank you for your understanding.


Description

fixes #3686

this function helps to react a dom's overflow state, the scenario is that sometimes we need to determine if a container dom become overlength and then need to add some style. for example, maybe the text is too long, we need to add a tooltip bubble to it.

Additional context

I already see the [Warning: Slowing down new functions],and I often create common components and codes, I think useElementOverflow is really necessary,so I take some time to create the hook,directive and components.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jul 11, 2024
onUpdated?: ResizeObserverCallback | MutationCallback
}

export function useElementOverflow(target: MaybeComputedElementRef, option: UseElementOverflowOptions = {}) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add some description for it ? and options

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zyyv Thanks,I added some for it.

@OrbisK
Copy link
Collaborator
OrbisK commented Dec 30, 2024

Hey @inside5545 thanks for your PR,

In order to eventually merge this, we need to cover this with tests so that it is easier to maintain. Could you imagine writing the tests for this, or do you need any support? Please let me know :)

@inside5545
Copy link
Author

@OrbisK Thank you for your reply, of course, but I have a lot of work at the end of the year, so I may do it slowly. I would appreciate it if someone could help me finish it. Or if you're sure it's going to be merged, I'll try harder to find the time to add the tests

@OrbisK OrbisK removed the needs test label Jan 3, 2025
@OrbisK
Copy link
Collaborator
OrbisK commented Jan 3, 2025

this should also fix #3686

@inside5545
Copy link
Author

@OrbisK I'll try to find the time to do it, but I still want someone to help me finish it. TAT~

@OrbisK
Copy link
Collaborator
OrbisK commented Jan 3, 2025

How can I help? What is still missing?

@inside5545
Copy link
Author

@OrbisK I added tests today,but CI workflow seems to have a few problem,I haven't had a chance to check.The second thing is that #3686 you just mentioned,it still needs some time.I'm not quite sure when I'll have time to deal with it. There's too much to do at Chinese New Year. TAT~

@OrbisK
Copy link
Collaborator
OrbisK commented Jan 3, 2025

@OrbisK I added tests today,but CI workflow seems to have a few problem,I haven't had a chance to check.The second thing is that #3686 you just mentioned,it still needs some time.I'm not quite sure when I'll have time to deal with it. There's too much to do at Chinese New Year. TAT~

I will check the CI.

I think if this will be merged. #3686 is also completed :) no actions to do there

@inside5545
Copy link
Author

@OrbisK I added tests today,but CI workflow seems to have a few problem,I haven't had a chance to check.The second thing is that #3686 you just mentioned,it still needs some time.I'm not quite sure when I'll have time to deal with it. There's too much to do at Chinese New Year. TAT~

I will check the CI.

I think if this will be merged. #3686 is also completed :) no actions to do there

THANK YOU so so so much ~!

@inside5545
Copy link
Author

@OrbisK I've updated the code, please merge the PR if it is convenient

@thomas-storyblok
Copy link

Is there a plan for when this will be merged?

@OrbisK OrbisK requested review from 43081j and ilyaliao May 19, 2025 08:00
43081j
43081j previously approved these changes May 19, 2025
Copy link
Collaborator
@43081j 43081j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me 👍

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer new function size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Truncation Detection
7 participants
0