Skip to content
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

fix(components): [collapse-transition] collapse get el exists height #14801

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

Innei
Copy link
Contributor

@Innei Innei commented Nov 10, 2023

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow contributing guide English | (中文 | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer to relative issues for your PR.

Description

🤖 Generated by Copilot at ff5b1b3

The pull request enhances the el-collapse-transition component by using the element's height and requestAnimationFrame for smoother transitions. It also updates the docs/examples/transitions/collapse.vue file to show the component's behavior with different content heights.

Related Issue

The problem I found when repairing affine.pro UI toeverything/AFFiNE.pro#112

Explanation of Changes

🤖 Generated by Copilot at ff5b1b3

  • Improve el-collapse-transition component to handle elements with fixed or min-height (link, link)
    • Store existing height in data attribute before transition starts (link)
    • Use requestAnimationFrame and stored height to set maxHeight in enter hook (link)
  • Adjust height of div element and content in collapse.vue example to demonstrate transition effect better (link)
    • Remove height from div element to allow el-collapse-transition to expand and collapse (link)
    • Add style attribute to v-show directive to set content height to 400px (link)

Signed-off-by: Innei <i@innei.in>
Copy link

👋 @Innei, seems like this is your first time contribution to element-plus.

  • Please make sure that you have read our guidelines and code of conduct before making a contribution.
  • You can comment with /label Components:[component_name] to add a label for which component you are working on.
  • You may join our Discord for staying tuned.

@pull-request-triage pull-request-triage bot added 1st contribution Their very first contribution Needs Review labels Nov 10, 2023
Copy link

github-actions bot commented Nov 10, 2023

Copy link

Hello @Innei, thank you for contributing to element-plus, please see our guideline to see how to make contribution

Copy link

🧪 Playground Preview: https://element-plus.run/?pr=14801
Please comment the example via this playground if needed.

@Innei
Copy link
Contributor Author

Innei commented Nov 11, 2023

/label Components:collapse-transition

@btea btea changed the title fix: collapse get el exists height fix(components): [collapse-transition] collapse get el exists height Dec 14, 2023
Copy link
Collaborator

@btea btea left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution!

@btea btea merged commit 6befedd into element-plus:dev Dec 14, 2023
13 checks passed
@element-bot element-bot mentioned this pull request Dec 15, 2023
3 tasks
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.

None yet

3 participants