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

feat(plugins): allow adding custom themes #1194

Merged
merged 11 commits into from
May 7, 2019
Merged

feat(plugins): allow adding custom themes #1194

merged 11 commits into from
May 7, 2019

Conversation

j-a-m-l
Copy link
Contributor

@j-a-m-l j-a-m-l commented Apr 18, 2019

Proposed changes

This PR includes a way to load and select new UI themes.

This PR depends on #1191 to deal with permissions

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING documentation
  • Lint and unit tests pass locally with my changes

@ghost ghost added Complexity: Medium Less than 256 lines changed. Type: Feature The issue is a request for new functionality. labels Apr 18, 2019
@codecov-io
Copy link

codecov-io commented Apr 18, 2019

Codecov Report

Merging #1194 into next will decrease coverage by 0.4%.
The diff coverage is 3.07%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #1194      +/-   ##
==========================================
- Coverage   39.29%   38.88%   -0.41%     
==========================================
  Files         224      224              
  Lines        5935     6000      +65     
  Branches     1184     1200      +16     
==========================================
+ Hits         2332     2333       +1     
- Misses       3405     3460      +55     
- Partials      198      207       +9
Impacted Files Coverage Δ
...omponents/Wallet/WalletExchange/WalletExchange.vue 8.33% <ø> (ø) ⬆️
src/renderer/store/modules/session.js 34.48% <ø> (+0.29%) ⬆️
src/renderer/App.vue 0% <0%> (ø) ⬆️
...components/App/AppSidemenu/AppSidemenuSettings.vue 0% <0%> (ø) ⬆️
src/renderer/pages/Profile/ProfileNew.vue 7.77% <0%> (+0.8%) ⬆️
src/renderer/store/modules/plugin.js 0% <0%> (ø) ⬆️
src/renderer/pages/Profile/ProfileEdition.vue 8.54% <0%> (-0.23%) ⬇️
src/renderer/mixins/session.js 0% <0%> (ø) ⬆️
src/renderer/services/plugin-manager.js 2.19% <0%> (-0.2%) ⬇️
...rc/renderer/components/MarketChart/MarketChart.vue 28.57% <66.66%> (-2.2%) ⬇️
... and 5 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 f64cfbb...7adf106. Read the comment docs.

@alexbarnsley alexbarnsley changed the base branch from v2.4.0 to next May 3, 2019 13:54
@alexbarnsley alexbarnsley changed the title feat(plugins): allow addding custom themes feat(plugins): allow adding custom themes May 3, 2019
@alexbarnsley
Copy link
Member

@j-a-m-l do you have an example plugin I can test this with?

@j-a-m-l
Copy link
Contributor Author

j-a-m-l commented May 3, 2019

@j-a-m-l j-a-m-l requested a review from ItsANameToo as a code owner May 6, 2019 10:46
@alexbarnsley
Copy link
Member

I like this 👍

Copy link
Contributor

@luciorubeens luciorubeens left a comment

Choose a reason for hiding this comment

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

Beautiful theme 🌮!

  • It can overwrite the built-in themes (light/dark) without the user editing the profile;
  • When the plugin is removed or disabled the wallet does not apply any default theme.

src/renderer/App.vue Outdated Show resolved Hide resolved
src/renderer/services/plugin-manager.js Show resolved Hide resolved
@j-a-m-l
Copy link
Contributor Author

j-a-m-l commented May 6, 2019

@luciorubeens I've made several changes.

About overwriting user styles, it can happen everywhere, as the security testing plugin demonstrated. We don't have a good solution for that. At most we could try to remove rules before/after injecting the CSS, but it wouldn't matter, since users could include them on HTML or using new tricks.

@j-a-m-l j-a-m-l merged commit 1ba0505 into next May 7, 2019
@ghost ghost deleted the plugin-themes branch May 7, 2019 11:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Complexity: Medium Less than 256 lines changed. Type: Feature The issue is a request for new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants