Skip to content

Color by status - #672

Open
AlexPerathoner wants to merge 1 commit into
sbondCo:devfrom
AlexPerathoner:feature/color-by-status
Open

Color by status#672
AlexPerathoner wants to merge 1 commit into
sbondCo:devfrom
AlexPerathoner:feature/color-by-status

Conversation

@AlexPerathoner

Copy link
Copy Markdown
Contributor

Changes made

Added background color on Poster based on watch status

immagine

@AlexPerathoner
AlexPerathoner force-pushed the feature/color-by-status branch from af5cd41 to 10602b5 Compare November 5, 2024 23:38

@IRHM IRHM 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.

Hi @AlexPerathoner thank you for implementing this!

I had some comments on some of the code. One of them I was unsure of if I was testing correctly, if it fixed anything im not seeing?

When I find some more time, I wanted to look into the colors too. I may just tweak around with them to see if we can get them to hide less of the poster while still being legible (like the old color). If not, I may implement a setting to allow toggling this on/off.

Comment thread src/lib/poster/ExtraDetails.svelte Outdated
Comment thread src/lib/nav/DetailedMenu.svelte Outdated
@IRHM IRHM self-assigned this Dec 2, 2024
@IRHM IRHM added the enhancement New feature or request label Dec 2, 2024
@AlexPerathoner
AlexPerathoner force-pushed the feature/color-by-status branch from 5bdc826 to dbaf09c Compare June 2, 2025 15:54
@AlexPerathoner
AlexPerathoner requested a review from IRHM June 20, 2025 23:22
@AlexPerathoner

Copy link
Copy Markdown
Contributor Author

Any update on this?

Copilot AI review requested due to automatic review settings March 2, 2026 23:34
@AlexPerathoner
AlexPerathoner force-pushed the feature/color-by-status branch from dbaf09c to c2b2379 Compare March 2, 2026 23:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds status-based coloring for poster “Extra Details” and expands where the “Detailed View” UI can be used (search/person/discover), with a small menu positioning tweak.

Changes:

  • Introduces CSS variables intended for per-status colors.
  • Applies a status-based background color to the poster ExtraDetails overlay and adjusts its sizing/positioning.
  • Enables the “Detailed View” button on /person and /discover routes and adjusts the detailed menu alignment for those routes.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/vars.scss Adds theme CSS custom properties + SCSS vars, including new --status-* color variables.
src/routes/(app)/+layout.svelte Shows the “Detailed View” button on additional routes (/person, /discover).
src/lib/poster/ExtraDetails.svelte Computes/applies a status-based background color and tweaks overlay layout.
src/lib/nav/DetailedMenu.svelte Adjusts menu right positioning for /person and /discover.
Comments suppressed due to low confidence (1)

src/vars.scss:66

  • src/vars.scss largely duplicates variables already present in src/styles/norm.scss (CSS custom properties) and src/styles/_vars.scss (SCSS variables). Keeping parallel sources of truth for theme variables will make future changes error-prone. Prefer adding only the new status-related variables to the existing global theme files instead of introducing a second vars file.
:root {
	--bg-color: white;
	--bg-color-accent: rgb(180, 180, 180);
	--nav-color: rgba(255, 255, 255, 0.8);
	--text-color: black;
	--text-color-accent: rgb(90, 90, 90);
	--accent-color: rgba(128, 128, 128, 0.226);
	--accent-color-hover: rgba(46, 46, 46);
	--backdrop-filter: blur(4px) grayscale(80%);
	--backdrop-mix-blend-mode: multiply;
	--rating-color: black;
	--placeholder-color: #8e8e8e;
	--poster-rating-color: gold;
	--img-blend-multiply-bg-col: rgba(0, 0, 0, 0.85);

	--status-finished-color: rgba(123, 213, 85, 0.8);
	--status-planned-color: rgba(247, 154, 99, 0.8);
	--status-watching-color: rgba(61, 100, 242, 0.8);
	--status-hold-color: rgba(232, 93, 117, 0.8);
	--status-dropped-color: rgba(232, 93, 117, 0.8);
}

:root.theme-dark {
	--bg-color: rgb(15, 15, 15);
	--bg-color-accent: rgb(70, 70, 70);
	--nav-color: rgba(15, 15, 15, 0.438);
	--text-color: white;
	--text-color-accent: rgb(180, 180, 180);
	--accent-color: rgba(46, 46, 46);
	--accent-color-hover: rgba(255, 255, 255, 0.8);
	--backdrop-filter: blur(0.5px) grayscale(50%);
	--backdrop-mix-blend-mode: difference;
	--rating-color: gold;
	--placeholder-color: #8e8e8e;
	--poster-rating-color: black;
	--img-blend-multiply-bg-col: rgba(255, 255, 255, 0.03);
}

