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(segment): add segment-view and segment-content components #29882

Closed
wants to merge 40 commits into from

Conversation

brandyscarney
Copy link
Member

@brandyscarney brandyscarney commented Sep 17, 2024

Issue number: resolves #17804


What is the current behavior?

Developers need to create their own components, use div elements, or integrate Swiper to connect an <ion-segment> with a swipeable content view:

What is the new behavior?

  • Fixes a bug where the bottom highlight on <ion-segment> does not animate when the value changes dynamically
  • Adds <ion-segment-view> component to act as a scroll snap container
  • Adds <ion-segment-content> component to contain each content that should be linked to a segment button
  • Adds tests for ion-segment-view to verify that the proper content displays based on the current segment button

Does this introduce a breaking change?

  • Yes
  • No

Other information

Copy link

vercel bot commented Sep 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 10, 2024 4:06pm

@github-actions github-actions bot added package: core @ionic/core package package: angular @ionic/angular package package: vue @ionic/vue package package: react @ionic/react package labels Sep 17, 2024
* @param smoothScroll: Whether to animate the scroll transition.
*/
@Method()
async setContent(id: string, smoothScroll = true) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This could be an internal method if we want, but I added an example using it because it seems useful to expose it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: angular @ionic/angular package package: core @ionic/core package package: react @ionic/react package package: vue @ionic/vue package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants