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

Modal: fix margin between text and buttons #1658

Merged
merged 19 commits into from
Mar 8, 2023

Conversation

MewenLeHo
Copy link
Contributor

@MewenLeHo MewenLeHo commented Nov 23, 2022

Related issues

Closes #1331

Description

Adding spacing utilities.

Motivation & Context

Respect DSM for modals: https://system.design.orange.com/0c1af118d/p/16d9f3-modals/b/774d3d/i/66611040

Types of change

  • New feature (non-breaking change which adds functionality)

Live previews

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • My change introduces changes to the migration guide
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@netlify
Copy link

netlify bot commented Nov 23, 2022

Deploy Preview for boosted ready!

Name Link
🔨 Latest commit be6c3cf
🔍 Latest deploy log https://app.netlify.com/sites/boosted/deploys/637e1c1c4e9e9b000825e499
😎 Deploy Preview https://deploy-preview-1658--boosted.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.

@MewenLeHo

This comment was marked as outdated.

@netlify
Copy link

netlify bot commented Nov 23, 2022

Deploy Preview for boosted ready!

Name Link
🔨 Latest commit 20ee710
🔍 Latest deploy log https://app.netlify.com/sites/boosted/deploys/64084de0e63d0a0008868aff
😎 Deploy Preview https://deploy-preview-1658--boosted.netlify.app/docs/5.3/migration
📱 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.

Copy link
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

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

I think such modifications should definitely be applied on all modals in the doc.

That said, 3 points to discuss about:

  • actually wondering if those spacings should be in the modal classes themselves since it will be more transparent to users
  • Shall the spacings be pixel perfect ?
  • Shall we change the spacings between .modal-header and .modal-body to be brand compliant ? (20px, sm+:25px)

site/content/docs/5.2/components/modal.md Outdated Show resolved Hide resolved
@MewenLeHo MewenLeHo force-pushed the main-mlh-modal-fix-margin branch 2 times, most recently from 03a405f to 1630afe Compare November 29, 2022 16:28
louismaximepiton

This comment was marked as outdated.

louismaximepiton

This comment was marked as outdated.

Copy link
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@julien-deramond

This comment was marked as resolved.

julien-deramond

This comment was marked as outdated.

@louismaximepiton

This comment was marked as outdated.

@MewenLeHo

This comment was marked as resolved.

Copy link
Member

@julien-deramond julien-deramond left a comment

Choose a reason for hiding this comment

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

LGTM! Last step is the design review and then 🚀

@sonarcloud
Copy link

sonarcloud bot commented Dec 22, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@julien-deramond
Copy link
Member

julien-deramond commented Feb 14, 2023

It's difficult to read the history with the force pushes. Is there anything new in this PR in the last commits I need to check since my last review?

@MewenLeHo
Copy link
Contributor Author

MewenLeHo commented Feb 21, 2023

@Franco-Riccitelli: thanks a lot for your helpful comment. As I said I opened a distinct issue for the redesign of modals.

The current PR will only tackle the probleme described in the related issue #1331: the distance between .modal-body and the buttons contained in .modal-footer

According to your screenshot, it must be 35px in desktop and 30px in mobile.

In this PR we currently have:

  • in desktop: 10px coming from .modal-body padding and 15px from its margin + 10px coming from .modal-footer padding =>35px
  • in mobile: 10px coming from .modal-body padding and 10px from its margin + 10px coming from .modal-footer padding =>30px

So I think we are good. @louismaximepiton, you made the review, is it still ok for you?

Last remaining point according to your screenshots @Franco-Riccitelli, modals with scrolling are an edge case with a spacing of only 20px in desktop AND mobile.

Currently we have:

  • in desktop: 10px coming from .modal-body margin + 10px coming from .modal-footer padding =>20px
  • in mobile: 10px coming from .modal-body margin + 10px coming from .modal-footer padding =>20px

So no change needed.

Is it ok for both of you?

@MewenLeHo
Copy link
Contributor Author

@Franco-Riccitelli: is the 'ok design' label ok for you?

@julien-deramond
Copy link
Member

julien-deramond commented Feb 27, 2023

@MewenLeHo What if there's no .modal-footer? I didn't think about it before but IMO there should be a rule not to apply the padding in this case. Or maybe we consider that users should use .mb-0 in this very specific use case?

Copy link
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

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

There's an issue with the spacing between the line and the buttons inside the scrollable content one at the bottom. Maybe part of the last commit ?

@MewenLeHo
Copy link
Contributor Author

There's an issue with the spacing between the line and the buttons inside the scrollable content one at the bottom. Maybe part of the last commit ?

It should be better after the fix. But I had to add a specific variable for the scrollable modals and I am still not sure if I like it or not... 🤔

Copy link
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

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

Few things to tackle

scss/_modal.scss Outdated Show resolved Hide resolved
scss/_modal.scss Outdated Show resolved Hide resolved
scss/_variables.scss Outdated Show resolved Hide resolved
site/content/docs/5.3/migration.md Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Mar 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@julien-deramond julien-deramond merged commit c73d446 into main Mar 8, 2023
@julien-deramond julien-deramond deleted the main-mlh-modal-fix-margin branch March 8, 2023 09:06
@julien-deramond julien-deramond mentioned this pull request Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs > Components > Modal: fix margin between text and buttons
4 participants