[GH-ISSUE #776] Using constant for theme instead of direct values ("light", "dark", "system") #229

Closed
opened 2026-02-26 18:46:02 +03:00 by kerem · 0 comments
Owner

Originally created by @plxity on GitHub (Dec 21, 2023).
Original GitHub issue: https://github.com/documenso/documenso/issues/776

Improvement Description

Currently, directly strings are used for setting up themes like - "light", "dark" and "system".direct

Rationale

This would be useful to keep the code clean and add more theme variables in future if required.

Proposed Solution

Using constant object for theme variables like

export const THEMES = {
  DARK: 'dark',
  LIGHT: 'light',
  SYSTEM: 'system'
};

Alternatives (optional)

No response

Additional Context

No response

Please check the boxes that apply to this improvement suggestion.

  • I have searched the existing issues and improvement suggestions to avoid duplication.
  • I have provided a clear description of the improvement being suggested.
  • I have explained the rationale behind this improvement.
  • I have included any relevant technical details or design suggestions.
  • I understand that this is a suggestion and that there is no guarantee of implementation.
Originally created by @plxity on GitHub (Dec 21, 2023). Original GitHub issue: https://github.com/documenso/documenso/issues/776 ### Improvement Description Currently, directly strings are used for setting up themes like - "light", "dark" and "system".direct ### Rationale This would be useful to keep the code clean and add more theme variables in future if required. ### Proposed Solution Using constant object for theme variables like ```js export const THEMES = { DARK: 'dark', LIGHT: 'light', SYSTEM: 'system' }; ``` ### Alternatives (optional) _No response_ ### Additional Context _No response_ ### Please check the boxes that apply to this improvement suggestion. - [X] I have searched the existing issues and improvement suggestions to avoid duplication. - [X] I have provided a clear description of the improvement being suggested. - [X] I have explained the rationale behind this improvement. - [X] I have included any relevant technical details or design suggestions. - [X] I understand that this is a suggestion and that there is no guarantee of implementation.
kerem 2026-02-26 18:46:02 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#229
No description provided.