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

refactor: move rules and variables to themes/teams #57

Merged
merged 5 commits into from
Aug 8, 2018

Conversation

levithomason
Copy link
Member

@levithomason levithomason commented Aug 8, 2018

This is a breakout of #16:

Changes

  1. Rules and variables were moved to src/themes/teams/components.
  2. Rules were renamed to Styles for easier understanding.

Fixes

  1. Text styles were directly importing siteVariables, which is not allowed. The textVariables were updated to compose the siteVariables. Now, textStyles simply uses the textVariables it receives as part of its argument.

  2. ListItem variables were defined in listVariables. Those have been moved to listItemVariables. The redundant item* prefixes were removed from the variable names.

Changelog

No entry as this is a refactor that does not affect consumers.

@codecov
Copy link

codecov bot commented Aug 8, 2018

Codecov Report

Merging #57 into master will decrease coverage by 1.04%.
The diff coverage is 84.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #57      +/-   ##
==========================================
- Coverage   86.92%   85.88%   -1.05%     
==========================================
  Files          75       74       -1     
  Lines        1178     1098      -80     
  Branches      215      224       +9     
==========================================
- Hits         1024      943      -81     
- Misses        148      149       +1     
  Partials        6        6
Impacted Files Coverage Δ
.../themes/teams/components/Avatar/avatarVariables.ts 100% <ø> (ø)
...mes/teams/components/Icon/fontAwesomeIconStyles.ts 80% <ø> (ø)
...emes/teams/components/Chat/chatMessageVariables.ts 100% <ø> (ø)
.../components/Accordion/accordionContentVariables.ts 25% <ø> (ø)
src/themes/teams/components/Menu/menuVariables.ts 100% <ø> (ø)
...hemes/teams/components/Divider/dividerVariables.ts 100% <ø> (ø)
src/components/Provider/Provider.tsx 58.33% <ø> (ø) ⬆️
src/themes/teams/components/Header/headerStyles.ts 100% <ø> (ø)
src/components/Chat/Chat.tsx 95.23% <100%> (ø) ⬆️
...c/themes/teams/components/Divider/dividerStyles.ts 70.58% <100%> (ø)
... and 49 more

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 3cb9fab...7402cc3. Read the comment docs.

return Object.keys(rules).reduce((acc, ruleName) => {
acc[ruleName] = renderRule(rules[ruleName], ruleProps)
return Object.keys(styles).reduce((acc, styleName) => {
acc[styleName] = renderRule(styles[styleName], styleProps)
Copy link
Member Author

Choose a reason for hiding this comment

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

Note, renderRule is part of the fela API, hence, it is not changed.

Copy link
Contributor

@alinais alinais 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 to me.

@levithomason levithomason force-pushed the chore/move-theme-files branch from 9420470 to 7402cc3 Compare August 8, 2018 18:30
@levithomason levithomason merged commit 5b72d95 into master Aug 8, 2018
@levithomason levithomason deleted the chore/move-theme-files branch August 8, 2018 18:32
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.

2 participants