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): themes flexibility #3196

Merged
merged 15 commits into from May 1, 2024
Merged

refactor(theme): themes flexibility #3196

merged 15 commits into from May 1, 2024

Conversation

stackchain
Copy link
Member

@stackchain stackchain commented Apr 15, 2024

  • Covered with 100% tests
  • Renamed to use Tailwind CSS selectors (1 update is needed on Figma)
  • Added storage (selecting will persist)
  • Added detectTheme - will resolve from 'system' if empty and 'sytem' now is also a valid option
  • Refactored tokens (not liking the current definition) specially lineHeight
  • Renamed from - to _ so it can be accessed
  • Added tiny README.md
  • useTheme is designed to manage theme selection not to be consumed by the UI
  • useThemeColor is designed to consume colors
  • Moved from calculated to static
  • Split Palette into Base (dark/light) and Theme (exposed officially used)

It is using as const therefore making the properties read-only I'm guessing react-native will complain, it can leverage Writable or Draft from 'immer'

@github-actions github-actions bot added the chore label Apr 15, 2024
@stackchain stackchain changed the title refactor(theme): themes flex refactor(theme): themes flexibility Apr 15, 2024
@stackchain stackchain requested a review from SorinC6 April 15, 2024 22:51
@stackchain stackchain marked this pull request as ready for review April 15, 2024 22:51
@stackchain stackchain modified the milestones: 4.27.0, 4.28.0 Apr 15, 2024
@stackchain
Copy link
Member Author

stackchain commented Apr 15, 2024

@SorinC6 can you take it from here? It will require an update on wallet-mobile, big one.

  • Fix initialization (a storage is required, check Portfolio for example)
  • Fix consume from useTheme -> useThemeColor
  • Fix styles (need to import atoms) to everything that is not theme (color) based
  • Fix styles colors

It could also export from Theme the atoms, yet, IMHO is an overkill, unless is planned a compact / big version.

@stackchain stackchain added refactor and removed chore labels Apr 15, 2024
@stackchain
Copy link
Member Author

@SorinC6 please check with Design, if they approve the Base->Theme palette naming convention we can go on with the implementation

@stackchain stackchain merged commit 468a487 into develop May 1, 2024
2 checks passed
@stackchain stackchain deleted the chore/theme branch May 1, 2024 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants