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

refactor/theme variables and v4 ui updates #2277

Merged
merged 7 commits into from
May 16, 2024

Conversation

enesozturk
Copy link
Contributor

@enesozturk enesozturk commented May 15, 2024

Changes

This PR introduces changes to our design system theme variables.

Theme variable namings

We are using inconsistent naming convention for the colors that some of the starts with --wui-color-* and some of the starts with --wui-*. At some certain situations. This is making things a bit hard.

Example case: at some components we might need set the local color with properties and we are following this approach which is easy and short way to make conditional stylings. Once we have different naming conventions for colors, we need to make extra conditions while setting the --local-color and this makes things harder.

public override render() {
    this.style.cssText = `
      --local-color: ${`var(--wui-color-${this.color});`}
      ...
    `
    ...
  }

Components updates

We have updates to many components at Figma, but buttons are one of the main components in our UI and they have now different colors, active & focus states and different variants. These components has been refactored completely:

  • wui-button
  • wui-chip-button

Updating page containers

In V4, we removed bottom border of the header, and that's why the content of the page is closer to header and there is no gap between. This PR also includes to padding refactors of the page container wui-flex elements

Theme elementStyle

In ThemeUtils file, we have elementStyle styling that we use this in almost every component. This styles including many stylings for a, and buttons, and their different states. Even though this seems good. While refactoring the wui-button realized that overriding button stylings in both places creates overhead.

When we create a web component which include <button/> inside, we should decide it's stylings inside that new web component. That button shouldn't use the common styles from elementStyle object.

Example playground run

Screen.Recording.2024-05-15.at.19.46.04.mov

Copy link

vercel bot commented May 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
web3modal-gallery ✅ Ready (Inspect) Visit Preview May 16, 2024 9:23am
web3modal-laboratory ✅ Ready (Inspect) Visit Preview May 16, 2024 9:23am

@enesozturk enesozturk merged commit 7904ba4 into V4 May 16, 2024
9 checks passed
@enesozturk enesozturk deleted the refactor/theme-variables-and-v4-ui-updates branch May 16, 2024 11:28
luu-alex added a commit to ChainSafe/web3modal that referenced this pull request May 16, 2024
* chore(lab): dogfooding button (reown-com#2206)

* chore: fix typos (reown-com#2188)

Signed-off-by: snoppy <[email protected]>
Co-authored-by: tomiir <[email protected]>

* refactor: render tooltip in root (reown-com#2210)

* feat: add react-ethers 6 example (reown-com#1920)

Co-authored-by: Sven <[email protected]>

* refactor: swap business logic improvements (reown-com#2199)

* chore: detailed canary timings (reown-com#2214)

* chore: add apple app site association (reown-com#2216)

* :feat add send logic  (reown-com#2173)

Co-authored-by: Cali93 <[email protected]>
Co-authored-by: Enes <[email protected]>

* fix: apple-app-site-association content type header (reown-com#2217)

* feat: Sign 2.5 (reown-com#2033)

Co-authored-by: Gancho Radkov <[email protected]>
Co-authored-by: Glitch <[email protected]>
Co-authored-by: Glitch <[email protected]>
Co-authored-by: Sven <[email protected]>
Co-authored-by: tomiir <[email protected]>
Co-authored-by: Enes <[email protected]>

* feat: Smart Account 6492 Signature Tests (reown-com#2196)

* fix: sign modal not appearing when going through siwe flow (reown-com#2213)

* Add signAndSendTransaction to Solflare, Backpack and Trust Wallet Ada… (reown-com#2190)

Co-authored-by: Valentyn <[email protected]>

* fix: missing call to SIWE `onSignOut` (reown-com#2054)

Co-authored-by: Glitch <[email protected]>
Co-authored-by: tomiir <[email protected]>

* fix: dayjs locale format seconds is not working and is polluting the global dayjs locale (reown-com#1689)

Co-authored-by: tomiir <[email protected]>
Co-authored-by: Gancho Radkov <[email protected]>
Co-authored-by: Gancho Radkov <[email protected]>
Co-authored-by: Ilja <[email protected]>
Co-authored-by: enesozturk <[email protected]>

* :deprecate - injected connector (reown-com#2223)

* chore: more canary timings (reown-com#2215)

* chore: updates ethereum-provider to latest (reown-com#2226)

* fix: add assertion for the erc20 abi json import (reown-com#2225)

* fix: encodes all `personal_sign` messages to hex (reown-com#2237)

Co-authored-by: Gancho Radkov <[email protected]>

* fix: siwe tests for 1 click auth (reown-com#2267)

* feat: phantom deeplink for mobile app browsers (reown-com#2250)

Co-authored-by: tomiir <[email protected]>

* fix: 4.2.0 bug fixes (reown-com#2234)

Co-authored-by: Enes <[email protected]>
Co-authored-by: Sven <[email protected]>
Co-authored-by: Sven <[email protected]>

* chore: UI canary 10 minute timeout (reown-com#2269)

* chore: bump to main 4.2.0 version (reown-com#2270)

* :feat social login - 1 - UI  (reown-com#2266)

Co-authored-by: enesozturk <[email protected]>

* :feat social login - 2 - Wallet (reown-com#2272)

* :feat social login - 3 - AuthConnector  (reown-com#2274)

* refactor: update profile name rendering logic (reown-com#2276)

* :hotfix in app support for injected and announced wallets  (reown-com#2279)

* refactor/theme variables and v4 ui updates (reown-com#2277)

---------

Signed-off-by: snoppy <[email protected]>
Co-authored-by: Chris Smith <[email protected]>
Co-authored-by: Snoppy <[email protected]>
Co-authored-by: tomiir <[email protected]>
Co-authored-by: Enes <[email protected]>
Co-authored-by: Sven <[email protected]>
Co-authored-by: Luka Isailovic <[email protected]>
Co-authored-by: Cali93 <[email protected]>
Co-authored-by: Gancho Radkov <[email protected]>
Co-authored-by: Gancho Radkov <[email protected]>
Co-authored-by: Glitch <[email protected]>
Co-authored-by: Glitch <[email protected]>
Co-authored-by: Sven <[email protected]>
Co-authored-by: GooxPF <[email protected]>
Co-authored-by: Valentyn <[email protected]>
Co-authored-by: Tiến Nguyễn Khắc <[email protected]>
Co-authored-by: Nikos Rossolatos <[email protected]>
Co-authored-by: Ilja <[email protected]>
@tomiir tomiir mentioned this pull request May 22, 2024
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.

2 participants