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 custom popover padding #2031

Merged
merged 19 commits into from
Jun 27, 2023
Merged

Fix custom popover padding #2031

merged 19 commits into from
Jun 27, 2023

Conversation

MewenLeHo
Copy link
Contributor

@MewenLeHo MewenLeHo commented May 11, 2023

Related issues

Closes #1937

Description

Fix padding for custom popover while keeping new design unchanged.

Motivation & Context

Design broken after design update:
229475553-11144aae-0982-4cee-ac21-b75d58beee85

Types of change

  • Bug fix (non-breaking which fixes an issue)

Live previews

Checklist

Contribution

Accessibility

  • My change follows accessibility good practices; I have at least run axe

Design

  • My change respects the design guidelines defined in Orange Design System
  • My change is compatible with responsive display

Development

  • My change follows the developer guide
  • (NA) I have added JavaScript unit tests to cover my changes
  • (NA) I have added SCSS unit tests to cover my changes

Documentation

  • My change introduces changes to the documentation and/or I have updated the documentation accordingly

Checklist (for Core Team only)

  • (NA) My change introduces changes to the migration guide
  • (NA) My new component is added in Storybook
  • (NA) My new component is compatible with RTL
  • Manually run BrowserStack tests
  • Manually test browser compatibility with BrowserStack (Chrome >= 60, Firefox >= 60 (+ ESR), Edge, Safari >= 12, iOS Safari, Chrome & Firefox on Android)
  • Code review
  • Design review
  • (NA) A11y review

After the merge

@MewenLeHo MewenLeHo added v5 docs Improvements or additions to documentation fix css labels May 11, 2023
@netlify
Copy link

netlify bot commented May 11, 2023

Deploy Preview for boosted ready!

Name Link
🔨 Latest commit acd5cfa
🔍 Latest deploy log https://app.netlify.com/sites/boosted/deploys/649a937876c49b0008477292
😎 Deploy Preview https://deploy-preview-2031--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 configuration.

@julien-deramond julien-deramond self-requested a review May 24, 2023 07:12
@julien-deramond

This comment was marked as resolved.

@julien-deramond julien-deramond marked this pull request as draft May 24, 2023 07:20
@MewenLeHo MewenLeHo marked this pull request as ready for review May 25, 2023 07:54
@MewenLeHo
Copy link
Contributor Author

After PR review by @isabellechanclou , it appears that paddingvalues for the custom popover are different.
It seems akward but it's coming from the custom properties defined before the example:

screenshot-localhost_9001-2023 05 30-16_04_13

Note: Should we add a design callout to warn people that any customisation means that the component is no longer compatible with the DSM?

@julien-deramond
Copy link
Member

There's probably an issue with --bs-popover-body-padding-y which only changes the bottom padding instead of both bottom and top padding. Here's the rendering with --bs-popover-body-padding-x: 3rem and --bs-popover-body-padding-y: 5rem:

Screenshot 2023-05-31 at 09 08 00

@MewenLeHo
Copy link
Contributor Author

There's probably an issue with --bs-popover-body-padding-y which only changes the bottom padding instead of both bottom and top padding. Here's the rendering with --bs-popover-body-padding-x: 3rem and --bs-popover-body-padding-y: 5rem:

Screenshot 2023-05-31 at 09 08 00

I moved a CSS property and it should be better now:
screenshot-localhost_9001-2023 05 31-10_34_08

@isabellechanclou
Copy link
Member

LGTM !

@julien-deramond
Copy link
Member

Screenshot 2023-06-05 at 13 08 37

Is it possible with the custom props to center the text in the header? Doesn't seem very usable right now.

@MewenLeHo
Copy link
Contributor Author

I removed specific some specific CSS rules for custom popovers so it should be better now.
I am just wondering if it is really a good think to add examples rules for popover header customisation in a Boosted mod? 🤔

screenshot-deploy-preview-2031--boosted netlify app-2023 06 06-10_43_55

@isabellechanclou
Copy link
Member

LGTM !

scss/_popover.scss Outdated Show resolved Hide resolved
@julien-deramond julien-deramond changed the title Fix customer popover padding Fix custom popover padding Jun 9, 2023
@MewenLeHo
Copy link
Contributor Author

I just added to this PR the prototype made by @julien-deramond in PR #2077
@isabellechanclou and @julien-deramond, could you please have a look on this new verson?

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.

Some small changes but looks fine already

scss/_popover.scss Show resolved Hide resolved
scss/_popover.scss Outdated Show resolved Hide resolved
scss/_popover.scss Show resolved Hide resolved
scss/_popover.scss Outdated Show resolved Hide resolved
scss/_variables.scss Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Jun 27, 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 fb6b94d into main Jun 27, 2023
@julien-deramond julien-deramond deleted the main-mlh-fix-popover-padding branch June 27, 2023 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css docs Improvements or additions to documentation fix v5
Projects
Development

Successfully merging this pull request may close these issues.

New popover padding breaks popover header
4 participants