Skip to content

refactor: 💡 remove unnecessary complex types in themes setup (technical debt)#787

Open
punkbit wants to merge 5 commits intochore/tech-debt-clear-scss-setupfrom
refactor/remove-unnecessary-complex-types-prefer-human-readable
Open

refactor: 💡 remove unnecessary complex types in themes setup (technical debt)#787
punkbit wants to merge 5 commits intochore/tech-debt-clear-scss-setupfrom
refactor/remove-unnecessary-complex-types-prefer-human-readable

Conversation

@punkbit
Copy link
Collaborator

@punkbit punkbit commented Jan 29, 2026

Why?

The src/theme/index.ts has a few utility types that seem unnecessarily complex, e.g. they are not human-readable, cause confusion and are meaningless in the context of providing utility or any sort of added value. Here, we introduce changes that make it much more idiomatic, minimal or simpler.

Consequently, found an issue which is being reported internally, as after simplifying it, it's found that there's an ⚠️ inconsistency between light and dark theme data structures; Bear in mind that the data structures MUST be equal (not discussing the values but structure wise). While this has to be solved in the origin or source, e.g. Figma, the changes in the Figma theme provided data structures to expose them.

Note that it's solely to facilitate communication and help pinpoint where the problem is located: it does NOT mean or suggest this has to be done manually or that it's ok to change these two files directly in the source code. These MUST be resolved in the source Figma file.

⚠️ WARNING: Depends on chore: 🤖 clear scss setup (technical debt)#784 which should be merged firstly
🤖 Switch base branch to main, once #784 merged

How?

  • Remove nonsense types which are utterly complex and not readable
  • Expose inconsistency in the data structures that have to be solved in Figma

Preview?

Shows typescript code hinting working correctly by the language server in a text editor:

demo-refactor-remove-unnecessary-complex-types-show-type-hinting.mov

Shows Typescript type

Screenshot 2026-01-29 at 10 56 43

@vercel
Copy link

vercel bot commented Jan 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
click-ui Ready Ready Preview, Comment Feb 4, 2026 1:50pm

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Jan 29, 2026

🦋 Changeset detected

Latest commit: 3b79e5b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clickhouse/click-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

…unnecessary-complex-types-prefer-human-readable
@punkbit punkbit marked this pull request as ready for review February 3, 2026 10:44
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