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

Finalize theme token updates #551

Merged
merged 11 commits into from
Mar 4, 2024

Conversation

LianaHarris360
Copy link
Member

@LianaHarris360 LianaHarris360 commented Feb 19, 2024

Description

This PR updates the the brand token colors, names, and token mapping within components and mixin references and expands upon the initial token to hex code mapping work done by @marcellamaki

Issue addressed

Addresses #545

Before/after screenshots

Before After
Colors Documentation Page:
Screenshot 2024-02-16 at 12 12 17 PM Screenshot 2024-02-16 at 12 14 40 PM Screenshot 2024-02-16 at 12 16 13 PM Screenshot 2024-02-16 at 12 17 00 PM Screenshot 2024-02-16 at 12 27 12 PM Screenshot 2024-02-16 at 12 13 25 PM Screenshot 2024-02-21 at 12 19 48 PM Screenshot 2024-02-21 at 12 19 31 PM Screenshot 2024-02-21 at 12 17 46 PM Screenshot 2024-02-16 at 12 32 44 PM
KSwitch: KeenUiSelect, KeenUiSelectOption
Screenshot 2024-02-13 at 1 42 01 PM Screenshot 2024-02-16 at 12 54 22 PM Screenshot 2024-02-13 at 1 42 11 PM Screenshot 2024-02-16 at 1 12 09 PM
KCheckbox
Screenshot 2024-02-19 at 10 20 52 AM Screenshot 2024-02-15 at 2 29 12 PM
KTabs: KTabsList
Screenshot 2024-02-19 at 10 22 58 AM Screenshot 2024-02-14 at 2 27 03 PM
KButton: buttonMixin
Screenshot 2024-02-19 at 10 24 15 AM Screenshot 2024-02-19 at 10 24 22 AM Screenshot 2024-02-19 at 10 26 51 AMScreenshot 2024-02-19 at 10 26 55 AM 1
KDateRange: KDateDay, KDateCalendar
Screenshot 2024-02-19 at 10 25 59 AM Screenshot 2024-02-14 at 2 36 18 PM
KExternalLink, KRouterLink
Screenshot 2024-02-19 at 10 28 44 AM Screenshot 2024-02-14 at 2 50 04 PM
KRadioButton
Screenshot 2024-02-19 at 10 29 47 AM Screenshot 2024-02-14 at 2 53 21 PM
KTextBox
Screenshot 2024-02-19 at 10 33 01 AM Screenshot 2024-02-15 at 3 08 13 PM
KLinearLoader
Screenshot 2024-02-21 at 12 10 57 PM Screenshot 2024-02-21 at 12 11 11 PM
KCircularLoader
Screenshot 2024-02-21 at 12 13 34 PM Screenshot 2024-02-21 at 12 13 26 PM

Changelog

  • #551
    • Description: Updates brand colors, palette colors, and tokens.
      • Breaking changes:
        • Removed palette colors: purple, deeppurple, indigo, brown, cyan, teal, lightgreen, lime, amber, deeporange, bluegrey
        • Removed palette.grey scales: v_300, v_500, v_700, v_900
        • Removed brand and palette scales (except palette.grey): v_50,v_100, v_300, v_500, v_700, v_900
        • Removed content-related tokens: exercise, video, audio, document, html5, slideshow
        • Removed other tokens: appBarFullscreen, appBarFullscreenDark, linkDark
      • Other changes:
        • Some existing palette colors look differently
        • Adds new tokens and palette
        • Global styles: <body> background color changed from grey.v_100 to lighter grey.v_50.
    • Products impact: new API, updated API, deleted API
    • Addresses: Finalize theme token updates #545
    • Components:
    • Breaking: yes
    • Impacts a11y: no
    • Guidance: Address all breaking changes by searching for removed palette colors, scales, and tokens. Study the updated "Colors" KDS documentation page and replace them by relevant colors/scales/tokens. Also search for any hardcoded hex,rgb(a),hsl(a), or named colors (such as 'white') and theme them instead. Visually check places that use existing palette and adjust scale (you may need to increase it as many colors are lighter). You may also see if there are any minor useful updates to in regards to new tokens (e.g. replacing a palette color with a new token that describes function of the color better). If you use generateGlobalStyles that generates background color for <body> and use grey.v_100 in some components to match the background color, you may need to update it to grey.v_50.

(optional) Implementation notes

  • This line was removed from the KDS Colors Documentation Page because the mentioned colors were removed:

    The Kolibri Design System has what we call "Kolibri Purple" as its primary and "Kolibri Teal" as its secondary, available across the full brightness scale:

  • KContentRenderer was removed from the table of contents because it displayed an error page

Testing checklist

  • Contributor has fully tested the PR manually
  • If there are any front-end changes, before/after screenshots are included
  • The change is described in the changelog section above

Reviewer guidance

  • Is the code clean and well-commented?
  • Are all UI components LTR and RTL compliant (if applicable)?

After review

  • The changelog item has been pasted to the CHANGELOG.md

@LianaHarris360 LianaHarris360 added this to the Theming support milestone Feb 19, 2024
@LianaHarris360 LianaHarris360 linked an issue Feb 19, 2024 that may be closed by this pull request
1 task
@LianaHarris360 LianaHarris360 marked this pull request as ready for review February 19, 2024 17:34
@MisRob
Copy link
Member

MisRob commented Feb 19, 2024

Thanks @LianaHarris360.

Redirecting here the conversation about the changelog from the closed PR:


Thank you, new updates make sense. I see one place that could deserve more detail in my view

When you say

new content-related token labels have been introduced and existing ones have been renamed

Could you list new labels and before/after of renamed token labels here? So we can find them in the products easily and rename them without the need to dig into this PR's diff. These are changes in public API and we will be specific in the release notes (this is different from just tweaking an existing color which we don't need to document in such detail.

I was planning to update the changelog with more info but wasn't too sure about the level of detail to include

Generally, you could just imagine that you're someone who's not familiar with the code diff in detail and tried to introduce new theming to Kolibri/Studio/KDP. Anything that would be useful for you to know will serve as good guidance :)

Thank you. This will be helpful later on as we are updating Kolibri, Studio, and KDP.

@MisRob
Copy link
Member

MisRob commented Feb 20, 2024

FYI I'm gradually reviewing this as I'm working on rebranding Kolibri, so it may take a while to post final feedback, but it's in progress.

@MisRob MisRob requested a review from rtibbles February 20, 2024 13:05
@MisRob MisRob removed the request for review from rtibbles February 20, 2024 13:08
@MisRob MisRob assigned akolson and unassigned rtibbles Feb 20, 2024
Copy link
Member

@marcellamaki marcellamaki left a comment

Choose a reason for hiding this comment

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

This looks great, @LianaHarris360, thank you so much for the quick and thorough work on this.

I spoke briefly with @MisRob and I think for the rest of the week, perhaps we can keep this open in case there are any changes to be made here that are discovered in the updates to Kolibri and Studio, and they can just be made directly here, so I am commenting rather than approving. Managing this will take some working cooperatively and communication, but I think we can do it. :)

Overall though, great start. For those who will be doing the updates in our products, I think this is ready to work from at least to do some next steps. Please let me know if you have any questions, either here or in the slack thread in #product.

@MisRob
Copy link
Member

MisRob commented Feb 21, 2024

Hi, I did first review and overall great work @marcellamaki @LianaHarris360, thank you. See notes below from the review and also my parallel work of using it in Kolibri. It's work in progress so it's possible that I will post some more over time, but I think this could be all when it comes to high-level:

(1) I located more breaking changes that are not in the changelog yet. @LianaHarris360 I needed to note them down for myself when upgrading Kolibri, so I hope it's fine if I just updated the changelog directly rather than referencing it.

(2) One high-level issue that's blocking some Kolibri work is removal of yellow color from the full palette. The only way how to use yellow now is via brand.secondary. That's not suitable in all cases because for example for warning yellow icon, we don't want to use brand.secondary. It's not only about color, but also context. Practically, in another theme that would use green as secondary color, the warning icon would end up green, which is not desired. brand.secondary need to be used only in places that have something to do with brand (e.g. buttons and navbars). In another places, we will need palette.yellow even though it's the same color as brand.secondary under the hood. I'd suggest we return yellow to the palette.

(3) Relatedly to (2), I think that except of tokens that are related to brand (such as tokens.primary, tokens.primaryDark, ...), tokens need to be created via palette rather than brand colors. For example, tokens.practice need to be created via some palette blue color rather than brand.

Screenshot from 2024-02-21 10-10-18

Here, I only pointed to a few places I looked into in more detail, but I think there are some more. @LianaHarris360 could you please revisit it as a whole and make sure that there's distinction between blue and yellow for brand and palette?

@MisRob
Copy link
Member

MisRob commented Feb 21, 2024

Also in regards to (2), the yellow we need in the palette is this one. I think that's the same yellow as the one used for brand secondary, but please double-check

https://www.figma.com/file/p7aOP2MBv0SED1uhaPwqEd/Product-rebrand?node-id=766%3A13416&mode=dev

Screenshot from 2024-02-21 10-21-02

Note that Figma has token.warning for this yellow. No problem to use palette.yellow as soon as it's in the palette if warning token is not in scope of this work, but it'd be good to follow up to map all figma tokens at some point.

Here's one of the relevant Kolibri places https://github.com/learningequality/kolibri/blob/release-v0.16.x/kolibri/plugins/device/assets/src/views/DeprecationWarningBanner.vue#L10-L14

primaryDark: 'brand.primary.v_1100',
secondary: 'brand.secondary.v_1000',
secondaryDark: 'brand.secondary.v_1100',
appBar: 'brand.secondary.v_800',
Copy link
Member

Choose a reason for hiding this comment

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

Could we please document all tokens on Colors page such as appBar and possibly others that are missing? I can't find it at https://deploy-preview-551--kolibri-design-system.netlify.app/colors/# It seems some of them were forgotten before, it'd be helpful to include them now as we're upgrading though.

@MisRob
Copy link
Member

MisRob commented Feb 21, 2024

I'd like to ask for updating

backgroundColor: themePalette().grey.v_100,
to grey.v_50.

This will change the darker gray area in the bottom half in Kolibri to match the new lighter upper part.

Screenshot from 2024-02-21 14-07-09

@LianaHarris360
Copy link
Member Author

If it's easier for you to update the changelog directly, I don't mind at all! I will go over the changes, document the missing colors, and update this PR based on your review notes.

@MisRob
Copy link
Member

MisRob commented Feb 21, 2024

Thank you, I updated it in the description. Yes, it would be nice to keep it up to date as we're doing more changes here.

@MisRob
Copy link
Member

MisRob commented Feb 22, 2024

New changes are looking fine, thank you @LianaHarris360

Copy link
Member

@MisRob MisRob left a comment

Choose a reason for hiding this comment

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

Thank you @LianaHarris360, great work. The newest additions are looking fine to me and I think we resolved all outstanding issues. I will merge in preparation for the release. If there's some other work needed, we can have a new PR.

@MisRob MisRob merged commit fa487bd into learningequality:develop Mar 4, 2024
8 checks passed
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.

Finalize theme token updates
5 participants