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

fix: preview modal ui to match figma #3798

Open
wants to merge 6 commits into
base: MI-521
Choose a base branch
from
Open

Conversation

ilasw
Copy link
Contributor

@ilasw ilasw commented Nov 14, 2024

Changes

  • Source avatar too big
  • Close button not aligned to right
  • Too much padding in modal body (32 vs 24)
  • Shared post has too much margin
  • Content being rendered even if not present (with margins)
Before After
image image

Events

Did you introduce any new tracking events?

Experiment

Did you introduce any new experiments?

Manual Testing

Caution

Please make sure existing components are not breaking/affected by this PR

Preview domain

https://fix-modal-preview-ui.preview.app.daily.dev

Copy link

vercel bot commented Nov 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
daily-webapp ✅ Ready (Inspect) Visit Preview Nov 14, 2024 9:08pm
1 Skipped Deployment
Name Status Preview Updated (UTC)
storybook ⬜️ Ignored (Inspect) Nov 14, 2024 9:08pm

Copy link
Contributor

@AmarTrebinjac AmarTrebinjac left a comment

Choose a reason for hiding this comment

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

Looks good!

Some comments about using "Important"

@@ -67,7 +68,7 @@ function PostModerationModal({
size={Modal.Size.Large}
kind={Modal.Kind.FlexibleTop}
>
<Modal.Body className="gap-6">
<Modal.Body className="gap-6 !p-6">
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we not override the padding without using important? I think we should avoid it whenever necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately this is not possible due to the order in which the classes are written by TailwindCSS.
We have discussed this issue internally in the past and proposed using twMerge but it has not been adopted yet :(

Copy link
Contributor

Choose a reason for hiding this comment

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

For this it's fine, ideally all modals follow guidelines, but this is a weird modal I guess.

)}
<ModalClose onClick={modalProps.onRequestClose} />
<ModalClose
className="relative !right-0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

Copy link
Contributor

Choose a reason for hiding this comment

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

ModalClose actually accepts props to adjust right- :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice! Didn't see before, thanks for suggesting! 🙏

Copy link
Contributor

@rebelchris rebelchris left a comment

Choose a reason for hiding this comment

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

Please use props on the close one

)}
<ModalClose onClick={modalProps.onRequestClose} />
<ModalClose
className="relative !right-0"
Copy link
Contributor

Choose a reason for hiding this comment

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

ModalClose actually accepts props to adjust right- :)

@@ -67,7 +68,7 @@ function PostModerationModal({
size={Modal.Size.Large}
kind={Modal.Kind.FlexibleTop}
>
<Modal.Body className="gap-6">
<Modal.Body className="gap-6 !p-6">
Copy link
Contributor

Choose a reason for hiding this comment

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

For this it's fine, ideally all modals follow guidelines, but this is a weird modal I guess.

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.

4 participants