Skip to content

Conversation

@lgriffee
Copy link
Contributor

@lgriffee lgriffee commented Nov 9, 2021

WHY are these changes introduced?

Fixes #4589

The following tokens (see table below) were made to rollout the design language changes in 2020 and should no longer be used.

WHAT is this pull request doing?

Swapping the following tokens for equivalent values or completely removing the value and associated css property.

token value
--p-override-none none
--p-override-transparent transparent
--p-override-one 1
--p-override-visible visible
--p-override-zero 0
--p-non-null-content ''
--p-badge-mix-blend-mode luminosity
--p-range-slider-thumb-scale 1.5

How to 🎩

🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines

Copy-paste this code in playground/Playground.tsx:
import React from 'react';
import {Page} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
      {/* Add the code you want to test in here */}
    </Page>
  );
}

🎩 checklist

@lgriffee lgriffee requested review from alex-page and yurm04 November 9, 2021 22:31
@lgriffee lgriffee self-assigned this Nov 9, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2021

size-limit report

Path Size
cjs 165.98 KB (-0.07% 🔽)
esm 96.55 KB (-0.1% 🔽)
esnext 143.12 KB (-0.29% 🔽)
css 34.29 KB (-0.9% 🔽)

Copy link
Member

@alex-page alex-page 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 @lgriffee. I am unsure if we can remove some of these values all together or if they override another value in the CSS cascade. Would you be able to take a look?

@lgriffee lgriffee changed the title [WIP] Remove miscellaneous css custom properties Remove miscellaneous css custom properties Nov 9, 2021
@lgriffee lgriffee marked this pull request as ready for review November 9, 2021 23:12
Comment on lines -44 to -57
.placeholder {
// stylelint-disable-next-line selector-max-class
&.error .Input {
// This is the only place this color is used.
// stylelint-disable-next-line color-no-hex
color: #9c9798;
}

// stylelint-disable-next-line selector-max-class, selector-max-specificity
&.error .Input:-moz-focusring {
color: transparent;
text-shadow: var(--p-override-none);
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing unused class. Here's the legacy commit from when it was added

Copy link
Member

Choose a reason for hiding this comment

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

Amazing! Thanks for the context Laura. I think it makes sense to remove this code.

@lgriffee lgriffee requested a review from alex-page November 12, 2021 20:37
Comment on lines -27 to -30

.ContentWrapper {
background: var(--p-override-transparent);
}
Copy link
Member

@alex-page alex-page Nov 12, 2021

Choose a reason for hiding this comment

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

Do we need the HTML element with .ContentWrapper classname? Or can we flatten this components HTML?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think we need it—I can consolidate its relevant CSS into .Breadcrumb and replace its HTML with a shorthand fragment so that contentMarkup still has one parent element (which you can check out in this commit).

Copy link
Contributor Author

@lgriffee lgriffee Nov 15, 2021

Choose a reason for hiding this comment

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

Also along the line of consolidation I just want to note that there might be more rollback values that need to be removed in these files. Not sure if there was work done already to remove them so it’s definitely possible that they are needed overrides. I didn’t look into them in this PR to keep a narrow scope. But if it’s something important to address now or in the future I can create a ticket to look into it.

Copy link
Member

@alex-page alex-page left a comment

Choose a reason for hiding this comment

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

Awesome work @lgriffee. I had one question but this looks great 💯. It looks like you have a conflict with the UNRELEASED.md file let me know if you need help resolving that!

@alex-page alex-page requested a review from kyledurand November 15, 2021 16:33
Copy link
Contributor

@aveline aveline 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 @lgriffee!

Copy link
Member

@kyledurand kyledurand left a comment

Choose a reason for hiding this comment

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

Looks good just a few comments. I'll 🎩 now

lgriffee and others added 3 commits November 16, 2021 08:47
Co-authored-by: Kyle Durand <kyledurand@users.noreply.github.com>
Co-Authored-By: Kyle Durand <6844391+kyledurand@users.noreply.github.com>
Copy link
Member

@kyledurand kyledurand left a comment

Choose a reason for hiding this comment

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

Sorry about the delay 🎩 ing. I ran into a nix issue with dev last night and got distracted with other things. This looks great! Excellent clean up. The only thing I noticed via chromatic is that the breadcrumb back button is slightly wider but I think it's an improvement now that it's perfectly square 👍

I left a note about removing one more sass var that appears to be unused, and unreleased has some entries that can snuck in by a rebase probable but otherwise 🚢 !

lgriffee and others added 2 commits November 16, 2021 10:42
Co-Authored-By: Kyle Durand <6844391+kyledurand@users.noreply.github.com>
@lgriffee lgriffee merged commit b50d352 into main Nov 16, 2021
@lgriffee lgriffee deleted the 4589-remove-misc-css-custom-properties branch November 16, 2021 15:59
@alex-page alex-page added this to the 2021Q4 milestone Nov 25, 2021
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.

Remove miscellaneous css custom properties

4 participants