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: New Theme Structure and Custom Style Integration #1958

Merged
merged 17 commits into from
Dec 24, 2024

Conversation

kanikabansal-juspay
Copy link
Collaborator

@kanikabansal-juspay kanikabansal-juspay commented Dec 19, 2024

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

  • Added types for the new themes structure to append the custom style object to the DOM, enabling compatibility with Tailwind and UI configuration.
  • Updated corresponding style definitions to align with the new structure.
  • Introduced a feature flag (themes-feature) to toggle support for the new themes. When enabled, styles are fetched dynamically from the API. For this PR it'll be always false to support existing structure.
  • Modified the primary secondary colors sidebar styles, background, typography (text color), border, and button states (primary, secondary, hover, and text) as an initial update.
Screenshot 2024-12-24 at 1 47 46 PM

Motivation and Context

To support themes.

  • Turned on themes-feature by setting it to true.
  • Added a sample JSON theme structure in fetchConfig (in HyperSwitchEntry.res).
  • Checked the dashboard to see if the changes showed up as expected.

Where to test it?

  • INTEG
  • SANDBOX
  • PROD

Checklist

  • I ran npm run re:build
  • I reviewed submitted code
  • I added unit tests for my changes where possible

@kanikabansal-juspay kanikabansal-juspay self-assigned this Dec 19, 2024
@kanikabansal-juspay kanikabansal-juspay requested a review from a team as a code owner December 19, 2024 09:49
Copy link

semanticdiff-com bot commented Dec 19, 2024

Review changes with  SemanticDiff

Changed Files
File Status
  public/hyperswitch/module.js  16% smaller
  tailwind.config.js  8% smaller
  config/config.toml Unsupported file format
  src/UIConifg/UIConfig.res Unsupported file format
  src/components/Button.res Unsupported file format
  src/context/ThemeProvider.res Unsupported file format
  src/entryPoints/AuthModule/AuthWrapper.res Unsupported file format
  src/entryPoints/AuthModule/PreLoginModule/AuthSelect.res Unsupported file format
  src/entryPoints/AuthModule/PreLoginModule/ResetPassword.res Unsupported file format
  src/entryPoints/FeatureFlagUtils.res Unsupported file format
  src/entryPoints/HyperSwitchApp.res Unsupported file format
  src/entryPoints/HyperSwitchEntry.res Unsupported file format
  src/entryPoints/configs/HyperSwitchConfigTypes.res Unsupported file format
  src/entryPoints/configs/HyperSwitchDefaultConfig.res Unsupported file format
  src/libraries/Window.res Unsupported file format
  src/screens/Sidebar/Sidebar.res Unsupported file format

@kanikabansal-juspay kanikabansal-juspay linked an issue Dec 19, 2024 that may be closed by this pull request
7 tasks
@kanikabansal-juspay kanikabansal-juspay added C-feature Category: Feature request or enhancement S-in-progress Status: Implementation is underway labels Dec 19, 2024
@kanikabansal-juspay kanikabansal-juspay removed the S-in-progress Status: Implementation is underway label Dec 24, 2024
@kanikabansal-juspay kanikabansal-juspay added this pull request to the merge queue Dec 24, 2024
Merged via the queue into main with commit e15d0a1 Dec 24, 2024
5 of 6 checks passed
@kanikabansal-juspay kanikabansal-juspay deleted the theme-structure branch December 24, 2024 11:29
@github-actions github-actions bot added Closed Applied to issues or pull requests that have been successfully resolved or completed and removed C-feature Category: Feature request or enhancement labels Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Applied to issues or pull requests that have been successfully resolved or completed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Support themes
3 participants