-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix(copybutton): react and wc parity #18318
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(copybutton): react and wc parity #18318
Conversation
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #18318 +/- ##
==========================================
- Coverage 84.13% 84.10% -0.04%
==========================================
Files 408 408
Lines 14460 14466 +6
Branches 4673 4676 +3
==========================================
Hits 12166 12166
- Misses 2128 2133 +5
- Partials 166 167 +1 ☔ View full report in Codecov by Sentry. |
Hey, thanks for putting up this PR! Thanks @laurenmrice for assigning yourself as a reviewer to be sure we get a ux and visual review on this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @anamikaanu96, just had a couple questions below, otherwise this PR looks good to me.
-
There is an
onClick
prop in React but not in the Playground story of Web components. Is that intentional? -
Also a prop naming convention inconsistency I wanted to clarify: It is called ”autoAlign” in React and it is called “autoalign” in Web components. Just wanted to make sure the lowercase a in "align" was intentional and if it matters or not. My thoughts were thinking we should keep it exactly the same as React when possible?
-
We should remove the Playground story and add the controls to the Default story, to match React storybook.
Note: I am opening a separate bug issue about the tooltip properties and an existing potential Safari browser bug, which is not related to this PR.
Hey @laurenmrice Thanks for reviewing! I have done the changes you have mentioned in point 2 and 3. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anamikaanu96 Thanks for this! The styles are off with -start
and -end
alignments:
Ah, got it, thanks! No I think you're right, better to deal with separately. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
d100cac
Hey there! v11.76.0 was just released that references this issue/PR. |
Closes #17928
Copy button - react and wc parity
Changelog
Changed
Testing / Reviewing
Found that three props (align, autoAlign, and as) were missing and added the align and autoAlign props.
As per the discussion I haven't included as prop.
Tested using storybook , can be checked in storybook controls.