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

930 accent color should be implemented as a global variable #1131

Merged

Conversation

paboden
Copy link
Contributor

@paboden paboden commented Feb 12, 2023

Accent color control is updated for the following elements and ready for review

Components

Author image (hover color)
Author (hover color)
Author card (hover color)
Bio card (hover color)
Content card with image (hover color)
Content card without image with emphasize
Publication module (hover color)
Card module (hover color)
Featured card (hover color)
Image reveal card (hover color)
Publication card (hover color)
Stats card (hover color)
Pagewide featured content card (hover color)
Stats (hover color)
Stats card slider (imports individual stats cards)
Callout (when the color background is used it should reference the global variable)

Patterns

Content cards (imports content card with image)
Content cards with and without images (imports multiple cards)
Featured cards (imports featured card)
Image reveal cards (imports image reveal card)
Stats slider (two rows) (imports stats card)
Progress bar navigation

Templates

All template pages

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 12, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 46784e4
Status: ✅  Deploy successful!
Preview URL: https://8406638f.design-system.pages.dev
Branch Preview URL: https://930-accent-color-should-be-i.design-system.pages.dev

View logs

@Jura Jura linked an issue Feb 17, 2023 that may be closed by this pull request
Copy link
Member

@Jura Jura left a comment

Choose a reason for hiding this comment

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

@paboden , I like the button on the toolbar for choosing color, this is good. However, implementation of that parameter is not exactly aligned with our intention. What it should do is to add ".accent-[color]" class to the topmost element relevant for content, in case of Storybook implementation it can be <body> tag, and all widgets inside that container will appear using that color without a need to update their markup. Main focus here is on setting this once for the entire container. Current implementation adds color code as class name to each widget, which is exactly what we wanted to avoid.
Another angle here is the following - every widget should follow the closest setting if provided. i mean if there is a .accent-red class set on <body> element - every card should use reddish accent for hover effect. If one of the cards in that setup will have its own .accent-green class set - all cards should be red, but one - it has to follow more specific class and use green

…ass if applied to a higher html container, like the body tag.

Cleaned up some of the accent related code for the component, and implemented a body tag class that pulls from the global "Accent color" settings.
@Jura
Copy link
Member

Jura commented Feb 27, 2023

@paboden , we need to make sure that every widget which is using accent color is following page level settings. For example, here https://930-accent-color-should-be-i.design-system.pages.dev/?path=/story/templates-project-page--project-page&globals=accent:red Stat cards are using red accent color, but Explore more widget (grid with a mix of Content cards) is still using default yellow:
image

…or the component and for the any parent/global class.

Cleanup of code and names to try to bring consistency to the global accent color system.
@Jura
Copy link
Member

Jura commented Mar 2, 2023

@paboden , please resolve conflicts and also add compile and commit production .css and .js files as per other comment

@paboden
Copy link
Contributor Author

paboden commented Mar 2, 2023

Not ready for merging yet. Need to an issue on the country page.

paboden and others added 3 commits March 2, 2023 11:44
…s and better default color setup for those items

Country homepage, Global homepage, and publication page had alterations to help more efficiently pass a desired hovercolor per item or with global accent setting.

Included some fixes from develop branch to help with visual regression testing
@paboden
Copy link
Contributor Author

paboden commented Mar 3, 2023

@Jura This is ready for review once the dev build has finished.

@paboden paboden requested a review from Jura March 3, 2023 01:14
Copy link
Member

@Jura Jura left a comment

Choose a reason for hiding this comment

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

@paboden , why docs/js/swiper.min.js has been changed? I don't see any changes in source in that respect, but only in minified version, can you explain, pls?

Copy link
Contributor

@theadamparker theadamparker left a comment

Choose a reason for hiding this comment

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

@paboden for the Featured content card, when the image option is used it is not showing a color gradient atop an image. See screen capture here of the current implementation vs. the correct approach.

accent-color.mov

… source of image_variant setting. Removed some console.log snippets
@Jura Jura merged commit 2103e5c into develop Mar 8, 2023
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.

Accent color should be implemented as a global variable
3 participants