Skip to content

Conversation

@tammy-a11y
Copy link
Contributor

  1. Added dark theme and other 3 themes

{ id: 'green-theme', primary: '#008000', displayName: 'Green Theme' }
];

getDefaultTheme(): string {
Copy link
Contributor

Choose a reason for hiding this comment

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

Shoudn't we call this method getCurrentTheme or getActiveTheme since it's going to return the active/current theme?

Copy link
Contributor Author

@tammy-a11y tammy-a11y Oct 16, 2025

Choose a reason for hiding this comment

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

This function sets the default theme and persists the selected theme for entire session. It does not handle embedded view scenario. Extending it to cover embedded-specific logic would tightly couple service logic with the component, so using setTheme instead

sdk-config.json Outdated
"comment_sdk_config": "This is the configuration file for the Angular-SDK",
"sdk_optional_configs_doc_comment": "See the document(link below) for more details on all the available config settings",
"sdk_optional_configs_doc": "https://docs.pega.com/bundle/constellation-sdk/page/constellation-sdks/sdks/configuring-sdk-config-json.html",
"theme": "dark-theme",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't we just set the value of theme to be dark instead of dark-theme?

Copy link
Contributor Author

@tammy-a11y tammy-a11y Oct 16, 2025

Choose a reason for hiding this comment

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

in themes.scss file, each theme is defined with these values: dark-theme, red-theme, default-theme etc. So by directly providing these values here without any modification, any component can access this value and set theme using setTheme function from theme.service and for defining values here, we need to provide in documentation.

@tammy-a11y tammy-a11y changed the title Theme changes in angular SDK-A Multiple theme support for both portal and embedded mode Oct 16, 2025
tumms2021389
tumms2021389 previously approved these changes Nov 3, 2025
@tumms2021389 tumms2021389 merged commit f866818 into pegasystems:master Nov 3, 2025
2 checks passed
@tumms2021389 tumms2021389 changed the title SDK-A Multiple theme support for both portal and embedded mode Theming support for both portal and embedded mode Nov 3, 2025
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.

3 participants