-
Notifications
You must be signed in to change notification settings - Fork 209
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
feat(opacity-checkerboard): adding new component #3416
Conversation
Tachometer resultsCurrently, no packages are changed by this PR... |
Is there an issue where you’ve outlined the goals, API, and usage of an addition like this? |
There's still no issue or consumption instructions in this change. Please add that somewhere before I can productively review these changes. |
I worked on the CSS for this component, just wanted to share the context I have. It is not in the design docs site but is in contributions (https://spectrum-contributions.corp.adobe.com/page/opacity-checkerboard-beta/) This component is used by Swatch, ColorSlider, Thumbnail, and ColorHandle to display alpha transparency. |
@jenndiaz based off of the info in that PR, I'm not sure that building this as a custom element is the right call here. This seems like it is more of a shared CSS rule(s) rather than shared functionality. @vjosyula could you look into leveraging this similar to how the |
f5c341c
to
d2460bd
Compare
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.
Great start. If we had docs, I'd be happy to merge to main
with the couple of notes here. A project branch path with actual implementation to educate the documentation process also works great here. Feel free to take which ever path you're more comfortable with here.
d2460bd
to
f47bc22
Compare
23e852e
to
53c4923
Compare
@Westbrook I have updated the docs with the usage part to the actual documentation. Let me know if you are expecting any more changes on this. |
My question here is do we find this page helpful to a developer looking to leverage this new feature? For instance, in #3507 it's noted that this feature is not currently leveraged in that pattern. If we were to ask the contributor there to leverage this, would the above link be enough for them to do so? |
I noticed clear button is not added as a part of the SWC components list, is there any specific reason we are adding opacity Checkerboard? |
Most times when there is documentation missing (which is too often), it happens because no one ever asked for it loud enough. I'd much rather documentation be missing than not really usable, but the line there is much more personal that I can really define. If we chose to exclude this from the docs, we could remove the README.md, and then the contents are no longer at question. I'd like to say that I specifically chose not to include Clear Button in the docs because "it's only ever used in the Clear Button element", but I'd be lying if I said I had thought that far ahead. The CSS values are not documented, and if we intended for them to be used in apps, then we should absolutely get an issue open to expand the docs to include that. What I can say, the Clear Button and Close Button package are primarily left overs from a time when we couldn't consume more than one CSS package in a single SWC package (previously they were all part of the Button package from CSS, which is why the custom element definitions are where they are). It might be time to deprecate those packages and resume consume the CSS for them directly in Button, where Clear Button and Close Button are documented as custom elements. As a consumer of SWC, I do know that we've copy/pasted the previous opacity CSS into other projects in the past, which points to me wanting the contents of this package documented at some point. I don't want to block this from moving forward, so I'll follow your lead here, either remove the README.md so the package is not included in the docs or expand the README.md so that usage instructions and the like are included, and we can get this merged. Sound good? |
Yup I think as this opacity-checkerboard can be used in above mentioned components, keeping the README.md and create a usage section will be helpful and a future proof solution. I will get this plan out to @jnjosh and have someone from the team start working on this. Thanks |
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.
Please move this from the packages directory to the tools directory.
4ea87a3
to
a7cfc75
Compare
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.
Made some nuanced changes to the docs site to better outline what this does for others.
Also, it seems like you never ran yarn
to install the package and build the spectrum-*.css
file, but I'm not sure.
See the changes here.
Thanks for getting this together! Hopefully this means that we can see this leveraged in some patterns, soon?
a7cfc75
to
abd9f07
Compare
Description
Related issue(s)
Motivation and context
How has this been tested?
Screenshots (if appropriate)
Types of changes
Checklist
Best practices
This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against
main
.