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

docs: notes on brand packaging discovery #248

Closed
wants to merge 1 commit into from

Conversation

cintnguyen
Copy link
Contributor

Currently trying to make learner dashboard be in compliance with MFE requirements refer to docs here. Part of the requirement is using CSS utility classes in a branding friendly way. During discovery while combing through scss files we found several areas of concern. Throughout the code we've highlighted these areas with comments next to styles that are hard coded and for some of them have found Paragon variable replacements.

Need feedback on whether there are any concerns with the suggested replacements, if there are better alternatives, and suggestions for items where recommendations weren't offered.

.alert.alert-info .alert-icon {
color: black;
color: black;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link

codecov bot commented Nov 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b83f128) 96.45% compared to head (d0d692d) 96.45%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #248   +/-   ##
=======================================
  Coverage   96.45%   96.45%           
=======================================
  Files         194      194           
  Lines        1835     1835           
  Branches      322      322           
=======================================
  Hits         1770     1770           
  Misses         60       60           
  Partials        5        5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -1,3 +1,3 @@
.confirm-email-now-button {
text-decoration: underline !important;
text-decoration: underline !important; // Can we find paragon replacement? Can we remove !important?
Copy link
Contributor

@httpsmenahassan httpsmenahassan Nov 27, 2023

Choose a reason for hiding this comment

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

@@ -1,6 +1,6 @@
@import "@edx/paragon/scss/core/core";

.course-card {
.course-card { // Can this be replaced with paragon's card component?
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be replaced with Paragon's Card component: https://paragon-openedx.netlify.app/components/card/

@@ -1,4 +1,4 @@
.program-card {
.program-card { // Can entire file be replaced with paragon's card component?
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be replaced by Paragon's Card component? https://paragon-openedx.netlify.app/components/card/

@@ -7,6 +8,8 @@
font-size: 18px;
}
}

// Seems to be hard coded features for a card component. Can this be replaced by paragon's card component?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should be replaced with Paragon's Card component: https://paragon-openedx.netlify.app/components/card/

@@ -1,3 +1,4 @@
// Hard coded, can this be replaced by paragon?
.related-programs-modal {
.programs-title {
font-size: 1.5rem;
Copy link
Contributor

@httpsmenahassan httpsmenahassan Nov 29, 2023

Choose a reason for hiding this comment

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

Not seeing an exact 1.5rem replacement but here are some alternatives that may work:

.learner-variant-header {
a {
// needed to make the link not resize the header
// Hard coded, not sure of the best way to address this
border-bottom: 2px solid transparent;
Copy link
Contributor

@httpsmenahassan httpsmenahassan Nov 29, 2023

Choose a reason for hiding this comment

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

.learner-variant-header {
a {
// needed to make the link not resize the header
// Hard coded, not sure of the best way to address this
border-bottom: 2px solid transparent;
}
.course-link {
Copy link
Contributor

Choose a reason for hiding this comment

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

For line 15 under this (border-bottom: 2px solid !important)

It seems to essentially be just an underline. Potential replacement is $inline-link-decoration: https://github.com/openedx/paragon/blob/0e6631bd1f26edc2871c522ad88ffba33bc32617/scss/core/_variables.scss#L392C62-L392C62

.nav-small-menu {
> * {
justify-content: flex-start !important;
justify-content: flex-start !important;
Copy link
Contributor

Choose a reason for hiding this comment

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

There’s not a flex-start option but this $displays variable might be an option? https://github.com/openedx/paragon/blob/0e6631bd1f26edc2871c522ad88ffba33bc32617/scss/core/_variables.scss#L842


&::after {
content: '\00BB';
padding-left: 10px;
padding-left: 10px; // Could potentially be replaced by paragon's styles?
Copy link
Contributor

Choose a reason for hiding this comment

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

}
}
}

.logo {
// copy from legacy dashboard
height: 40px;
// Removed hard coded px height. Suggested change comes from frontend component header in order to have some consistencies. It seems to work just fine when using the same exact style that we have for logo in frontend component header
Copy link
Contributor

@httpsmenahassan httpsmenahassan Nov 29, 2023

Choose a reason for hiding this comment

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

since Frontend Component Header is being used everywhere else, we can replace the previous pixel value with 1.75rem for the sake of being consistent

https://github.com/openedx/frontend-component-header/blob/9a5b1fa5e78e72f44f1591e7b759526b2633e7ec/src/index.scss#L83

@@ -1,5 +1,6 @@
@import "@edx/paragon/scss/core/core";

// Hard coded, should we be using paragon equivalent?
.explore-courses-btn {
padding-top: 16px;
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -1,5 +1,6 @@
@import "@edx/paragon/scss/core/core";

// This is essentially creating a card component, can be replaced by using paragon's card component
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be replaced with Paragon's Card component: https://paragon-openedx.netlify.app/components/card/

@@ -1,5 +1,5 @@
@import "@edx/paragon/scss/core/core";

// Seems to be trying to create a card component. Can this entire file be replaced with paragon's card component?
Copy link
Contributor

Choose a reason for hiding this comment

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

To do: replace this file with Paragon's Card component and see what it looks like: https://paragon-openedx.netlify.app/components/card/

Copy link
Contributor

Choose a reason for hiding this comment

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

if replacing this with the Card component doesn't work, note that there's a lot of !important values scattered around this file

@@ -7,6 +8,8 @@
font-size: 18px;
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -1,3 +1,4 @@
// Hard coded max-width and width features, is this needed? And can this be replaced by paragon?
.pgn__sheet-component {
max-width: 75% !important;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is a container so here are a couple of max-width options I noticed:

@@ -18,6 +19,7 @@
}
}

// Margin-bottom is hard coded, can we replace this with paragon/bootstrap?
.masquerade-form-input {
margin-bottom: 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -1,11 +1,11 @@
@import "@edx/paragon/scss/core/core";

#no-courses-content-view {
border: 2px solid $light-400;
border: 2px solid $light-400; // Can this be replaced by paragon?
Copy link
Contributor

Choose a reason for hiding this comment

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

This only has a value of 1px but still noting this $border-width variable for reference: https://github.com/openedx/paragon/blob/0e6631bd1f26edc2871c522ad88ffba33bc32617/scss/core/_variables.scss#L466C36-L466C36

flex-direction: column;
padding-bottom: map-get($spacers, 5);
padding-top: map-get($spacers, 5);
height: 100%;
height: 100%; // Can this be replaced by paragon?
Copy link
Contributor

@httpsmenahassan httpsmenahassan Dec 5, 2023

Choose a reason for hiding this comment

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

Unclear what the best replacement for height is

@deborahgu
Copy link
Member

is this work still in progress or can we go ahead and close this PR?

@justinhynes
Copy link
Contributor

There has been no response in the last two weeks, and has been open for nearly 5 months.

I'm going to close this PR for the meantime, @cintnguyen please reopen at your leisure if anything here needs to be reviewed and merged.

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