Skip to content
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

Merged
merged 9 commits into from
Jan 3, 2025

Conversation

E-Kaese
Copy link
Contributor

@E-Kaese E-Kaese commented Dec 10, 2024

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

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@E-Kaese E-Kaese requested a review from a team as a code owner December 10, 2024 15:22
@E-Kaese E-Kaese requested review from abdhalees and removed request for a team December 10, 2024 15:22
@E-Kaese E-Kaese marked this pull request as draft December 10, 2024 15:23
Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.40%. Comparing base (5fd71dd) to head (ebe7e9e).
Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

@@ -55,6 +55,10 @@ class PreferencesModalWrapper extends ModalWrapper {
findCustomPreference(): ElementWrapper | null {
return this.findByClassName(styles.custom);
}

findAdditionalContent(): ElementWrapper | null {
return this.findByClassName(styles.additionalContent);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return this.findByClassName(styles.additionalContent);
return this.findByClassName(styles['additional-content']);

@@ -181,6 +182,10 @@ export default function CollectionPreferences({
size={hasContentOnTheLeft && hasContentOnTheRight ? 'large' : 'medium'}
onDismiss={onCancelListener}
>
{/* Additional content */}
<div className={styles.additionalContent}>{additionalContent}</div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<div className={styles.additionalContent}>{additionalContent}</div>
<div className={styles['additional-content']}>{additionalContent}</div>

@gethinwebster gethinwebster added this pull request to the merge queue Jan 3, 2025
Merged via the queue into cloudscape-design:main with commit e66864b Jan 3, 2025
36 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants