-
Notifications
You must be signed in to change notification settings - Fork 1
feat: migrate Rider-Pi dashboard styles to shared layout #250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Summary of ChangesHello @mpieniak01, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! Ten pull request wprowadza znaczącą refaktoryzację stylów dashboardu Rider-Pi, przechodząc na modułową architekturę CSS. Celem jest poprawa utrzymywalności, skalowalności i spójności wizualnej interfejsu użytkownika. Zmiany obejmują usunięcie przestarzałych plików CSS, wprowadzenie scentralizowanych tokenów projektowych i komponentów UI, a także umożliwienie dynamicznego zarządzania motywami. Dzięki temu kod CSS jest bardziej uporządkowany i łatwiejszy do rozwijania w przyszłości. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
Świetna robota z migracją stylów do nowej, modułowej architektury CSS! Podział na tokeny, bazę, layout, komponenty i utility to bardzo dobra praktyka, która znacząco poprawi utrzymywalność i spójność wizualną dashboardu. Wprowadzenie motywów przez zmienne CSS to również duży plus.
Znalazłem kilka kwestii, które warto byłoby zaadresować:
- Rozmiar pliku
components.cssprzekracza ustalone w projekcie limity, co może utrudnić jego utrzymanie. - Pliki CSS dla poszczególnych stron (
web/assets/pages/*.css) są zminifikowane, co utrudnia ich przeglądanie i edycję. - W pliku
control.htmlusunięto funkcjonalność "Zezwól na ruch", co wydaje się być zmianą w zachowaniu, a PR jest oznaczony jako "MOVE-FIRST".
Szczegóły zawarłem w komentarzach do kodu. Poza tymi uwagami, refaktoryzacja wygląda bardzo solidnie.
I am having trouble creating individual review comments. Click here to see my feedback.
web/control.html (130-151)
Wygląda na to, że funkcjonalność 'Zezwól na ruch' (ang. 'Allow motion') została usunięta w tym PR. Zniknął zarówno odpowiedni fragment HTML, jak i logika w JavaScript. Zgodnie z opisem, ten PR miał być typu 'MOVE-FIRST' bez zmiany zachowania. Usunięcie funkcjonalności jest zmianą w zachowaniu. Czy to zamierzone? Jeśli tak, warto zaktualizować opis PR.
web/assets/css/components.css (1-838)
Ten plik ma ponad 800 linii, co przekracza ustalony w projekcie limit 600 linii na plik. Warto rozważyć jego podział na mniejsze, bardziej wyspecjalizowane pliki, np. cards.css, buttons.css, forms.css itp. Ułatwi to nawigację i przyszłe modyfikacje.
web/assets/pages/assistant.css (1)
Pliki CSS w katalogu web/assets/pages/ (w tym ten) są zminifikowane. W kodzie źródłowym powinna znajdować się czytelna, nieskompresowana wersja, aby ułatwić przeglądanie zmian i przyszłe prace. Minifikacja powinna być krokiem w procesie budowania aplikacji na produkcję, a nie częścią kodu źródłowego w repozytorium.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR migrates Rider-Pi dashboard styles from page-specific CSS files to a modular, shared layout system. The migration follows the MOVE-FIRST principle by extracting common styles into reusable CSS modules (tokens.css, base.css, layout.css, components.css, utilities.css) while consolidating page-specific overrides into smaller files under web/assets/pages/. The PR introduces a theme system with four variants (classic, classic-plus, v2, v3) managed by theme-loader.js, and adds a shared footer component loaded dynamically via footer.js.
Key changes:
- Modular CSS architecture splits 2000+ lines of duplicate styles into ~1500 lines of shared modules
- HTML files adopt semantic layout structure (
.layout-header,.layout-main,.layout-footer) - Theme system allows runtime switching between four visual variants
- Footer component replaces inline status bars with shared template
Reviewed changes
Copilot reviewed 43 out of 43 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
web/view.html |
Migrated to shared layout structure with theme support and footer component |
web/system.html |
Adopted shared layout classes and removed inline styles |
web/navigation.html |
Replaced Tailwind-like utilities with shared layout components |
web/home.html |
Restructured with semantic HTML and shared component classes |
web/google_home.html |
Migrated to layout system, added dual auth button placement |
web/control.html |
Large refactor adopting shared layout, removed motion.enable feature UI |
web/chat.html |
Migrated to shared layout with audit mode support |
web/dashboard_footer_template.html |
New shared footer template with theme switcher |
web/assets/dashboard-common.css |
Converted to import-only entry point for modular CSS |
web/assets/css/tokens.css |
Design tokens (colors, spacing, typography, shadows) |
web/assets/css/base.css |
CSS reset and foundational element styles |
web/assets/css/layout.css |
Layout systems (grid, flex, page structure) |
web/assets/css/components.css |
Reusable UI components (cards, buttons, pills, forms) |
web/assets/css/utilities.css |
Single-purpose utility classes |
web/assets/css/menu.css |
Navigation menu component styles |
web/assets/css/footer.css |
Footer/statusbar component styles |
web/assets/pages/*.css |
Page-specific overrides (<200 lines each) |
web/assets/themes/*/*.css |
Theme variant stylesheets |
web/assets/theme-loader.js |
Theme switching and persistence logic |
web/assets/footer.js |
Footer component dynamic loading and state management |
web/assets/[page].css (deleted) |
Old monolithic page styles removed |
Zakres
Krótko: co PR przenosi/porządkuje (MOVE-FIRST), bez zmiany zachowań.
Checklista (WYMAGANE)
pass/TODO/NotImplementedError).ruff check --fix && ruff formatzielone (≤120 znaków/linia).pytestzielony (dla audio:ALSA_SKIP_LSOF=1 pytest -q -k voice).Uwagi techniczne (opcjonalnie)
Co przeniesiono i gdzie, ewentualne decyzje projektowe.