-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
add domProps prop to toast #6200
Conversation
Thank you @snow893 for adding this. It will be very helpful for our automation. |
11a41f0
to
2d06bb2
Compare
Thanks for the test! I think I prefer adding DOM props and the filterDOMProps to match our other components. The only hangup I have is that in the storybook example and tests, any and all toasts created would have the same testid. If we did allow DOM props, we'd be allowing |
I think i prefer this too. Some conventions use
this speaks to implementation of id passed by consumer
A test id should be "unique" in the context which it exists, but not necessarily across the app. Some components may take identify a container, with out any additional context and maybe there may be identifying children of this container. automation frameworks also support finding "lists" of elements for a single selector, so while they may not be the usual case, it is supported. Uniqueness, or the lack thereof - is the responsibility of the consumer who supplies the id. however let's stick with toast - In this case, the user should be supplying something unique to the toast, which causes us to be able to either uniquely identify each toast, If we supply the same children for a different purpose, we can provide a different test-id. it is also realistic to presume that when a client creates a toast, there will be some api where i can specify the test id of my toast, and it is now my responsibility to name my toast unique to identify myself without any compound expression. ie: |
Agreed, my only reason for commenting it was that this is a non-traditional API (ie not JSX) for creating a component. And as we see in the story, it's easy to accidentally make duplicates. Yes, you can make duplicate ids in other situations, but generally you're thinking about it in terms of the HTML attribute, not some options object. Not a blocker, just something to think about if we have any ideas to make it easier from this side. |
2d06bb2
to
25fef87
Compare
@snowystinger updated to domProps |
359bb4f
to
1fb6d08
Compare
i saw nothing test allow more toast props review props -_-
139cd6c
to
f8574c1
Compare
@reidbarber @devongovett do you have any objections / change requests? |
Closes #6206
✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project: