-
Notifications
You must be signed in to change notification settings - Fork 205
refactor: Apply padding to option-content-div instead of selectable-item outer-div #4070
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
Conversation
a371e6c to
d2d1275
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4070 +/- ##
=======================================
Coverage 97.12% 97.12%
=======================================
Files 864 864
Lines 25325 25330 +5
Branches 9137 9140 +3
=======================================
+ Hits 24597 24602 +5
+ Misses 722 681 -41
- Partials 6 47 +41 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c42d2ea to
47d35a0
Compare
pages/selectable-item/common.tsx
Outdated
| highlighted: [false, true], | ||
| disabled: [false, true], | ||
| children: [simpleOption], | ||
| disableContentStyling: [true], |
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.
Shouldn't disableContentStyling be [false] (for each item)?
| export default function InputPermutations() { | ||
| return ( | ||
| <> | ||
| <h1>Selectable item permutations</h1> |
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.
Minor: suggest to change the title to reflect the difference between this page and the one that it was copied from.
| <> | ||
| <h1>Selectable item permutations</h1> | ||
| <ScreenshotArea> | ||
| <SpaceBetween size="xs"> |
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.
I don't think this SpaceBetween does anything, since it conatins one single element.
| } | ||
| &.highlighted { | ||
| color: awsui.$color-text-dropdown-item-highlighted; | ||
| > .selectable-item-content { |
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.
Nitpick: these two nested rulesets could be merged into one
&.highlighted > .selectable-item-content { ... }
Description
Currently, the hierarchical padding is applied to the same div as the border and the padding (border-width padding) when selected/unselected. This PR moves this "business"-padding (e.g. hierarchical padding, general spacing padding) to the inner option-content div, which was previously only used for testing.
This is needed so we can extend the selectable-item components to allow for custom styling in the content by removing this "business"-padding.
Related links, issue #, if available: n/a
How has this been tested?
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.