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: Duplicate - Blue dialog contribution #2946

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

cansuaa
Copy link
Contributor

@cansuaa cansuaa commented Oct 29, 2024

Description

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

  • 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.

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.45%. Comparing base (2a72da2) to head (ecbc736).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2946   +/-   ##
=======================================
  Coverage   96.45%   96.45%           
=======================================
  Files         790      790           
  Lines       22294    22294           
  Branches     7252     7252           
=======================================
  Hits        21504    21504           
  Misses        783      783           
  Partials        7        7           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

const dialogRef = useRef<HTMLDivElement>(null);
const triggerRef = useRef<HTMLElement | null>(null);

useEffect(() => {
Copy link
Member

Choose a reason for hiding this comment

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

I think it is better to manage the focus transition outside of this component. For instance, you can forward the ref to the dialog's root so that it will be possible to do dialogRef.focus() from the outside code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It makes sense, done in the new revision. I didn't move trigger though because it doesn't really have one right now so I will add that when the dialog is getting included into the demo

Comment on lines +26 to +38
.dismiss {
order: 1;
padding-inline-end: awsui.$space-container-horizontal;
}

.inner-content {
flex: 1;
overflow: hidden; // prevent textarea from growing outside of the container

padding-block-start: awsui.$space-scaled-s;
padding-block-end: awsui.$space-scaled-l;
padding-inline-start: awsui.$space-container-horizontal;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved the padding stylings to dismiss and inner-content because once overflow hidden was passed the focus highlight of left most checkbox was being cut.

border-end-start-radius: awsui.$border-radius-container;
border-end-end-radius: awsui.$border-radius-container;

outline-offset: 5px;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checked with Lin, she also agreed that this one looks better, other way of adding the focus highlight made the dialog look like an alert

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.

3 participants