Skip to content

feat: make initial theme configurable in app-config#281

Closed
EdithBirrer1 wants to merge 9 commits into
eclipse-edc:mainfrom
EdithBirrer1:feature/configInitialTheme
Closed

feat: make initial theme configurable in app-config#281
EdithBirrer1 wants to merge 9 commits into
eclipse-edc:mainfrom
EdithBirrer1:feature/configInitialTheme

Conversation

@EdithBirrer1
Copy link
Copy Markdown
Contributor

@EdithBirrer1 EdithBirrer1 commented Oct 10, 2025

What this PR changes/adds

The initially loaded theme can be set using the variable selectedTheme in app_config.json. (It is still possible to change to another theme manually.)

Why it does that

If there are several dashboards (e.g. for several connectors), it is useful to distinguish them by color.

I know that one dashboard could display several connectors, but it can be an advantage to have several dashboard instances, one for each connector. E.g. in setups where the dashboard is limited by networking mechanisms so it can only access "its own connector". And if there are several dashboards, it is possible (and useful) to distinguish them via the theme, so it is instantly visible which dashboard shows which connector.

Who will sponsor this feature?

@ronjaquensel Could you please review? A very small change, but could be very useful in the described situations.

Linked Issue(s)

#283

@ronjaquensel ronjaquensel requested a review from timdah October 13, 2025 06:17
@ronjaquensel
Copy link
Copy Markdown
Contributor

Hi @EdithBirrer1, thanks for the contribution. Please open a corresponding issue first before creating a PR as per our contribution guidelines. Also, you need to sign the Eclipse Contributor Agreement before any PR can be merged.

Copy link
Copy Markdown
Contributor

@timdah timdah left a comment

Choose a reason for hiding this comment

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

Hey @EdithBirrer1, thanks for your contribution. It's a good idea in general, but please tweak your implementation and then we are good to go.

Comment on lines +62 to +64
if (appConfig.selectedTheme) {
this.stateService.setTheme(appConfig.selectedTheme);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lets move this to the setAppConfig method in the state service and most important, this overrides the users theme selection stored in the local storage. So on application load the user selection is lost. The local storage theme config must have priority.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the input, will change it accordingly.

Comment thread public/config/app-config.json Outdated
Comment thread projects/dashboard-core/src/lib/models/app-config.ts Outdated
@timdah timdah added the enhancement New feature or request label Oct 14, 2025
EdithBirrer1 and others added 3 commits October 14, 2025 12:35
Co-authored-by: Tim Dahlmanns <13997715+timdah@users.noreply.github.com>
Co-authored-by: Tim Dahlmanns <13997715+timdah@users.noreply.github.com>
@EdithBirrer1
Copy link
Copy Markdown
Contributor Author

Hi @EdithBirrer1, thanks for the contribution. Please open a corresponding issue first before creating a PR as per our contribution guidelines. Also, you need to sign the Eclipse Contributor Agreement before any PR can be merged.

I'm very sorry. I had read the guidelines, but Legal Agreemend and all seemed very "heavy" for a 5 line change. But you are right, rules are rules. Now I hope I comply with them. Sorry again.

@ronjaquensel ronjaquensel requested a review from timdah October 15, 2025 06:20
@ronjaquensel ronjaquensel changed the title make initial theme configurable in app-config feat: make initial theme configurable in app-config Oct 15, 2025
@EdithBirrer1
Copy link
Copy Markdown
Contributor Author

The check fails because I have mistakenly committed my changes with the e-mail address (as recommended by github) EdithBirrer1@users.noreply.github.com instead of my real e-mail address. How should I proceed to fix it? I hesitate to make an "amend" commit...

Comment thread README.md
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Move it one line up, because right now it is inbetween the lines for enableUserConfig. Also default should be undefinded and the linebreak after is missing. I'm reviewing on my phone, so I'm unable to suggest the changes 😄

Otherwise, LGTM.

Regarding the mail adress: Commit these changes with the correct adress and the check should pass.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Misunderstood the "This user-specific configuration ..." to apply for the whole configuration, so that the whole app-config is stored locally.
Concerning the linebreak - there is one. (Or is it a Linux/Windows line ending issue?)

@ronjaquensel
Copy link
Copy Markdown
Contributor

@EdithBirrer1 linebreaks seem to be fine, rendering looks correct. Regarding the ECA issue with the wrong email: you can revert the commits locally, re-commit the changes with the other mail address and then force-push the branch. That should solve it.

@timdah
Copy link
Copy Markdown
Contributor

timdah commented Nov 7, 2025

@EdithBirrer1 any update?

@EdithBirrer1
Copy link
Copy Markdown
Contributor Author

I tried to fix it: revert the commits I have done with the wrong e-mail-address and then did the changes with the correct e-mail-address, but this apparently did not help...
Maybe it is easiest if I do everything on a new branch and open a new pull request. Will do that later today if you agree.

@timdah
Copy link
Copy Markdown
Contributor

timdah commented Nov 7, 2025

I tried to fix it: revert the commits I have done with the wrong e-mail-address and then did the changes with the correct e-mail-address, but this apparently did not help... Maybe it is easiest if I do everything on a new branch and open a new pull request. Will do that later today if you agree.

Sure, fine with me.

@timdah
Copy link
Copy Markdown
Contributor

timdah commented Nov 11, 2025

Superseded by #290

@timdah timdah closed this Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants