Skip to content

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

Merged
liamdebeasi merged 4 commits into
ionic-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 into
ionic-team:feature-7.3from
luisbytes:feat-button-cancel-part

Conversation

@luisbytes

@luisbytesluisbytes commented Aug 3, 2023

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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

@github-actionsgithub-actionsBot added the package: core @ionic/core package label Aug 3, 2023
@liamdebeasi

Copy link
Copy Markdown
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.

@liamdebeasiliamdebeasi left a comment

Copy link
Copy Markdown
Contributor

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.

Comment threadcore/src/components/toast/toast.tsx Outdated
Comment threadcore/src/components/toast/toast.tsx Outdated
Comment threadcore/src/components/toast/test/buttons/toast.e2e.ts Outdated

@liamdebeasiliamdebeasi left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

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

@liamdebeasiliamdebeasi changed the title feat(toast): add part for button cancelfeat(toast): add part for cancel buttonAug 10, 2023
@liamdebeasiliamdebeasi changed the title feat(toast): add part for cancel buttonfeat(toast): add shadow part for cancel buttonAug 10, 2023

@liamdebeasiliamdebeasi left a comment

Copy link
Copy Markdown
Contributor

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.3August 10, 2023 14:44
@liamdebeasi
liamdebeasi merged commit e9faf54 into ionic-team:feature-7.3Aug 10, 2023
@liamdebeasi

Copy link
Copy Markdown
Contributor

Merged. Thank you very much!

@luisbytes

Copy link
Copy Markdown
ContributorAuthor

@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 freeto 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

@luisbytes@liamdebeasi