Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

feat(Button): Icon support and default style updates #51

Merged
merged 37 commits into from
Aug 21, 2019

Conversation

jadenlemmon
Copy link
Contributor

@jadenlemmon jadenlemmon commented Aug 2, 2019

Update molekule default styles

Summary
Several updates to align with new HeyDoctor brand including:

  • Default colors update
  • Button refresh
  • Ability to pass button icon prop to display an icon in the button
  • Updating docs to use default HeyDoctor fonts
  • Updates rollup (had an issue compiling on current version)
  • Update tests
  • Minor updates to components with new colors

Risk factor
Some of the color updates could introduce a breaking change so I can consider just deprecating after we evaluate in the apps.

New button page

@ci-reporter

This comment has been minimized.

@codecov
Copy link

codecov bot commented Aug 2, 2019

Codecov Report

Merging #51 into master will decrease coverage by 4.46%.
The diff coverage is 80%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #51      +/-   ##
==========================================
- Coverage    68.5%   64.04%   -4.47%     
==========================================
  Files          22       22              
  Lines         435      470      +35     
  Branches       92      104      +12     
==========================================
+ Hits          298      301       +3     
- Misses        107      127      +20     
- Partials       30       42      +12
Impacted Files Coverage Δ
src/theme.js 100% <100%> (ø) ⬆️
src/Button/Button.js 66.66% <75%> (ø) ⬆️
src/Form/Label.js 25% <0%> (-8.34%) ⬇️
src/Form/Formbot.js 2.12% <0%> (-1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3041c12...d737aee. Read the comment docs.

@codecov
Copy link

codecov bot commented Aug 2, 2019

Codecov Report

Merging #51 into v5 will increase coverage by 0.58%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##               v5      #51      +/-   ##
==========================================
+ Coverage   66.29%   66.88%   +0.58%     
==========================================
  Files          22       22              
  Lines         451      456       +5     
  Branches       91       91              
==========================================
+ Hits          299      305       +6     
+ Misses        123      122       -1     
  Partials       29       29
Impacted Files Coverage Δ
src/theme.js 100% <ø> (ø) ⬆️
src/utils.js 95.23% <100%> (+0.23%) ⬆️
src/Button/Button.js 72.22% <100%> (+5.55%) ⬆️
src/Badge/Badge.js 100% <100%> (ø) ⬆️
src/Flex/Flex.js 100% <0%> (+25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9d18867...17cd936. Read the comment docs.

docs/wrapper.js Outdated Show resolved Hide resolved
src/theme.js Outdated Show resolved Hide resolved
src/theme.js Outdated Show resolved Hide resolved
@jadenlemmon jadenlemmon marked this pull request as ready for review August 5, 2019 01:46
@jadenlemmon jadenlemmon requested review from mathewmorris and a team August 5, 2019 01:46
@ghost ghost requested review from choochootrain and kylealwyn August 5, 2019 01:46
docs/wrapper.js Outdated Show resolved Hide resolved
docs/wrapper.js Outdated Show resolved Hide resolved
src/Badge/__snapshots__/Badge.spec.js.snap Outdated Show resolved Hide resolved
src/Button/Button.js Outdated Show resolved Hide resolved
src/theme.js Outdated Show resolved Hide resolved
@erikshestopal

This comment has been minimized.

css`
background-color: ${hover.backgroundColor || backgroundColor};
border-color: ${hover.borderColor || hover.backgroundColor || backgroundColor};
color: ${hover.fontColor || fontColor};
Copy link
Contributor

Choose a reason for hiding this comment

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

When hovering over a text only button, I'm not seeing the text color change per the Figma specs. Same things goes for the active state.

src/theme.js Outdated
const fonts = [
{
name: 'Tiempos',
url: '//cdn.heydoctor.com/fonts/TiemposHeadlineWeb-Semibold.woff2',
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if we need to include this in the theme - could you elaborate on how you seeing this used in the consuming apps?

Copy link
Contributor

Choose a reason for hiding this comment

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

The goal here was to default as much as possible to HeyDoctor/GoodRx design, but I can understand leaving this out for the heydoctor theme file in each project.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kylealwyn It was just added to provide it as a default font. If we don't want to add it to the library we can add it individually to each app.

src/theme.js Outdated
backgroundColor: colors.white,
fontColor: colors.primary,
borderColor: colors.primary,
textColor: colors.primary,
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with @cehsu here - fontColor and textColor will be too easy to conflate. I propose text buttons be their own variant, e.g. greyText, so we don't have to be too tricky with the text prop

src/Badge/__snapshots__/Badge.spec.js.snap Outdated Show resolved Hide resolved
src/Button/Button.js Outdated Show resolved Hide resolved
src/Button/Button.js Outdated Show resolved Hide resolved
src/Button/Button.js Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Aug 21, 2019

Codecov Report

Merging #51 into v5 will increase coverage by 0.58%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##               v5      #51      +/-   ##
==========================================
+ Coverage   66.29%   66.88%   +0.58%     
==========================================
  Files          22       22              
  Lines         451      456       +5     
  Branches       91       91              
==========================================
+ Hits          299      305       +6     
+ Misses        123      122       -1     
  Partials       29       29
Impacted Files Coverage Δ
src/theme.js 100% <ø> (ø) ⬆️
src/utils.js 95.23% <100%> (+0.23%) ⬆️
src/Button/Button.js 72.22% <100%> (+5.55%) ⬆️
src/Badge/Badge.js 100% <100%> (ø) ⬆️
src/Flex/Flex.js 100% <0%> (+25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9d18867...17cd936. Read the comment docs.

@codecov
Copy link

codecov bot commented Aug 21, 2019

Codecov Report

Merging #51 into v5 will increase coverage by 0.58%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##               v5      #51      +/-   ##
==========================================
+ Coverage   66.29%   66.88%   +0.58%     
==========================================
  Files          22       22              
  Lines         451      456       +5     
  Branches       91       91              
==========================================
+ Hits          299      305       +6     
+ Misses        123      122       -1     
  Partials       29       29
Impacted Files Coverage Δ
src/theme.js 100% <ø> (ø) ⬆️
src/utils.js 95.23% <100%> (+0.23%) ⬆️
src/Button/Button.js 72.22% <100%> (+5.55%) ⬆️
src/Badge/Badge.js 100% <100%> (ø) ⬆️
src/Flex/Flex.js 100% <0%> (+25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9d18867...e8621a5. Read the comment docs.

@kylealwyn kylealwyn changed the title feat(Button): Updated default styles & button refresh feat(Button): Icon support and default style updates Aug 21, 2019
@erikshestopal
Copy link
Contributor

erikshestopal commented Aug 21, 2019

Echoing what Claire brough up here, are we still going to support these types of alerts? (I reached out to Jay+Mike for comment)

Screen Shot 2019-08-21 at 3 21 48 PM

@kylealwyn
Copy link
Contributor

kylealwyn commented Aug 21, 2019

No, the bars were legacy and we should only support the banner style in the system

@kylealwyn kylealwyn merged commit dc7809d into v5 Aug 21, 2019
mathewmorris added a commit that referenced this pull request Aug 21, 2019
* v5:
  feat(Button): Icon support and default style updates (#51)
mathewmorris added a commit that referenced this pull request Aug 23, 2019
* v5:
  feat(Button): Icon support and default style updates (#51)
  feat(Colors): Updates colors (#60)
  chore(release): 4.1.6
  fix(FormError): Fix crash in case context is null (#59)
  chore(release): 4.1.5
  fix: Use updater function in setState for Formbot updates (#58)
  chore(release): 4.1.4
  fix(validations): Fix handling of async validations as well as order of onChange notification (#57)
  chore(release): 4.1.3
  Async Formbot Validations (#56)
@mathewmorris mathewmorris deleted the feat/patient-rd-button branch August 29, 2019 23:01
@kylealwyn kylealwyn mentioned this pull request Sep 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants