Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Customize theme #8

Merged
merged 26 commits into from
Nov 3, 2020
Merged

Customize theme #8

merged 26 commits into from
Nov 3, 2020

Conversation

fairlighteth
Copy link
Contributor

@fairlighteth fairlighteth commented Oct 29, 2020

Closes #13

Customize dex-swap theme

@anxolin anxolin reopened this Nov 2, 2020
@anxolin anxolin marked this pull request as draft November 2, 2020 09:28
@anxolin anxolin removed request for anxolin and Velenir November 2, 2020 09:28
@anxolin anxolin changed the title Custom theme michel Customize theme Nov 2, 2020
@fairlighteth
Copy link
Contributor Author

General styles implemented, incl. buttons. For both Dark and Light mode.

Screen Shot 2020-11-02 at 16 09 15

Screen Shot 2020-11-02 at 16 09 08

Screen Shot 2020-11-02 at 16 09 00

Screen Shot 2020-11-02 at 16 08 48

@fairlighteth fairlighteth marked this pull request as ready for review November 2, 2020 15:12
@fairlighteth fairlighteth requested a review from anxolin November 2, 2020 15:12
@fairlighteth
Copy link
Contributor Author

Ready for review.

&:hover,
&:active {
background-color: transparent;
background-image: ${({ theme }) => `linear-gradient(270deg, ${theme.purple} 30%, ${theme.blue1} 70%);`};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tried making the code dryer by putting this line into a variable. It's also used on line 26. Need help refactoring as the gradient will be likely re-used more and more. Perhaps it makes sense to define this variable in the general theme file instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see 2 options:

@anxolin anxolin requested review from Velenir and W3stside November 2, 2020 15:55
&:hover,
&:active {
background-color: transparent;
background-image: ${({ theme }) => `linear-gradient(270deg, ${theme.purple} 30%, ${theme.blue1} 70%);`};
Copy link
Contributor

Choose a reason for hiding this comment

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

I see 2 options:

@@ -42,44 +42,47 @@ export function colors(darkMode: boolean): Colors {

// text
text1: darkMode ? '#FFFFFF' : '#000000',
text2: darkMode ? '#C3C5CB' : '#565A69',
text2: darkMode ? '#DCDCDC' : '#565A69',
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't modify any original file. I can help to make a "Mod" of this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, understand. There are multiple mods in this file just FYI.

Copy link
Contributor

Choose a reason for hiding this comment

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

I propose we create custom/theme/index.tsx with

import {colors as originColors} from '@/theme' // after #11 is merged

export function colors(darkMode: boolean): Colors {
  return {
    ...originColors(darkMode),
   <your_overrides>
}

Comment on lines 47 to 49
purple: Color
border: Color
disabled: Color
Copy link
Contributor

Choose a reason for hiding this comment

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

As this is just a type we should be able to extend it fairly easily anywhere in /custom
Merging Interfaces

@@ -42,44 +42,47 @@ export function colors(darkMode: boolean): Colors {

// text
text1: darkMode ? '#FFFFFF' : '#000000',
text2: darkMode ? '#C3C5CB' : '#565A69',
text2: darkMode ? '#DCDCDC' : '#565A69',
Copy link
Contributor

Choose a reason for hiding this comment

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

I propose we create custom/theme/index.tsx with

import {colors as originColors} from '@/theme' // after #11 is merged

export function colors(darkMode: boolean): Colors {
  return {
    ...originColors(darkMode),
   <your_overrides>
}

This was referenced Nov 3, 2020
* Import theme as global

* Override theme

* Use linear gradient

* Add message to reviewers

* Fix issue witht he gradient

* Rename linear background
@anxolin anxolin changed the base branch from custom-body to develop November 3, 2020 12:31
@anxolin anxolin requested review from anxolin and Velenir November 3, 2020 12:53
Copy link
Contributor

@anxolin anxolin left a comment

Choose a reason for hiding this comment

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

Good to go imo. @biocom can you just review the TODO from the background?

why is white?

@anxolin
Copy link
Contributor

anxolin commented Nov 3, 2020

@biocom I'm merging this one, cause it's already big and has a lot of approvals

if u can, check my comment, and we can address other things in new PRs #8 (review)

@anxolin anxolin merged commit 8ef60c5 into develop Nov 3, 2020
alfetopito pushed a commit that referenced this pull request Apr 26, 2021
anxolin added a commit that referenced this pull request Apr 27, 2021
* Issue #3: extra space between `price ,` removed

* Issue #4: `order best settlement` to `orders best settlement`

* Issue #5: Typo on `proo` -> `proof`

* Issue #6: Make `at your own risk` bold

* Removed unecessary empty space at the end of paragraphs

* Issue #7: Make CowSwap selling point bold

* Issue #8: Removed 1 `*` from "footnote"

* Replaced `neartime` by `near`. Don't think the first exists

* Issue #9: Added margin to <li> bottom

* Issue #12: Link the term `COW` instead of `explained`

* Issue #13: Define MEV acronym

* Issue #15: Link `milk it` to swap page

* Replaced `DEXs` with `DEXes`

* Remove milit link

* Move milk it to the end

* Improve message

Co-authored-by: Leandro Boscariol <[email protected]>
Co-authored-by: Anxo Rodriguez <[email protected]>
W3stside pushed a commit that referenced this pull request Jun 28, 2021
Co-authored-by: Jordan Frankfurt <[email protected]>
@anxolin anxolin deleted the custom-theme-michel branch July 2, 2021 13:51
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.

Create theme for dex-swap
3 participants