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

Profile page: Add vCOW swap feature cards #2564

Merged
merged 9 commits into from
Mar 22, 2022
Merged

Conversation

fairlighteth
Copy link
Contributor

Summary

🡒 Note: This is part of a waterfall PR series 🡐

  • Adds styled component (cards) to support the vCOW/COW token balance display and conversion.

Desktop

Screen Shot 2022-03-18 at 12 28 19

Tablet/Medium resolutions

Screen Shot 2022-03-18 at 12 28 03

Mobile/small resolutions

Screen Shot 2022-03-18 at 12 27 18

No vCOW card container: Governance card falls in to place:

Screen Shot 2022-03-18 at 15 34 34

Only the COW balance:

Screen Shot 2022-03-18 at 15 35 08

Just to demonstrate the sizing flexibility of the card elements.


Light mode

Screen Shot 2022-03-18 at 15 43 44


Todo

  • Style the unvested/vested tooltip further + light mode [?] icon
  • Center page titles (Profile). Need to check as this affects all content pages.
  • Style/create the governance card
  • Cross browser/device tests

@fairlighteth fairlighteth requested review from a team March 18, 2022 15:48
@github-actions
Copy link
Contributor

  • 🔭 GP Swap: CoW Protocol v2 Swap UI

@fairlighteth
Copy link
Contributor Author

Noticed on medium resolution, the COW balance token icon position/margin could be improved. Will handle in a up following PR (cc @elena-zh )

@alfetopito
Copy link
Contributor

Noticed on medium resolution, the COW balance token icon position/margin could be improved. Will handle in a up following PR (cc @elena-zh )

You mean this, right?
Screen Shot 2022-03-18 at 10 51 13

@elena-zh
Copy link

Hey @fairlighteth , great changes!
And thanks for making me aware of the issue about token icon position/margin as I wanted to report it
enhance aligment.jpg

What I'd like to add, is that it would be nice to make alignment of all components more or less the same in a middle-screen devices. Look:
maybe center.jpg

Another proposal I'd like to make, is to re-use a component from the bottom affiliate forms to show Vested tokens amount. WDYT?
image.png

Just to confirm: if a user does not have (v)COW tokens on the balance/not connected, we will show a regular Profile page without newly added components, right?

I have to notice, that I was not able to test cases when a user does not have vCOW card container, or COW balance only, so I will retest it later.
All the rest changes LGTM (tested in Win10+Chrome, FF, Brave, iOS 15.3 +Chrome, Androind 10+Chrome).

fairlighteth and others added 2 commits March 21, 2022 15:40
* Add governance card banner.

* Governance banner update styles.
@fairlighteth
Copy link
Contributor Author

fairlighteth commented Mar 21, 2022

Updated the tooltip icons to be dynamically use the right dark/light mode colors. Also updated the (swap) container background color to match the others below:

Screen.Recording.2022-03-21.at.16.35.35.mov

@fairlighteth
Copy link
Contributor Author

@elena-zh Made some updates to properly align elements for different viewports:
Screen Shot 2022-03-21 at 17 13 01
Screen Shot 2022-03-21 at 17 12 49

@fairlighteth
Copy link
Contributor Author

Just to confirm: if a user does not have (v)COW tokens on the balance/not connected, we will show a regular Profile page without newly added components, right?

@elena-zh I think at the very least we show the COW balance + governance banner. I think it's beneficial to show both these to make users more aware of COW/Governance. Perhaps we could even add a button 'Buy COW token' when your balance is 0. Obviously this can only be implemented once vCOW is swappable.

the vCOW / convert card we would not show, unless you have >0 vCOW balance.

@alfetopito
Copy link
Contributor

BTW, latest changes are failing the build
Screen Shot 2022-03-21 at 15 59 08

Just comment out/remove those variables

@fairlighteth
Copy link
Contributor Author

@alfetopito Right, forgot that it would break the build, fixed now!

@elena-zh
Copy link

Hey @fairlighteth , changes LGTM now!
The only thing I'd like to mention, that it would be nice to make formatting of these amounts locale dependable
image

Also, it would be nice to show full amounts on hover as we do for all amounts across the app
image

But I feel that everything I have mention is our of scope of the current task.

Thanks!

@fairlighteth
Copy link
Contributor Author

@elena-zh Thanks for reviewing again:

The only thing I'd like to mention, that it would be nice to make formatting of these amounts locale dependable
Also, it would be nice to show full amounts on hover as we do for all amounts across the app

Yes agreed, let's keep this in mind when the actual balances are connected (now hard coded).

@elena-zh
Copy link

@fairlighteth , I have created #2571 task for this

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.

Look great to me!

I only have two tiny nitpicks, which you can ignore.

One is, that i think in responsive, is more relevant the COW than vCow so it should be higher:
image

