-
Notifications
You must be signed in to change notification settings - Fork 2
Theming support for both portal and embedded mode #321
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
Conversation
tammy-a11y
commented
Sep 5, 2025
- Added dark theme and other 3 themes
packages/angular-sdk-components/src/lib/_components/infra/navbar/navbar.component.ts
Show resolved
Hide resolved
...ngular-sdk-components/src/lib/_components/designSystemExtension/banner/banner.component.scss
Outdated
Show resolved
Hide resolved
2278a52 to
e1a7b1f
Compare
f79744e to
db5b927
Compare
| { id: 'green-theme', primary: '#008000', displayName: 'Green Theme' } | ||
| ]; | ||
|
|
||
| getDefaultTheme(): string { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.