Skip to content

make the theme switch configurable

Feature

Summary

This MR provides the option to configure the "theme switch / color palette" (whether to show it) and deletes the unicorn theme.

Since the unicorn stuff has been deleted, there are only two remaining "color themes": the default one configured in quasar.conf.js and - if a project decides to do so - the projectcolors configured in the index.template.html file.

If these projectcolors aren't set, it doesn't make sense at all to show the palette, since it would include the default theme only.

hence: in order to show the palette, a project has to

  • a) set the themes switch to true AND
  • b) configure their respective colors

Does the result of the MR comply to our "definition of done"?

  • Unit tests passed
  • Code reviewed
  • Acceptance criteria met
  • Functional tests passed
  • Non-Functional requirements met
  • Product Owner accepts the User Story

Documentation

  • I updated the README (if applicable)
  • I provided my functions with appropriate documentation
  • I adjusted other parts of the documentation (if applicable)

Tests

Are we able to test this new feature?

  • Yes, everything can be done via unit tests.
  • Yes, you can test by following these steps:
  • checkout the branch: git checkout feature/#327-make-the-theme-switch-configurable
  • run your local env: npm run dev

1

  • edit the index.template.html file:
    • set themes to true
    • configure some arbitrary colors: e.g.
"colors": {
  "primary": "#E7E7E7",
  "secondary": "#F9F711",
  "accent": "#00CAD9"
}

expected: color palette shows up and you can switch between the two themes

2

  • omit one of the two config steps described above, e.g.: stick to themes: true and delete the colors you set in the recent step

expected: color palette doesn't show up

3

  • give it a try the other way around: set themes: false and reenter the colors you configured in step 1

expected: color palette doesn't show up

  • No, it is not possible.

Changelog

  • I added a statement to the CHANGELOG.

Related Tickets

Add all related issues and especially those to be closed.

Related

Closes

#327 (closed)

Logs and Screenshots

/cc Mathias Göbel, Frank Schneider, Michelle Weidling

Edited by schneider210

Merge request reports