Skip to content

Dark Mode - #2730

Open
geromequa wants to merge 20 commits into
e-valuation:mainfrom
geromequa:1039-dark-mode
Open

Dark Mode#2730
geromequa wants to merge 20 commits into
e-valuation:mainfrom
geromequa:1039-dark-mode

Conversation

@geromequa

Copy link
Copy Markdown
Collaborator

Closes #1039.

@richardebeling richardebeling left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

generally looks good -- we can also merge partial progress here if we just "hide" the selector, in case you already want to get some changes / fixes in.

})
})
})
})() No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

missing trailing newline

Comment on lines +1 to +4
/*!
* Adapted color mode toggler from Bootstrap's docs (https://getbootstrap.com/)
*/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What's this about? This reads like copyright trouble

Comment on lines +22 to +26
/*if (theme === 'auto' && window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.documentElement.setAttribute('data-bs-theme', 'dark')
} else {*/
document.documentElement.setAttribute('data-bs-theme', theme)
//}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

commented code (repeated below)

Comment on lines +20 to +21
console.log("setTheme");
console.log(theme);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's remove these, I think the document.setAttribute below should always work and not trigger too many debugging scenarios (applies to all console.logs here)

}

@include button-disabled-variant(".btn-primary", $evap-dark-blue, $evap-light-blue);
@include button-disabled-variant(".btn-primary", $primary, $primary-accent); //TODO check which variants are needed

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

TODO check which variants are needed

@geromequa
geromequa marked this pull request as ready for review July 13, 2026 19:16
@janno42
janno42 self-requested a review July 13, 2026 19:16

@janno42 janno42 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

  • please move the mode selection dropdown between mode selection and user dropdown
  • please add a tooltip "Color mode" to the mode selection dropdown
  • import { unwrap } from "./utils"; in color-mode-toggler.js fails with Uncaught SyntaxError: import declarations may only appear at top level of a module

@janno42 janno42 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

  • on page reload, the page briefly flashes in light mode, even if it should be in dark mode

  • don't print getPreferredTheme in console please :)

  • the collapsible's header in the global rewards overview needs a different color:

Image
  • highlighted rows are too bright, and the white text can't be read anymore:
Image
  • the horizontal lines in modals should be less bright:
Image
  • "grayed out" bars (grade distribution and voter progress) should be darker:
Image
  • highlighted results rows on the student index page should be more highlighted (here the first row is highlighted in black):
Image
  • on the results page, the border around the selected evaluation should be brighter:
Image
  • on the results page, the outline, center bar, and arrows of bipolar distributions should be dark:
Image
  • maybe the participants badge should be inverted (many voters: bright, few voters: dark). what do you think?

  • selected buttons in btn-switch should be lighter (the contrast change should be similar to the one in light mode):

Image
  • btn-light seems to have no hover effect

  • callouts (all types, not only info) and alerts should be darker (when open and when closed), the link contrast should be fixed, and the close button should be darker.

Image Image
  • the vote buttons should be darker:
Image
  • the icon on the additional textanswer button should have the usual btn-light color:
Image
  • 'card-outline-primary' should have the primary color :)
Image
  • the red border on questions with error should be brighter:
Image
  • the dropdown arrow in input fields should be brighter:
Image
  • because you're more or less on it already, could you make the colors of the input fields in light mode consistent?:
Image
  • disabled inputs should have the same color, even if they are tomselect inputs
Image
  • we need different colors for badges in dark mode

  • the xmark for evaluations where grades will not be uploaded should be brighter:

Image
  • highlighted rows in the merge view should be darker:
Image
  • the background contrast of the selected tab should be higher:
Image

@janno42 janno42 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I found a few more things that I would be very happy if you could adjust as well. If you don't have time, please let me know so we can finish soon and avoid too many merge conflicts.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The colors of badges and buttons should be the same

  • primary: something between the current values, maybe shade-color($primary, 40%)
  • secondary: like the current badge
  • success: like the current badge
  • info: maybe tint-color($info-accent, 20%)
  • warning: like the current badge
  • danger: like the current badge
  • light/dark: switch the colors from the light theme

.callout-warning {
background-color: shade-color($warning, 50%);
border-color: $warning;
color: $light-gray;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
color: $light-gray;
color: $warning-accent;

.callout-danger {
background-color: shade-color($danger, 50%);
border-color: $danger;
color: $light-gray;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
color: $light-gray;
color: $danger-accent;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The hover effect on callout infoboxes should not change the text color and have a darker background than now

@@ -21,16 +21,16 @@

.progress-container-warning {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should stay a shade of yellow in dark mode, currently it's blue 😅

@janno42 janno42 Aug 11, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The header should have no hover effect

Image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the chevrons and the center line should be dark (with light shadow)

Image

when hovered, chevrons and text should be light (with dark shadow)

Image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the badge-participants's background color should range from $primary (highest number) to shade-color($primary, 50%) (lowest number)

Image

Comment on lines -2 to +6
color: $evap-dark-yellow;
color: $warning;
}

.error-label {
color: $evap-dark-red;
color: $danger;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In light mode, these should stay the dark variants

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The ordering icons should be darker if inactive and lighter if active

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Dark theme

3 participants