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

feat(components): [Carousel] Add motion blur functionality #15603

Merged
merged 36 commits into from Feb 29, 2024

Conversation

JedediahXu
Copy link
Contributor

  • docs(components): [Carousel] Add example properties

  • docs(components): [Carousel] Add docs properties

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.

Why add motion blur 为什么要添加运动模糊

Add motion blur for a better user experience

添加运动模糊以获得更好的用户体验

特性

1、Smooth Transition Effect: Motion blur can create a smooth transition effect in the carousel, making the images appear more natural during switches and reducing the abruptness associated with sudden transitions.
平滑过渡效果: 运动模糊可以在轮播中创建一个平滑的过渡效果,使图像在切换时看起来更自然,减少突然过渡带来的突兀感。

2、Highlighting Focus: Emphasizing the primary content within the current carousel slide, making it more prominent during transitions.
突出焦点: 强调当前轮播幻灯片中的主要内容,使其在过渡期间更加突出。

3、Dynamics and Fluidity: Introducing a sense of dynamism, providing users with a smoother and captivating visual experience, thereby enhancing overall appeal.
动态和流体感: 增加了动态感,为用户提供了更流畅和引人入胜的视觉体验,从而增强整体吸引力。

4、Modernity and Artistry: Infused a touch of modernity and artistic flair to the carousel, giving the page a creative and stylish appearance.
现代感和艺术感: 为轮播增添了一丝现代感和艺术气息,让页面具有创意和时尚的外观。

5、Reducing Eye Fatigue: Smooth motion effects help alleviate potential eye strain for users when viewing carousels.
减少眼睛疲劳: 平滑的运动效果有助于减少用户在观看轮播时可能产生的眼睛疲劳

Additionally, it seems that this feature is not yet available in other Vue component libraries.
此外,这个特性在其他Vue组件库中似乎还不可用。

Any Break Changes 是否有破坏性

No destructive update
无破坏性更新

discuss 讨论

#15399

docs(components): [Carousel] Add example properties

docs(components): [Carousel] Add docs properties
Copy link

👋 @JedediahXu, 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 Jan 20, 2024
Copy link

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

Copy link

github-actions bot commented Jan 20, 2024

@github-actions github-actions bot added the CommitMessage::Qualified Qualified commit message label Jan 22, 2024
Copy link

github-actions bot commented Jan 22, 2024

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

@btea
Copy link
Collaborator

btea commented Jan 31, 2024

cc @element-plus/backers

Copy link
Member

@FrontEndDog FrontEndDog left a comment

Choose a reason for hiding this comment

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

image

Arrows should not become blurry.

packages/components/carousel/src/carousel.vue Outdated Show resolved Hide resolved
packages/components/carousel/src/carousel.vue Outdated Show resolved Hide resolved
fix(components): [Carousel] button to remove motion blur effect

fix(components): [Carousel] svg hides when motion blur is false
@JedediahXu
Copy link
Contributor Author

image

Arrows should not become blurry.

To eliminate the motion blur effect on the button, I made some slight adjustments to the layout of the button's div. Please take a look when you have a moment. Thank you for your assistance.

@JedediahXu
Copy link
Contributor Author

@FrontEndDog Hey hey, if you have time, could you please help me review this? Thank you.

Copy link
Member

@FrontEndDog FrontEndDog 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 contribute!

@JedediahXu
Copy link
Contributor Author

@kooriookami Hi, if you have time, could you please help me review this? Thank you.

Copy link
Member

@kooriookami kooriookami left a comment

Choose a reason for hiding this comment

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

When starting blur, the carousel item will shake. Is that a problem?

QQ2024228-21171-HD.mp4

docs/en-US/component/carousel.md Outdated Show resolved Hide resolved
docs/en-US/component/carousel.md Outdated Show resolved Hide resolved
docs/examples/carousel/motion-blur.vue Outdated Show resolved Hide resolved
docs/examples/carousel/motion-blur.vue Outdated Show resolved Hide resolved
packages/components/carousel/src/carousel.ts Show resolved Hide resolved
JedediahXu and others added 4 commits February 28, 2024 21:27
Co-authored-by: kooriookami <38392315+kooriookami@users.noreply.github.com>
Co-authored-by: kooriookami <38392315+kooriookami@users.noreply.github.com>
Co-authored-by: kooriookami <38392315+kooriookami@users.noreply.github.com>
…sel.ts

Co-authored-by: kooriookami <38392315+kooriookami@users.noreply.github.com>
@JedediahXu
Copy link
Contributor Author

When starting blur, the carousel item will shake. Is that a problem?

QQ2024228-21171-HD.mp4

Thank you for your review. This is not an issue. When the carousel scrolls, an SVG mask is added to it. This creates a motion blur effect as a result of the visual effect.

Copy link
Member

@kooriookami kooriookami left a comment

Choose a reason for hiding this comment

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

LGTM

@kooriookami
Copy link
Member

Have you finished?

@JedediahXu
Copy link
Contributor Author

Have you finished?

I have completed it @kooriookami

@kooriookami
Copy link
Member

Thank you for your contribution.

@kooriookami kooriookami merged commit 53bc651 into element-plus:dev Feb 29, 2024
8 checks passed
@element-bot element-bot mentioned this pull request Mar 1, 2024
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

4 participants