Skip to content

Conversation

@thetaPC
Copy link
Contributor

@thetaPC thetaPC commented Oct 10, 2024

Issue number: internal


What is the current behavior?

Test styles causes native buttons to have certain styling. This was done to spruce up the buttons used for testing purposes only. However, this ended up adding styles to native buttons within Ionic components.

What is the new behavior?

  • Test styles for native buttons are only applied to buttons that are not part of a Ionic component

Does this introduce a breaking change?

  • Yes
  • No

Other information

How to test:

  1. Run the project locally from the main branch
  2. Comment out border: 0 from .searchbar-clear-button from the searchbar md theme file (ios also works)
  3. Navigate to the basic test page: /src/components/searchbar/test/basic
  4. Notice a teal border around the clear buttons
  5. Checkout to this PR's branch
  6. Make sure steps 2-3 are done
  7. Verify that the teal border is not being applied to the clear buttons
  8. Verify that only native buttons outside of the Ionic components have a teal appearance: /src/components/loading/test/standalone and /src/components/action-sheet/test/is-open

@vercel
Copy link

vercel bot commented Oct 10, 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 14, 2024 3:29pm

@github-actions github-actions bot added the package: core @ionic/core package label Oct 10, 2024
--background: #dddddd;
}
ion-content button {
ion-content button.trigger {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change was needed to override the padding from styles.css.

@thetaPC thetaPC marked this pull request as ready for review October 11, 2024 21:33
@thetaPC thetaPC requested a review from a team as a code owner October 11, 2024 21:33
@thetaPC thetaPC requested review from BenOsodrac and christian-bromann and removed request for christian-bromann October 11, 2024 21:33
Copy link
Contributor

@tanner-reits tanner-reits left a comment

Choose a reason for hiding this comment

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

Tested changes and looks good.

Might be worth noting that this only affected scoped components. The global test styles cannot seep into the Shadow DOM of components so they were not being affected. And, the selector used in the fixed (sc-ion-*) is only added to elements that are a part of components with scoped encapsulation.

@thetaPC thetaPC added this pull request to the merge queue Oct 14, 2024
Merged via the queue into main with commit cdb4456 Oct 14, 2024
48 checks passed
@thetaPC thetaPC deleted the ROU-11256 branch October 14, 2024 15:59
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.

4 participants