-
Notifications
You must be signed in to change notification settings - Fork 160
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: Additional content slot in Collection Preferences #3124
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3124 +/- ##
=======================================
Coverage 96.40% 96.40%
=======================================
Files 784 784
Lines 22136 22138 +2
Branches 7534 7592 +58
=======================================
+ Hits 21341 21343 +2
- Misses 743 788 +45
+ Partials 52 7 -45 ☔ View full report in Codecov by Sentry. |
@@ -55,6 +55,10 @@ class PreferencesModalWrapper extends ModalWrapper { | |||
findCustomPreference(): ElementWrapper | null { | |||
return this.findByClassName(styles.custom); | |||
} | |||
|
|||
findAdditionalContent(): ElementWrapper | null { | |||
return this.findByClassName(styles.additionalContent); |
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.
return this.findByClassName(styles.additionalContent); | |
return this.findByClassName(styles['additional-content']); |
src/collection-preferences/index.tsx
Outdated
@@ -181,6 +182,10 @@ export default function CollectionPreferences({ | |||
size={hasContentOnTheLeft && hasContentOnTheRight ? 'large' : 'medium'} | |||
onDismiss={onCancelListener} | |||
> | |||
{/* Additional content */} | |||
<div className={styles.additionalContent}>{additionalContent}</div> |
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.
<div className={styles.additionalContent}>{additionalContent}</div> | |
<div className={styles['additional-content']}>{additionalContent}</div> |
e66864b
Description
Adds a slot to the top of the modal content for Collection Preferences, this allows user to show additional info such as preference storage details and alerts if necessary.
Related links: https://quip-amazon.com/yAJ6ACqcFlIK/Collection-Preferences-Storage-method-display-Tech-design
How has this been tested?
Manually tested and added unit tests
When running the changes in the test pages for collection preferences (simple-page) the last collection preference component will have a test alert in the modal content
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md
.CONTRIBUTING.md
.Security
checkSafeUrl
function.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.