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(overlays): do not overwrite id set in htmlAttributes #29722

Merged
merged 11 commits into from
Jul 24, 2024

Conversation

mikelhamer
Copy link
Contributor

@mikelhamer mikelhamer commented Jul 19, 2024

Issue number: resolves #29712


What is the current behavior?

In every type of overlay, the auto incremented overlay id is overwriting any id set in htmlAttributes.

What is the new behavior?

The id in htmlAttributes now takes precedence.

Does this introduce a breaking change?

  • Yes
  • No

Other information

@mikelhamer mikelhamer requested a review from a team as a code owner July 19, 2024 06:16
@mikelhamer mikelhamer requested a review from thetaPC July 19, 2024 06:16
Copy link

vercel bot commented Jul 19, 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 Jul 19, 2024 2:38pm

@mikelhamer
Copy link
Contributor Author

@sean-perkins I've created this PR to fix #29712 , but something I noticed is that the overlay ID is being used in the picker-legacy component, but not in the the new picker component.
Should overlay ID be added there as well, along with making sure it doesn't overwrite the id in htmlAttributes?

@sean-perkins
Copy link
Contributor

@mikelhamer great observation, you are correct in your current implementation pattern. ion-picker-legacy requires this fix, but ion-picker is not an overlay, it is optionally presented in one if a developer configures it with a popover or modal. I've updated the original issue description to correct this.

@mikelhamer
Copy link
Contributor Author

Awesome! The more you know... 🌈 ⭐️

…ot overwritten when it has an integer value of 0

Co-authored-by: Sean Perkins <[email protected]>
Copy link
Contributor

@sean-perkins sean-perkins left a comment

Choose a reason for hiding this comment

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

Awesome 👏 thanks for knocking these out!

@mikelhamer
Copy link
Contributor Author

My pleasure! It was an awesome learning experience.

Copy link
Member

@brandyscarney brandyscarney 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 the PR! Great work. 🎉

@sean-perkins sean-perkins added this pull request to the merge queue Jul 24, 2024
Merged via the queue into ionic-team:main with commit 92ce563 Jul 24, 2024
47 checks passed
@mikelhamer
Copy link
Contributor Author

Thank you! 🚀

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

Successfully merging this pull request may close these issues.

bug: Overlays override id assigned through htmlAttributes
3 participants