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

[BD-46] fix: stretch the message block to the full width #2219

Conversation

monteri
Copy link
Contributor

@monteri monteri commented Apr 24, 2023

Description

Add stretching the message block to the full width

Deploy Preview

Include a direct link to your changes in this PR's deploy preview here (e.g., a specific component page).

Merge Checklist

  • If your update includes visual changes, have they been reviewed by a designer? Send them a link to the Netlify deploy preview, if applicable.
  • Does your change adhere to the documented style conventions?
  • Do any prop types have missing descriptions in the Props API tables in the documentation site (check deploy preview)?
  • Were your changes tested using all available themes (see theme switcher in the header of the deploy preview, under the "Settings" icon)?
  • Were your changes tested in the example app?
  • Is there adequate test coverage for your changes?
  • Consider whether this change needs to reviewed/QA'ed for accessibility (a11y). If so, please add wittjeff and adamstankiewicz as reviewers on this PR.

Post-merge Checklist

  • Verify your changes were released to NPM at the expected version.
  • If you'd like, share your contribution in #show-and-tell.
  • 🎉 🙌 Celebrate! Thanks for your contribution.

@openedx-webhooks openedx-webhooks added the blended PR is managed through 2U's blended developmnt program label Apr 24, 2023
@openedx-webhooks
Copy link

Thanks for the pull request, @monteri!

When this pull request is ready, tag your edX technical lead.

@netlify
Copy link

netlify bot commented Apr 24, 2023

Deploy Preview for paragon-openedx ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit a07db74
🔍 Latest deploy log https://app.netlify.com/sites/paragon-openedx/deploys/644a92aa8f04d50008aab38e
😎 Deploy Preview https://deploy-preview-2219--paragon-openedx.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.

@codecov
Copy link

codecov bot commented Apr 24, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (e6b1f7a) 91.07% compared to head (e845a39) 91.07%.

❗ Current head e845a39 differs from pull request most recent head a07db74. Consider uploading reports for the commit a07db74 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2219   +/-   ##
=======================================
  Coverage   91.07%   91.07%           
=======================================
  Files         234      234           
  Lines        4122     4122           
  Branches      981      981           
=======================================
  Hits         3754     3754           
  Misses        361      361           
  Partials        7        7           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -422,6 +422,8 @@ a .pgn__card {
border-radius: 0 0 .375rem .375rem;

.pgn__card-status__message-content {
width: 100%;
Copy link
Member

Choose a reason for hiding this comment

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

Glad this is a simple fix. FWIW, flex-grow: 1; here would also do the trick, and may make a bit more sense given this element doesn't actually take up 100% of the parent's width (i.e., it grows to take up whatever space is remaining after the space taken up by the icon).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I checked this also work fine. Don't know whether there will be difference in some cases? Just curious. I replaced to flex-grow: 1;

@@ -422,6 +422,8 @@ a .pgn__card {
border-radius: 0 0 .375rem .375rem;
Copy link
Member

Choose a reason for hiding this comment

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

It looks like the padding used for Card.Status is a bit more than the padding used for the other Card subcomponents like Card.Footer and Card.Section (1.5rem vs. 1.25rem respectively). Should the padding above (i.e., padding: 1.5rem;) be using the $card-spacer-x and/or $card-spacer-y variables to ensure the padding is consistent?

Copy link
Contributor Author

@monteri monteri Apr 27, 2023

Choose a reason for hiding this comment

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

I tested with $card-spacer-x and $card-spacer-y and it looks good. I agree with your comment. Worth noting that it is important to hold the logic behind spacings and sizes in the component especially in such big as Card, Datatable etc. Then it is easier to extend and modify for Paragon users.

@@ -422,6 +422,8 @@ a .pgn__card {
border-radius: 0 0 .375rem .375rem;
Copy link
Member

Choose a reason for hiding this comment

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

[curious] Should we be using the $card-border-radius SCSS variable here to be consistent with border radius throughout the Card (sub-)components?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it makes sense, updated

@viktorrusakov viktorrusakov linked an issue Apr 24, 2023 that may be closed by this pull request
1 task
@adamstankiewicz adamstankiewicz merged commit 5acea87 into openedx:master Apr 28, 2023
9 checks passed
@openedx-webhooks
Copy link

@monteri 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@edx-semantic-release
Copy link
Contributor

🎉 This PR is included in version 20.32.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@edx-semantic-release
Copy link
Contributor

🎉 This PR is included in version 21.0.0-alpha.25 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blended PR is managed through 2U's blended developmnt program released on @alpha released
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Card.Status does not quite support an ActionRow in its children
4 participants