Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions app/assets/tailwind/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,34 @@ html[data-theme="rose_pine_dawn"] {
--color-danger: #aa586f;
}

html[data-theme="amoled"] {
--app-color-scheme: dark;
--color-on-primary: #000000;
--color-darker: #000000;
--color-dark: #000000;
--color-darkless: #121212;
--color-red: #ff1744;
--color-orange: #ff9100;
--color-yellow: #ffea00;
--color-green: #00e676;
--color-cyan: #00e5ff;
--color-blue: #448aff;
--color-purple: #d500f9;
--color-primary: #00e5ff;
--color-secondary: #757575;
--color-muted: #616161;
--color-text-muted: #616161;
--color-surface: #000000;
--color-surface-100: #0a0a0a;
--color-surface-200: #121212;
--color-surface-300: #1e1e1e;
--color-surface-content: #ffffff;
--color-info: #448aff;
--color-success: #00e676;
--color-warning: #ffea00;
--color-danger: #ff1744;
}

html[data-theme="rose_pine_dawn"] body {
background-color: #FCF2E9;
}
Expand Down
17 changes: 17 additions & 0 deletions app/models/concerns/user_theme_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,23 @@ module UserThemeConfiguration
success: "#286983",
warning: "#a35a00"
}
},
{
value: "amoled",
label: "AMOLED",
description: "Pure black for the darkest dark mode.",
color_scheme: "dark",
theme_color: "#00e5ff",
preview: {
darker: "#000000",
dark: "#000000",
darkless: "#121212",
primary: "#00e5ff",
content: "#ffffff",
info: "#448aff",
success: "#00e676",
warning: "#ffea00"
}
}
Comment on lines +177 to 192
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.

P1 CI test will break — missing test update

The existing test "theme options include all supported themes in order" in test/models/user_test.rb (lines 10–25) asserts an exact ordered list of theme values and does not include "amoled". Since THEME_OPTIONS now contains 11 entries, this test will fail with an array mismatch in CI.

Add "amoled" to the end of the expected array in test/models/user_test.rb:

assert_equal %w[
  standard
  neon
  catppuccin_mocha
  catppuccin_iced_latte
  gruvbox_dark
  github_dark
  github_light
  nord
  rose
  rose_pine_dawn
  amoled
], values
Prompt To Fix With AI
This is a comment left during a code review.
Path: app/models/concerns/user_theme_configuration.rb
Line: 177-192

Comment:
**CI test will break — missing test update**

The existing test `"theme options include all supported themes in order"` in `test/models/user_test.rb` (lines 10–25) asserts an exact ordered list of theme values and does **not** include `"amoled"`. Since `THEME_OPTIONS` now contains 11 entries, this test will fail with an array mismatch in CI.

Add `"amoled"` to the end of the expected array in `test/models/user_test.rb`:

```ruby
assert_equal %w[
  standard
  neon
  catppuccin_mocha
  catppuccin_iced_latte
  gruvbox_dark
  github_dark
  github_light
  nord
  rose
  rose_pine_dawn
  amoled
], values
```

How can I resolve this? If you propose a fix, please make it concise.

].freeze
THEME_OPTION_BY_VALUE = THEME_OPTIONS.index_by { |theme| theme[:value] }.freeze
Expand Down
3 changes: 2 additions & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def country_subregion
github_light: 6,
nord: 7,
rose: 8,
rose_pine_dawn: 9
rose_pine_dawn: 9,
amoled: 10
}

def can_convict_users?
Expand Down
Loading