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

feat: massive theming-related PR #31590

Draft
wants to merge 27 commits into
base: master
Choose a base branch
from
Draft

feat: massive theming-related PR #31590

wants to merge 27 commits into from

Conversation

mistercrunch
Copy link
Member

@mistercrunch mistercrunch commented Dec 20, 2024

Excuse the large PR, but this is fairly tangled up, and working on fixing up theming probably requires some massive PRs as it's really hard to proceed PR-by-PR - especially during the holiday break...

Introducing less handlebars templates

First. Clearly we should move away from less and commit to emotion/antd for theming Now deleting the less files is going to be difficult. In the meantime, I wanted to provide a way for less files to source from the main theme object. I decided to go with handlebars since that should be part of the build process.

Considerations:

  • this is temporary, goal is to get rid of less altogether. Having this enables layering the theming work, and allows to make the theme DRY, instead of referncing the same colors a bunch of times
  • eventually could remove the .less files from the repo, and make sure they are dynamically generated on every builds. In the meantime I thought I'd leave them here, and we can instruct people to alter .less.hds files and run npm run compile-less on demand, if/when altering the main theme

Large refactor - what's in this PR?

  • less templates - as described above
  • New Theme object and subpackage as commented in the theming SIP
  • Refactoring/fixing out-of-theme, css-heavy components
    • Alert - vanilla is better!
    • AceEditor
    • EmptyState refactor (that component WAS A MESS, felt almost like on-purpose maze of indirections), fixed the svg so it can receive currentColor as opposed to using an tag - required for making it themable/dark-modable
    • ErrorAlert refactor (also a huge mess, simplifying quite a bit here)
  • Making antd components more vanilla
  • Getting rid of a bunch of CSS
  • Start aligning our css-in-js across the app to use the antd theme tokens
  • storybook improvements
    • improving the theme stories

what's NOT in this PR? - yet to come

  • more theme.antd referencing in emotion
  • move CSS / LESS deletion
  • antd v5 migrations
  • ability to configure an antd ThemeConfig as the theme setup, this will require more moving from legacy theme object to antd

Copy link

korbit-ai bot commented Dec 20, 2024

Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment /korbit-review.

Your admin can change your review schedule in the Korbit Console

@rusackas rusackas self-requested a review December 20, 2024 23:27
@mistercrunch mistercrunch force-pushed the template_less branch 2 times, most recently from f1c7929 to 43452ff Compare December 24, 2024 04:49
@mistercrunch mistercrunch changed the title feat: feat(less): templatize .less files to reference main theme feat: feat(less): massive theming-related PR Dec 30, 2024
@mistercrunch mistercrunch changed the title feat: feat(less): massive theming-related PR feat: massive theming-related PR Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants