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

MPP-3739: Revert PR #4314 Protocol SCSS version upgrade #4396

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

rafeerahman
Copy link
Contributor

@rafeerahman rafeerahman commented Feb 9, 2024

This reverts commit 4b01656 and 90fd6f1.

This PR fixes MPP-3739.

Bug

When changing font sizes using @include, the tokens were showing as undefined, causing elements to use their default font sizes.

See MPP-3739 for screenshots.

Still not entirely sure of the root cause or how to fix the issue in a version upgrade but this info below might help @Vinnl.

Example of the difference between this reverted state and the upgraded state.

17.0.0 (current fixed state)

@mixin text-title-sm {
    @include font-size(type-scale('title-xs-size'));
    line-height: type-scale('title-xs-line-height');

    @media #{$mq-md} {
        @include font-size(type-scale('title-sm-size'));
        line-height: type-scale('title-sm-line-height');
    }
}

image

19.0.0 (causing decreased font-sizes)

@mixin text-title-sm {
    @include font-size(themes.$title-xs-size);
    line-height: themes.$title-xs-line-height;

    @media #{tokens.$mq-md} {
        @include font-size(themes.$title-sm-size);
        line-height: themes.$title-sm-line-height;
    }

    @supports (--css: variables) {
        font-size: var(--title-xs-size);
        line-height: var(--title-xs-line-height);

        @media #{tokens.$mq-md} {
            font-size: var(--title-sm-size);
            line-height: var(--title-sm-line-height);
        }
    }
}

image

mozilla/protocol@e244b27

Screenshot (if applicable)

Font sizes are back to their previous state with this downgrade.

image

How to test

  1. Open the relay landing page.
  2. Verify the font sizes are not like the ones in the screenshots in MPP-3739.

Checklist (Definition of Done)

  • Product Owner accepted the User Story (demo of functionality completed) or waived the privilege.
  • Customer Experience team has seen or waived a demo of functionality.
  • All acceptance criteria are met.
  • Jira ticket has been updated (if needed) to match changes made during the development process.
  • I've added or updated relevant docs in the docs/ directory
  • Jira ticket has been updated (if needed) with suggestions for QA when this PR is deployed to stage.
  • All UI revisions follow the coding standards, and use Protocol tokens where applicable (see /frontend/src/styles/tokens.scss).
  • Commits in this PR are minimal and have descriptive commit messages.
  • l10n changes have been submitted to the l10n repository, if any.

@rafeerahman rafeerahman requested a review from Vinnl February 9, 2024 01:18
Copy link
Collaborator

@Vinnl Vinnl left a comment

Choose a reason for hiding this comment

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

As for root cause, I expect the import order matters. The real fix is probably migrating all our uses of @import to @use (see "heads up" here), but that's a larger chunk of work. (But maybe good for a backlog of tech debt?)

Also pinging @lloan so he's aware of what's happening here :)

@rafeerahman rafeerahman added this pull request to the merge queue Feb 9, 2024
Merged via the queue into main with commit 23083e0 Feb 9, 2024
27 checks passed
@rafeerahman rafeerahman deleted the Revert-PR-4314 branch February 9, 2024 14:27
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.

2 participants