Allow setting Dark Palette as default initial state in Palette Switcher
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
Línea de trabajo
Comienza siguiendo la configuración del componente Palette Switcher en el Customizer y el filtro neve_default_color_palette; después, inspecciona cómo están conectados el estado de la primera visita, el almacenamiento local y el manejo de prefers-color-scheme. Se considera terminado cuando un valor predeterminado Light/Base o Dark configurado solo se aplica cuando no hay ninguna preferencia almacenada, mientras que el cambio, la persistencia y el mapeo semántico adaptado al sistema operativo siguen siendo correctos.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Impact: 70 · Confidence: 90 · Complexity: 50
Description
Problem: Currently, the Palette Switcher component in Neve always defaults to the 'Base Palette' (Light) for first-time visitors when 'Automatically adjust color scheme' is disabled. Site owners who want a dark-themed site by default are forced to swap color definitions between Base and Dark palettes, which breaks semantic OS-aware color scheme detection (prefers-color-scheme) and accessibility expectations.
Desired Behavior: Provide an option in the Palette Switcher component settings (and/or a PHP filter) to define which palette (Base/Light or Dark) serves as the default state for first-time visitors before any preference is stored in local storage, while retaining correct semantic mapping when OS-aware detection is active or when the user toggles modes.
Acceptance Criteria:
- Add a setting in the Customizer Palette Switcher component (or PHP filter
neve_default_color_palette) to specify the default initial palette (Light/Base vs Dark). - First-time visitors without a stored palette choice receive the configured default palette.
- Palette Switcher toggling, local storage persistence, and OS-aware logic continue to work correctly with their respective semantic light/dark designations.
Customer Context
The customer is a WordPress developer on Neve Pro (Business plan) who redesigned their site with a dark theme as the primary design. They want new visitors to see the Dark Palette on first load, but cannot swap colors between Base and Dark palettes because doing so inverts OS-aware logic (prefers-color-scheme) for visitors with native Light OS settings.
Root Cause Analysis
The root cause is that Neve's Palette Switcher hardcodes the 'Base Palette' (Light) as the default fallback for unvisited sessions when automatic OS detection is disabled or unsupported. Site owners who design dark-first websites cannot configure the initial default palette to be Dark without swapping palette color definitions, which degrades accessibility and breaks semantic OS-aware preference detection.
Reasoning
The customer (a Pro WordPress developer on a Business plan) needs to set the Dark Palette as the initial default palette for first-time visitors without breaking the semantically correct Light/Dark roles or OS-aware logic (prefers-color-scheme). Currently, Neve hardcodes the 'Base Palette' (Light) as the default first-visit state when automatic OS adjustment is disabled. Swapping colors in the Customizer is an invalid workaround because it breaks accessibility and OS-aware detection. Allowing site owners to select which palette serves as the initial default (Base/Light vs Dark) or providing a filter to set initial palette state is a legitimate net-new capability.
Source: HelpScout #3439746979
Generated by feature-request-triage workflow (ID: feature-request-triage_6a9953537c3006.83729601)
- Lenguaje dominante
- PHP
- Estrellas
- 307
- Forks
- 88
- Merge medio
- 1 d 23 h
- PR fusionados (30 d)
- 14
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Codeinwp/neve
-
Primary menu dropdown arrows gain circular button decoration in Neve 4.2.13Posiblemente ocupada @girishpanchal30 la tomó hoy. Abiertobug-report bug-report-triage customer report regression
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Codeinwp/neve#4636 · 5 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
feature-request-triage
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
-
feature-request-triage
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
-
customer report feature-request-triage
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
Los mantenedores suelen responder en 1 día
-
customer report feature-request-triage
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
Todos los issues de Codeinwp/neve
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Awaiting Triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
WordPress/two-factor#1008 ·
Los mantenedores suelen responder en 1 día
-
sync-en
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día