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

chore: add design system provider components to fast-website #3104

Merged

Conversation

radium-v
Copy link
Collaborator

Description

Adds the fast-design-system-provider and website-design-system-provider components. To accommodate this, I also added mini-css-extract-plugin to the webpack build and moved the stylesheet to src/app/css/style.css for future (related) improvements.

Motivation & context

We want DS properties to propagate when controls values change. Having two allows us to keep the styles of the page and the styles of the fast-frame component separated.

Issue type checklist

  • Chore: A change that does not impact distributed packages.
  • Bug fix: A change that fixes an issue, link to the issue above.
  • New feature: A change that adds functionality.

Is this a breaking change?

  • This change causes current functionality to break.

Process & policy checklist

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

@radium-v radium-v force-pushed the users/jokreitl/fast-frame-design-provider branch from f31d4d4 to f408303 Compare May 11, 2020 22:20
@radium-v radium-v self-assigned this May 11, 2020
@radium-v radium-v force-pushed the users/jokreitl/fast-frame-design-provider branch 2 times, most recently from fda4c8d to 1bcb5de Compare May 11, 2020 22:56
@chrisdholt chrisdholt force-pushed the feature/fast-frame branch from 5c3eb72 to 8dc8c69 Compare May 12, 2020 17:36
@radium-v radium-v force-pushed the users/jokreitl/fast-frame-design-provider branch 2 times, most recently from 55b0839 to 3d0ac90 Compare May 12, 2020 18:45
public accentPalette: string[];

accentBaseColorChanged(): void {
const parsedColor = parseColor(this.accentBaseColor);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you make this handle the null case more gracefully? If the color can't be parsed then maybe it is reset back to the previous color?

Then you can diff the previous and next values, and only create the accent palette when the two are different and current is a valid color

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Which null cases do you mean? When the attribute is present but it's empty, when the attribute isn't present, or when the attribute is set to an invalid color value?

@radium-v radium-v force-pushed the users/jokreitl/fast-frame-design-provider branch from 3d0ac90 to 2a228e3 Compare May 12, 2020 21:52
radium-v added 2 commits May 12, 2020 15:04
- Add mini-css-extract-plugin
- Add optimization packages for prod config
- Rename dist files to include cache hash
@radium-v radium-v force-pushed the users/jokreitl/fast-frame-design-provider branch from 2a228e3 to 590580c Compare May 12, 2020 22:08
@radium-v radium-v requested review from eljefe223 and khamudom May 13, 2020 01:24
@janechu
Copy link
Collaborator

janechu commented May 13, 2020

Not necessarily in this PR, but our convention is to use dist for a distributed npm package and www for site files, so at some point this needs to be changed.

<svg class="icon-cut" slot="end" width="11" height="15" viewBox="0 0 11 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.4309 13.8721C10.7451 13.872 11 14.1238 11 14.4345C11 14.7452 10.7454 14.9971 10.4312 14.9972L0.56913 15C0.254899 15.0001 0 14.7483 0 14.4376C0 14.127 0.25457 13.875 0.568801 13.8749L10.4309 13.8721ZM5.42279 0.0051353L5.5 0C5.78804 0 6.0261 0.211628 6.06377 0.486201L6.06897 0.562533L6.06821 10.8269L8.89165 8.03648C9.09367 7.83679 9.40976 7.81866 9.63248 7.98209L9.69629 8.03656C9.89827 8.23629 9.9166 8.54881 9.7513 8.76901L9.69621 8.8321L5.90489 12.5798C5.70299 12.7794 5.38711 12.7976 5.16438 12.6344L5.10057 12.58L1.30485 8.83233C1.08251 8.6128 1.08226 8.25662 1.3043 8.03679C1.50616 7.83694 1.82224 7.81857 2.04509 7.98182L2.10894 8.03625L4.93028 10.8216L4.93103 0.562533C4.93103 0.277745 5.14508 0.0423843 5.42279 0.0051353L5.5 0L5.42279 0.0051353Z"/>
Button
<svg
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting this formatting is happening in your review. Prettier should have handled this for us.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is how it came in from the base branch for me.

@radium-v radium-v merged commit d596f66 into feature/fast-frame May 13, 2020
@radium-v radium-v deleted the users/jokreitl/fast-frame-design-provider branch May 13, 2020 16:17
chrisdholt pushed a commit that referenced this pull request May 13, 2020
* Update webpack dev and prod configs

- Add mini-css-extract-plugin
- Add optimization packages for prod config
- Rename dist files to include cache hash

* Add design system providers
chrisdholt pushed a commit that referenced this pull request May 15, 2020
* Update webpack dev and prod configs

- Add mini-css-extract-plugin
- Add optimization packages for prod config
- Rename dist files to include cache hash

* Add design system providers
chrisdholt pushed a commit that referenced this pull request May 18, 2020
* Update webpack dev and prod configs

- Add mini-css-extract-plugin
- Add optimization packages for prod config
- Rename dist files to include cache hash

* Add design system providers
radium-v added a commit that referenced this pull request May 18, 2020
* Update webpack dev and prod configs

- Add mini-css-extract-plugin
- Add optimization packages for prod config
- Rename dist files to include cache hash

* Add design system providers
chrisdholt pushed a commit that referenced this pull request May 18, 2020
* Update webpack dev and prod configs

- Add mini-css-extract-plugin
- Add optimization packages for prod config
- Rename dist files to include cache hash

* Add design system providers
chrisdholt pushed a commit that referenced this pull request Jun 4, 2020
* Update webpack dev and prod configs

- Add mini-css-extract-plugin
- Add optimization packages for prod config
- Rename dist files to include cache hash

* Add design system providers
chrisdholt pushed a commit that referenced this pull request Jun 11, 2020
* Update webpack dev and prod configs

- Add mini-css-extract-plugin
- Add optimization packages for prod config
- Rename dist files to include cache hash

* Add design system providers
chrisdholt pushed a commit that referenced this pull request Jun 16, 2020
* Update webpack dev and prod configs

- Add mini-css-extract-plugin
- Add optimization packages for prod config
- Rename dist files to include cache hash

* Add design system providers
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.

6 participants