Skip to content

Instantly share code, notes, and snippets.

@heyMP
Created April 18, 2022 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heyMP/200fc0b840690541475923facba393ab to your computer and use it in GitHub Desktop.
Save heyMP/200fc0b840690541475923facba393ab to your computer and use it in GitHub Desktop.
@patternfly/pfe-core @patternfly/pfe-sass @patternfly/pfe-styles @patternfly/pfe-accordion @patternfly/pfe-band @patternfly/pfe-button @patternfly/pfe-card @patternfly/pfe-clipboard @patternfly/pfe-collapse @patternfly/pfe-cta @patternfly/pfe-datetime @patternfly/pfe-dropdown @patternfly/pfe-health-index @patternfly/pfe-icon-panel @patternfly/pfe-icon @patternfly/pfe-jump-links @patternfly/pfe-label @patternfly/pfe-markdown @patternfly/pfe-modal @patternfly/pfe-number @patternfly/pfe-page-status @patternfly/pfe-progress-indicator @patternfly/pfe-readtime @patternfly/pfe-select @patternfly/pfe-tabs @patternfly/pfe-toast
major
major
minor
major
major
patch
major
patch
minor
major
patch
patch
patch
patch
patch
major
patch
patch
major
patch
patch
patch
patch
patch
patch
patch

BREAKING CHANGES:

  • Renames ContextTheme type to ColorTheme

  • Renames ColorTheme type to ColorPalette

  • Moves both of the above from core.ts to controllers/color-context.ts

  • Moves controllers/color-context-controller.ts to controllers/color-context.ts

  • Removes ColorContextController (see below)

  • Deprecates color attribute in favour of color-palette. use color-palette instead or set --context css custom property color will still be supported in pfe-card and pfe-band, but they are deprecated, and a warning will print to the console when color is used. Explicitly affects pfe-band, pfe-card, pfe-jump-links, and pfe-modal (see below)
    Before:

    <pfe-band color="darkest">...</pfe-band>

    After:

    <pfe-band color-palette="darkest">...</pfe-band>
  • Removes pfe-contexts mixin from pfe-sass, use controllers or decorators instead

  • Removes pfe-accordion--expanded mixin from pfe-sass, and inlines it

  • Removes context attribute, Before;

    <pfe-modal context="dark">
      <pfe-card color="lightest">...</pfe-card>
    </pfe-modal>

    After:

    <pfe-modal color-palette="darkest">
      <pfe-card color-palette="lightest">...</pfe-card>
    </pfe-modal>
    
    <pfe-modal style="--context: dark;">
      <strong>🚨 Warning!</strong> May cause accessibility problems!
    </pfe-modal>

Fixes

  • Fixes animation timings in pfe-accordion on browsers which don't support computedStyleMap
  • Fixes context styles for slotted CTAs (provided pfe.min.css is loaded)
  • Fixes padding in pfe-band and simplifies the CSS
  • Restores reload-on-save function to dev server
  • Makes pfe-clipboard strictly a colour context consumer
  • Makes pfe-button strictly a colour context consumer
  • Makes pfe-accordion both a colour context consumer and provider, but makes pfe-accordion-header and pfe-accordion-panel strictly consumers

New Features:

  • Adds ColorContextProvider and ColorContextConsumer controllers
  • Adds @colorContextProvider and @colorContextConsumer decorators
  • Adds @deprecation decorator
  • Adds className and attribute options to @pfelement decorator
  • Adds global (light DOM) link styling to pfe.min.css
  • Adds color-palette support to <pfe-modal>
  • Adds preliminary color context support to <pfe-button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment