Skip to content

feat(toast): add shadow part for cancel button#27921

Merged
liamdebeasi merged 4 commits intoionic-team:feature-7.3from
luisbytes:feat-button-cancel-part
Aug 10, 2023
Merged

feat(toast): add shadow part for cancel button#27921
liamdebeasi merged 4 commits intoionic-team:feature-7.3from
luisbytes:feat-button-cancel-part

Conversation

@luisbytes
Copy link
Contributor

@luisbytes luisbytes commented Aug 3, 2023

Issue number: resolves #27920


What is the current behavior?

It is not possible to style the buttons with the cancel role in a toast since it uses shadow DOM and there are no exposed parts or CSS variables for the cancel buttons.

What is the new behavior?

  • Exposes the following part of a toast: button with rol cancel
  • Update the e2e toast test to check if the button-cancel part is exposed

Does this introduce a breaking change?

  • Yes
  • No

Change the css shadow part for all buttons added to a toast with the cancel role from 'button' to 'button-cancel'.

Other information

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions github-actions bot added the package: core @ionic/core package label Aug 3, 2023
@liamdebeasi
Copy link
Contributor

Thanks for the PR! We appreciate you contributing to Ionic. I discussed this with the team, and we think this is a good feature to add. Our next step is to do a design document to make sure we are implementing this feature in a way that addresses the original use case.

Once that is done, someone from the team will review this PR and get it ready to merge. Let me know if you have any questions.

Copy link
Contributor

@liamdebeasi liamdebeasi left a comment

Choose a reason for hiding this comment

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

Overall this looks good! A few small changes.

Copy link
Contributor

@liamdebeasi liamdebeasi left a comment

Choose a reason for hiding this comment

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

Can you also rebase this off feature-7.3? This is the next minor release we are targeting.

@luisbytes
Copy link
Contributor Author

Can you also rebase this off feature-7.3? This is the next minor release we are targeting.

Yes, I'll get on it

@luisbytes
Copy link
Contributor Author

@liamdebeasi Hello, I'm ready with the changes you suggested. I failed to do the rebase.

@liamdebeasi liamdebeasi changed the title feat(toast): add part for button cancel feat(toast): add part for cancel button Aug 10, 2023
@liamdebeasi liamdebeasi changed the title feat(toast): add part for cancel button feat(toast): add shadow part for cancel button Aug 10, 2023
Copy link
Contributor

@liamdebeasi liamdebeasi left a comment

Choose a reason for hiding this comment

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

Great work! I can take care of targeting the feature-7.3 branch.

@liamdebeasi liamdebeasi changed the base branch from main to feature-7.3 August 10, 2023 14:44
@liamdebeasi liamdebeasi merged commit e9faf54 into ionic-team:feature-7.3 Aug 10, 2023
@liamdebeasi
Copy link
Contributor

Merged. Thank you very much!

@luisbytes
Copy link
Contributor Author

@liamdebeasi Thank you, I hope to contribute more to the community.

@luisbytes luisbytes deleted the feat-button-cancel-part branch April 12, 2025 23:35
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.

feat: toast, add shadow part to customize cancel button

2 participants