The other, is I kind of liked more your original proposal for the background of the vested amount. I agree with making it coherent, but maybe your proposed background was nicer than the one we had for the affiliate.

@fairlighteth
Copy link
Contributor Author

One is, that i think in responsive, is more relevant the COW than vCow so it should be higher

Yes, I can see that. I think I'll add a custom 'order' prop on an upcoming PR for the vCOW container.

The other, is I kind of liked more your original proposal for the background of the vested amount. I agree with making it coherent, but maybe your proposed background was nicer than the one we had for the affiliate.

Agreed. Didn't want to add too many changes on this PR and just make it coherent instead. Will adjust this in an upcoming PR for all elements on this page.

@fairlighteth fairlighteth merged commit baf2293 into develop Mar 22, 2022
fairlighteth added a commit that referenced this pull request Mar 22, 2022
* Profile page: Add vCOW swap feature cards (#2564)

* Style vCOW swap cards.

* Style vCOW swap cards. (#2565)

* Add governance card banner. (#2566)

* Add governance card banner.

* Governance banner update styles.

* Make question icon use dynamic dark/light mode colors.

* Center content properly cross devices.

* Dummy values.

* Disable unused vars

* Cleanup obsolete color

* Styling of vesting breakdown tooltip.
@alfetopito alfetopito deleted the convert-vcow branch March 22, 2022 22:13
fairlighteth added a commit that referenced this pull request Mar 23, 2022
* Profile page: Add vCOW swap feature cards (#2564)

* Style vCOW swap cards.

* Style vCOW swap cards. (#2565)

* Add governance card banner. (#2566)

* Add governance card banner.

* Governance banner update styles.

* Make question icon use dynamic dark/light mode colors.

* Center content properly cross devices.

* Dummy values.

* Disable unused vars

* Cleanup obsolete color

* Styled governance banner and inner card container.

* Fix code style issues with Prettier

* Style update (trigger build)

Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
nenadV91 added a commit that referenced this pull request Mar 23, 2022
* Profile page: Add vCOW swap feature cards (#2564)

* Style vCOW swap cards.

* Style vCOW swap cards. (#2565)

* Add governance card banner. (#2566)

* Add governance card banner.

* Governance banner update styles.

* Make question icon use dynamic dark/light mode colors.

* Center content properly cross devices.

* Dummy values.

* Disable unused vars

* Cleanup obsolete color

* Connect UI and vCow data

* Added PR changes

* Remove some previous change

* Added swapAll abi (#2576)

Co-authored-by: fairlight <31534717+fairlighteth@users.noreply.github.com>
nenadV91 pushed a commit that referenced this pull request Mar 30, 2022
* Update FAQ to reflect Token Launch

This PR pushes a new content section from lines 559 - 627 that addresses questions related to the token launch. I have tried format everything as good as I possibly know/can, apologies if it needs to be reworked. 

Questions are: 
562 - Does CowSwap Have a token? 
580 - Is there a proposal to make vCOW transferrable?
585 - what is the purspose of the COW tokens?
605 - what was the criteria for the token airdrop?

* Fix code style issues with Prettier

* Fix building error

* Add space

* Profile page: Add vCOW swap feature cards (#2564)

* Style vCOW swap cards.

* Style vCOW swap cards. (#2565)

* Add governance card banner. (#2566)

* Add governance card banner.

* Governance banner update styles.

* Make question icon use dynamic dark/light mode colors.

* Center content properly cross devices.

* Dummy values.

* Disable unused vars

* Cleanup obsolete color

* Moving custom components to mod file to avoid circular dependencies/lazy loading issues (#2580)

Co-authored-by: Leandro <leandro.boscariol@gnosis.io>

* Remove isClaiming flag (#2586)

* Remove lint warn (#2587)

* Update index.tsx

* Fix code style issues with Prettier

* Split and refactor FAQ

* Update FAQ to reflect Token Launch (#2540)

* Update FAQ to reflect Token Launch

This PR pushes a new content section from lines 559 - 627 that addresses questions related to the token launch. I have tried format everything as good as I possibly know/can, apologies if it needs to be reworked. 

Questions are: 
562 - Does CowSwap Have a token? 
580 - Is there a proposal to make vCOW transferrable?
585 - what is the purspose of the COW tokens?
605 - what was the criteria for the token airdrop?

* Fix code style issues with Prettier

* Fix building error

* Add space

* Update index.tsx

* Fix code style issues with Prettier

* Add punctuantions

Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
Co-authored-by: Anxo Rodriguez <anxolin@gmail.com>

* Fix links

* Add footer

* Add footer to index too

* Update metrics

* Fix internal links

* Hide back in home

* Link to FAQ

* Correct year

* Fix typo. Fixes #2067

* Re-style FAQ menu.

* Title styles.

* Cleanup console.log

* Fix merge and style back to top + misc.

* Text updates.

* Fix code style issues with Prettier

* Remove click events.

* Fix lint issue.

* Remove is claim enabled

Co-authored-by: Alex V <80408352+avsavsavs@users.noreply.github.com>
Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
Co-authored-by: Anxo Rodriguez <anxolin@gmail.com>
Co-authored-by: Leandro Boscariol <alfetopito@users.noreply.github.com>
Co-authored-by: Leandro <leandro.boscariol@gnosis.io>
Co-authored-by: w3stside <david.sato64@gmail.com>
nenadV91 added a commit that referenced this pull request Mar 30, 2022
* Split refactor faq (#2592)

* Update FAQ to reflect Token Launch

This PR pushes a new content section from lines 559 - 627 that addresses questions related to the token launch. I have tried format everything as good as I possibly know/can, apologies if it needs to be reworked.

Questions are:
562 - Does CowSwap Have a token?
580 - Is there a proposal to make vCOW transferrable?
585 - what is the purspose of the COW tokens?
605 - what was the criteria for the token airdrop?

* Fix code style issues with Prettier

* Fix building error

* Add space

* Update index.tsx

* Fix code style issues with Prettier

* Split and refactor FAQ

* Fix links

* Add footer

* Add footer to index too

* Update metrics

* Fix internal links

* Hide back in home

* Link to FAQ

* Correct year

* Fix typo. Fixes #2067

Co-authored-by: Alex V <80408352+avsavsavs@users.noreply.github.com>
Co-authored-by: Lint Action <lint-action@samuelmeuli.com>

* Re-style FAQ menu. (#2611)

* Update FAQ to reflect Token Launch

This PR pushes a new content section from lines 559 - 627 that addresses questions related to the token launch. I have tried format everything as good as I possibly know/can, apologies if it needs to be reworked. 

Questions are: 
562 - Does CowSwap Have a token? 
580 - Is there a proposal to make vCOW transferrable?
585 - what is the purspose of the COW tokens?
605 - what was the criteria for the token airdrop?

* Fix code style issues with Prettier

* Fix building error

* Add space

* Profile page: Add vCOW swap feature cards (#2564)

* Style vCOW swap cards.

* Style vCOW swap cards. (#2565)

* Add governance card banner. (#2566)

* Add governance card banner.

* Governance banner update styles.

* Make question icon use dynamic dark/light mode colors.

* Center content properly cross devices.

* Dummy values.

* Disable unused vars

* Cleanup obsolete color

* Moving custom components to mod file to avoid circular dependencies/lazy loading issues (#2580)

Co-authored-by: Leandro <leandro.boscariol@gnosis.io>

* Remove isClaiming flag (#2586)

* Remove lint warn (#2587)

* Update index.tsx

* Fix code style issues with Prettier

* Split and refactor FAQ

* Update FAQ to reflect Token Launch (#2540)

* Update FAQ to reflect Token Launch

This PR pushes a new content section from lines 559 - 627 that addresses questions related to the token launch. I have tried format everything as good as I possibly know/can, apologies if it needs to be reworked. 

Questions are: 
562 - Does CowSwap Have a token? 
580 - Is there a proposal to make vCOW transferrable?
585 - what is the purspose of the COW tokens?
605 - what was the criteria for the token airdrop?

* Fix code style issues with Prettier

* Fix building error

* Add space

* Update index.tsx

* Fix code style issues with Prettier

* Add punctuantions

Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
Co-authored-by: Anxo Rodriguez <anxolin@gmail.com>

* Fix links

* Add footer

* Add footer to index too

* Update metrics

* Fix internal links

* Hide back in home

* Link to FAQ

* Correct year

* Fix typo. Fixes #2067

* Re-style FAQ menu.

* Title styles.

* Cleanup console.log

* Fix merge and style back to top + misc.

* Text updates.

* Fix code style issues with Prettier

* Remove click events.

* Fix lint issue.

* Remove is claim enabled

Co-authored-by: Alex V <80408352+avsavsavs@users.noreply.github.com>
Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
Co-authored-by: Anxo Rodriguez <anxolin@gmail.com>
Co-authored-by: Leandro Boscariol <alfetopito@users.noreply.github.com>
Co-authored-by: Leandro <leandro.boscariol@gnosis.io>
Co-authored-by: w3stside <david.sato64@gmail.com>

Co-authored-by: Anxo Rodriguez <anxolin@gmail.com>
Co-authored-by: Alex V <80408352+avsavsavs@users.noreply.github.com>
Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
Co-authored-by: fairlight <31534717+fairlighteth@users.noreply.github.com>
Co-authored-by: Leandro Boscariol <alfetopito@users.noreply.github.com>
Co-authored-by: Leandro <leandro.boscariol@gnosis.io>
Co-authored-by: w3stside <david.sato64@gmail.com>
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.

4 participants