$bg-color: var(--bg-color);
$bg-color-accent: var(--bg-color-accent);
$text-color: var(--text-color);
$text-color-accent: var(--text-color-accent);
$placeholder-color: var(--placeholder-color);
$accent-color: var(--accent-color);
$accent-color-hover: var(--accent-color-hover);
$backdrop-filter: var(--backdrop-filter);
$backdrop-mix-blend-mode: var(--backdrop-mix-blend-mode);
$backdrop-mask-image: linear-gradient(
	to bottom,
	rgba(0, 0, 0, 1) 80%,
	rgba(0, 0, 0, 0)
);
$nav-color: var(--nav-color);
$nav-height: 71px; // How tall the nav is naturally, usefull in some places.
$poster-rating-color: var(--poster-rating-color);
$poster-extra-detail-bg-color: rgba(46, 46, 46, 0.5);
// Bg col of elements with image behind with mix-blend-mode: multiply where we want a little of image to come through.
$img-blend-multiply-bg-col: var(--img-blend-multiply-bg-col);
$warn: #f38755;
$error: #f3555a;
$success: #28a745;
$success-hover: #1e7e34;

// For ratings that are on bg-color.
$rating-color: var(--rating-color);


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/vars.scss
Comment on lines +1 to +20
:root {
--bg-color: white;
--bg-color-accent: rgb(180, 180, 180);
--nav-color: rgba(255, 255, 255, 0.8);
--text-color: black;
--text-color-accent: rgb(90, 90, 90);
--accent-color: rgba(128, 128, 128, 0.226);
--accent-color-hover: rgba(46, 46, 46);
--backdrop-filter: blur(4px) grayscale(80%);
--backdrop-mix-blend-mode: multiply;
--rating-color: black;
--placeholder-color: #8e8e8e;
--poster-rating-color: gold;
--img-blend-multiply-bg-col: rgba(0, 0, 0, 0.85);

--status-finished-color: rgba(123, 213, 85, 0.8);
--status-planned-color: rgba(247, 154, 99, 0.8);
--status-watching-color: rgba(61, 100, 242, 0.8);
--status-hold-color: rgba(232, 93, 117, 0.8);
--status-dropped-color: rgba(232, 93, 117, 0.8);

Copilot AI Mar 2, 2026

Copy link

Choose a reason for hiding this comment

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

This file defines the CSS custom properties used for status colors (e.g. --status-finished-color), but the app’s global CSS variables appear to be defined in src/styles/norm.scss (imported from src/routes/+layout.svelte), and SCSS globals are prepended from src/styles/_vars.scss via svelte.config.js. src/vars.scss doesn’t appear to be imported anywhere, so these --status-* variables likely won’t exist at runtime and the new poster coloring won’t work. Either move these :root additions into src/styles/norm.scss or ensure this file is included in the global stylesheet.

Copilot uses AI. Check for mistakes.

{#if (page.url?.pathname === "/" || page.url?.pathname.startsWith("/search")) && store.wlDetailedView && store.wlDetailedView.length > 0}
<div class="extra-details">
{#if (page.url?.pathname === "/" || page.url?.pathname.startsWith("/search") || page.url?.pathname.startsWith("/person") || page.url?.pathname.startsWith("/discover")) && details && store.wlDetailedView && store.wlDetailedView.length > 0}

Copilot AI Mar 2, 2026

Copy link

Choose a reason for hiding this comment

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

details is referenced in this {#if ...} condition but it isn’t defined anywhere in this component (it’s not part of PosterExtraDetails and isn’t destructured from $props()). This will cause a compile/runtime error. Remove the details && guard or replace it with the correct prop/variable you intended to check.

Suggested change
{#if (page.url?.pathname === "/" || page.url?.pathname.startsWith("/search") || page.url?.pathname.startsWith("/person") || page.url?.pathname.startsWith("/discover")) && details && store.wlDetailedView && store.wlDetailedView.length > 0}
{#if (page.url?.pathname === "/" || page.url?.pathname.startsWith("/search") || page.url?.pathname.startsWith("/person") || page.url?.pathname.startsWith("/discover")) && store.wlDetailedView && store.wlDetailedView.length > 0}

Copilot uses AI. Check for mistakes.
DROPPED: "var(--status-dropped-color)",
};

let backgroundColor = status !== undefined ? statusColorMap[status] : "";

Copilot AI Mar 2, 2026

Copy link

Choose a reason for hiding this comment

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

backgroundColor is computed once at component initialization, so it won’t update when status changes (e.g., after the user updates the watched status). Make this value reactive (e.g., derive it from status) so the background color stays in sync.

Suggested change
let backgroundColor = status !== undefined ? statusColorMap[status] : "";
let backgroundColor = $derived(
status !== undefined ? statusColorMap[status] : "",
);

Copilot uses AI. Check for mistakes.
Comment on lines +50 to 51
<div class="extra-details" style="background-color: {backgroundColor}">
<!--

Copilot AI Mar 2, 2026

Copy link

Choose a reason for hiding this comment

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

The inline style="background-color: {backgroundColor}" will override the SCSS background-color: $poster-extra-detail-bg-color;. When status is undefined or not in the map, backgroundColor becomes an empty/undefined value and the element may end up with no background (hurting readability). Consider falling back to $poster-extra-detail-bg-color or only applying the inline background color when a mapped status color exists.

Copilot uses AI. Check for mistakes.
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

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants