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(dialog): implement <rh-dialog> #288

Merged
merged 33 commits into from
Jun 16, 2022
Merged

feat(dialog): implement <rh-dialog> #288

merged 33 commits into from
Jun 16, 2022

Conversation

bennypowers
Copy link
Member

@bennypowers bennypowers commented May 18, 2022

What I did

  1. import and extend PfeModal
  2. Add variant=video attribute
  3. Add open boolean attr
  4. Position and style close button per https://ux.redhat.com/components/modal/

Testing Instructions

  1. deploy preview is available at https://deploy-preview-288--red-hat-design-system.netlify.app/components/dialog/
  2. there are no regression tests or unit tests - yet

Notes to Reviewers

  1. max-width of the dialog is set to min(90%, 1140px). the 1140px part is taken from the XD, the 90% part, I made up 🙈

  2. specs on ux-dot say the dialog should have an overlay that is

    black solid with opacity

    Checking the provided graphic for video, the final rendered colour for the overlay was #898989 for a video dialog on a white background. Setting the video dialog overlay background colour to this got me to #8f8f8f, which was as close as I came

    :host([variant=video][open]) [part=overlay] {
      background-color: rgba(0, 0, 0, .45);
    }
  3. is variant the right attr?

  4. What's the correct hover-state colour for the video dialog close button?

Closes #283

@changeset-bot
Copy link

changeset-bot bot commented May 18, 2022

🦋 Changeset detected

Latest commit: 50bf342

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@rhds/elements Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented May 18, 2022

Deploy Preview for red-hat-design-system ready!

Name Link
🔨 Latest commit 50bf342
🔍 Latest deploy log https://app.netlify.com/sites/red-hat-design-system/deploys/62ab3cb1e1b3070008e79501
😎 Deploy Preview https://deploy-preview-288--red-hat-design-system.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@bennypowers bennypowers changed the title Feat/dialog feat(dialog): implement <rh-dialog> May 18, 2022
@bennypowers bennypowers marked this pull request as draft May 18, 2022 10:53
@bennypowers
Copy link
Member Author

@coreyvickery @marionnegp @ronniemcbride do we have tokens for grid column / gutter widths? The spec defines widths in terms of number of columns, not e.g. container %.

@bennypowers
Copy link
Member Author

@RedHat-UX/designers searching the rh-repo design tokens spreadsheet, I couldn't find #6a6e73 as specified on ux.redhat.com/components/modal, but that colour was specified for the close button for a standard dialog. Should I use --rh-color-text-secondary-on-light, #6c6c6c instead?

@bennypowers bennypowers force-pushed the feat/dialog branch 2 times, most recently from 226bf75 to 8307012 Compare May 19, 2022 07:23
@bennypowers bennypowers marked this pull request as ready for review May 19, 2022 08:55
@bennypowers bennypowers enabled auto-merge (rebase) May 19, 2022 09:04
@bennypowers bennypowers disabled auto-merge May 19, 2022 12:12
@bennypowers bennypowers marked this pull request as draft May 19, 2022 12:13
@bennypowers
Copy link
Member Author

Ok I bumped this back down to draft for 2 reasons:

  1. We need @coreyvickery 's review once he gets back from PTO
  2. I did some work in pfe-modal to make it more pf1:1, so I'd like to merge that first.
    I'll link to the PR in PFE shortly

@marionnegp
Copy link
Collaborator

@RedHat-UX/designers searching the rh-repo design tokens spreadsheet, I couldn't find #6a6e73 as specified on ux.redhat.com/components/modal, but that colour was specified for the close button for a standard dialog. Should I use --rh-color-text-secondary-on-light, #6c6c6c instead?

Sorry I missed this yesterday! @coreyvickery had adjusted the grays while making the design tokens spreadsheet, so that's likely why it's used in the component but is missing from the tokens. I think that's the closest gray, but it's probably best to check with Corey.

@marionnegp
Copy link
Collaborator

@coreyvickery @marionnegp @ronniemcbride do we have tokens for grid column / gutter widths? The spec defines widths in terms of number of columns, not e.g. container %.

I added a comment in the tokens spreadsheet about adding grid column and gutter widths. I'm not sure if the size tokens will work here.

@bennypowers
Copy link
Member Author

Rebased just now

@bennypowers
Copy link
Member Author

bennypowers commented May 24, 2022

Some outstanding API questions:

@bennypowers
Copy link
Member Author

This needs a rebase after #325

@heyMP
Copy link
Member

heyMP commented Jun 6, 2022

  • Should we have type="video" or would we rather <rh-video-dialog>.

I think the video type makes sense to me. It's close enough to dialog.

This is removed in the next release of PFE.

@heyMP
Copy link
Member

heyMP commented Jun 6, 2022

@bennypowers There is a z-index issue on the first dialog demo on the demo site I believe.

Screen Shot 2022-06-05 at 9 13 56 PM

@bennypowers
Copy link
Member Author

Rebased just now. @heyMP I couldn't reproduce your issue, probably it was fixed with the new dependencies? 🤷

@bennypowers bennypowers enabled auto-merge (rebase) June 16, 2022 14:32
Copy link
Member

@heyMP heyMP left a comment

Choose a reason for hiding this comment

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

Awesome job @bennypowers. Lots of hard work went into this. LGTM!

@bennypowers bennypowers merged commit 2457563 into main Jun 16, 2022
@bennypowers bennypowers deleted the feat/dialog branch June 19, 2022 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done ☑️
Development

Successfully merging this pull request may close these issues.

[feat]: <pfe-modal> to <rh-dialog> ready to migrate
3 participants