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

chore: New Theme Settings Integration #29848

Merged
merged 6 commits into from
Dec 28, 2023

Conversation

jsartisan
Copy link
Contributor

@jsartisan jsartisan commented Dec 26, 2023

Fixes #29262

Summary by CodeRabbit

  • Refactor
    • Renamed theme configuration property for consistency and clarity within the app's theme settings feature.

Copy link
Contributor

coderabbitai bot commented Dec 26, 2023

Walkthrough

The changes involve a systematic renaming of the term themeSetting to themeSettings to align with the backend API changes for new theme settings. This refactor impacts various components of the application, including API calls, Redux action constants, reducers, selectors, and UI components, ensuring consistency with the updated nomenclature and functionality related to the theme settings panel.

Changes

File Path Change Summary
.../src/ce/api/ApplicationApi.tsx
.../src/ce/constants/ReduxActionConstants.tsx
.../src/ce/reducers/uiReducers/applicationsReducer.tsx
.../src/ce/sagas/ApplicationSagas.tsx
.../src/ce/selectors/applicationSelectors.tsx
.../src/constants/AppConstants.ts
Renamed themeSetting to themeSettings across various files related to API, Redux constants, reducers, sagas, selectors, and constants.
.../src/pages/Editor/WDSThemePropertyPane/index.tsx Updated the property name from themeSetting to themeSettings in WDSThemePropertyPane.

Assessment against linked issues

Objective Addressed Explanation
Integration with new theme settings API (#29262) The renaming of themeSetting to themeSettings across multiple files suggests that the code has been refactored to integrate with the new theme settings API, aligning with the objective in the issue.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • You can directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • You can tag CodeRabbit on specific lines of code or entire files in the PR by tagging @coderabbitai in a comment. Examples:
    • @coderabbitai generate unit tests for this file
    • @coderabbitai modularize this function
  • You can tag @coderabbitai in a PR comment and ask questions about the PR and the codebase. Examples:
    • @coderabbitai gather interesting statistics about this repository and render them in a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai generate unit tests for the src/utils.ts file.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@github-actions github-actions bot added WDS team Anvil Pod Issue related to Anvil project labels Dec 26, 2023
@jsartisan jsartisan changed the title chore: New Settings Integration chore: New Theme Settings Integration Dec 26, 2023
@jsartisan
Copy link
Contributor Author

/build-deploy-preview

@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Dec 26, 2023
Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/7326973269.
Workflow: On demand build Docker image and deploy preview.
skip-tests: . env: .
PR: 29848.
recreate: .

Comment on lines 464 to 470
if (request.applicationDetail?.themeSettings) {
yield put(
updateApplicationThemeSettingAction(
request.applicationDetail?.themeSetting,
request.applicationDetail?.themeSettings,
),
);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 NOTE
Codebase verification is a beta feature.

Occurrences of both themeSetting and themeSettings are present in the codebase. It appears that not all instances of themeSetting were updated to themeSettings. This inconsistency should be addressed to align with the PR's objectives.

Analysis chain

The renaming from themeSetting to themeSettings in the updateApplicationSaga should be verified across the entire codebase to ensure consistency and that all references to the old term have been updated.


Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Search for any remaining occurrences of the old term 'themeSetting'.
rg --type tsx 'themeSetting'
# Ensure the new term 'themeSettings' is used consistently.
rg --type tsx 'themeSettings'

Length of output: 114



Script:

#!/bin/bash
# Search for any remaining occurrences of the old term 'themeSetting' without specifying file type.
rg 'themeSetting'
# Ensure the new term 'themeSettings' is used consistently without specifying file type.
rg 'themeSettings'

Length of output: 3428

@jsartisan
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/7327614246.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 29848.
recreate: .

Copy link

Deploy-Preview-URL: https://ce-29848.dp.appsmith.com

@jsartisan jsartisan requested review from a team and prsidhu and removed request for a team December 27, 2023 11:20
@AnaghHegde
Copy link
Member

/build-deploy-preview skip-tests=true

Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/7337856893.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 29848.
recreate: .

Copy link

Deploy-Preview-URL: https://ce-29848.dp.appsmith.com

@jsartisan jsartisan requested review from a team, sbalaji1192 and KelvinOm and removed request for a team December 27, 2023 11:50
@jsartisan
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/7338018197.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 29848.
recreate: .

@jsartisan
Copy link
Contributor Author

/ok-to-test

Copy link

The provided command lacks any tags. Please execute '/ok-to-test' again, specifying the tags you want to include or use @tag.All to run all specs.
Explore the tags documentation here

Copy link

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/7338080285.
Commit: ``.
Cypress dashboard url: Click here!
It seems like there are some failures 😔. We are not able to recognize it, please check this manually here.

Copy link

Deploy-Preview-URL: https://ce-29848.dp.appsmith.com

state.ui.applications.currentApplication?.applicationDetail?.themeSetting ||
defaultThemeSetting
);
return {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need these changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just making sure we spread out the theme setting that we get from the backend over the default settings. Previously it was like "If the backend has themeSettings, use that, otherwise use default Settings"

@jsartisan
Copy link
Contributor Author

/ok-to-test tags="@tag.Widget, @tag.Settings, @tag.PropertyPane, @tag.Theme"

Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/7344841310.
Workflow: Appsmith External Integration Test Workflow.
Tags: @tag.Widget, @tag.Settings, @tag.PropertyPane, @tag.Theme.

Copy link

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/7344841310.
Commit: ``.
Cypress dashboard url: Click here!
All cypress tests have passed 🎉🎉🎉

@jsartisan jsartisan merged commit 0128ef6 into release Dec 28, 2023
12 checks passed
@jsartisan jsartisan deleted the chore/theme-settings-integration branch December 28, 2023 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Anvil Pod Issue related to Anvil project skip-changelog Adding this label to a PR prevents it from being listed in the changelog WDS team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New theme settings Integration
3 participants