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

Added styled-components theme provider #87

Merged
merged 19 commits into from
Jun 2, 2019
Merged

Added styled-components theme provider #87

merged 19 commits into from
Jun 2, 2019

Conversation

arronhunt
Copy link
Contributor

@arronhunt arronhunt commented May 16, 2019

Resolves #80

The goal is to convert the current method of references theme variables to use styled-components' theme provider. This will allow for the default theme to be overridden and allow for more customization for admin-bro.

TODO:

  • Use <ThemeProvider> and theme props for variables
  • Allow for a theme to be passed down via AdminBroOptions

@codecov
Copy link

codecov bot commented May 16, 2019

Codecov Report

Merging #87 into master will decrease coverage by 2.63%.
The diff coverage is 36.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #87      +/-   ##
==========================================
- Coverage   58.37%   55.74%   -2.64%     
==========================================
  Files         113      114       +1     
  Lines        2047     2149     +102     
  Branches      191      188       -3     
==========================================
+ Hits         1195     1198       +3     
- Misses        821      921     +100     
+ Partials       31       30       -1
Impacted Files Coverage Δ
src/frontend/components/ui/loader.jsx 71.42% <0%> (-14.29%) ⬇️
src/frontend/components/ui/label.jsx 72.72% <0%> (-27.28%) ⬇️
src/frontend/components/login/index.jsx 41.66% <0%> (-28.34%) ⬇️
src/frontend/components/ui/property-in-filter.jsx 66.66% <0%> (-16.67%) ⬇️
src/frontend/components/app/record-in-list.jsx 64.7% <0%> (-11.77%) ⬇️
src/frontend/components/ui/paginate.jsx 54.54% <0%> (-6.75%) ⬇️
src/frontend/components/ui/styled-button.jsx 42.85% <0%> (-47.15%) ⬇️
src/frontend/components/ui/dropdown.jsx 60% <0%> (-13.34%) ⬇️
src/frontend/components/app/breadcrumbs.jsx 40% <0%> (-12.39%) ⬇️
src/frontend/components/ui/table.jsx 55.55% <0%> (-44.45%) ⬇️
... and 40 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 ce534be...7f7a1fb. Read the comment docs.

@arronhunt
Copy link
Contributor Author

@wojtek-krysiak I also wanted to propose a few changes to the overall theme/design that I personally feel would be beneficial.

  1. Changing default variable sizes to use the 8pt grid system
  2. Convert to rem units instead of pixel units
  3. Changing some of the color values to improve contrast to meet accessibility standards (see image below)

Screen Shot 2019-05-15 at 9 38 46 PM

These are all changes that can easily be made to the src/styles/variables.js file and would greatly improve responsiveness and a11y of the application.

@wojtek-krysiak
Copy link
Contributor

@arronhunt next Friday at SoftwareBrothers we are hosting a hackaton and designers told me that they would like to update the design of AdminBro (on hackaton) :) - I already passed your comments to them so they will make an update.

@arronhunt arronhunt changed the title WIP: Added styled-components theme provider Added styled-components theme provider May 19, 2019
@wojtek-krysiak wojtek-krysiak changed the base branch from master to v0.9 June 2, 2019 21:23
@wojtek-krysiak wojtek-krysiak merged commit 0b62509 into SoftwareBrothers:v0.9 Jun 2, 2019
@wojtek-krysiak
Copy link
Contributor

@arronhunt I've merged that to v0.9 branch. I will release it along with other bigger changes.

@arronhunt arronhunt deleted the todo/#80-Theme-Provider branch July 21, 2019 23:06
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.

None yet

2 participants