Skip to content

Omogeneizzazione UI backend: colori, settings flat da mobile, toggle, scroll-lock#196

Merged
fabiodalez-dev merged 6 commits into
mainfrom
fix/settings-mobile-flat
Jun 25, 2026
Merged

Omogeneizzazione UI backend: colori, settings flat da mobile, toggle, scroll-lock#196
fabiodalez-dev merged 6 commits into
mainfrom
fix/settings-mobile-flat

Conversation

@fabiodalez-dev

Copy link
Copy Markdown
Owner

Sessione di omogeneizzazione della grafica del backend. Racchiude (e sostituisce) la #195.

Cosa cambia

Colori — tutto blu (era un mix blu/viola/indigo)

  • Chrome della pagina settings del plugin mobile-api: via il gradiente indigo→purple + sticky bar → header canonico text-3xl + icona piatta text-blue-600, .btn-primary (era la fix(mobile-api): align settings page chrome with standard admin settings #195).
  • Settings plugin discogs e goodlib: accenti viola/indigo → blu.
  • Feature page (archives ×10, ncip-server ×2, digital-library): viola/indigo → blu. Verificato: 0 elementi viola/indigo a runtime.
  • Tailwind ora scansiona storage/plugins/**/views (prima non lo faceva → le classi dei plugin compilano davvero).

Leggibilità mobile delle impostazioni

  • Sotto i 640px le pagine settings (app + plugin) diventano flat: niente card, gutter singolo ~16px, niente doppio padding. Reset additivi max-sm:!* solo sui contenitori-card (form/input/alert intatti). L'!important è necessario perché vendor.css (Bootstrap) ha utility .bg-white/.border con !important.
  • Header di sezione in Avanzate (Sitemap XML, API Pubblica) uniformati al pattern canonico inline-icon text-xl → stessa taglia e stesso margine sinistro degli altri (API resta collassabile).

Toggle — tutti uguali al riferimento (grigio→nero)

  • Toggle OFF/ON di "Stato API" sostituito col toggle canonico .toggle-checkbox (auto-submit preservato).
  • Toggle visibilità eventi: ridimensionato/ricolorato al canonico (era 60×32 verde).
  • Switch bulk-enrich: blu → grigio-900.
  • Nuovo test E2E tests/toggles-all.spec.js: accende ogni toggle e verifica driver/auto-submit/persistenza/AJAX (5/5 verde, idempotente).

Sitemap (tab Avanzate)

  • L'URL pubblico è ora chiaramente "quello da inviare a Google" (pulsante Copia + hint); il path filesystem è marcato come solo-server. Stringhe nuove in tutte e 4 le lingue.

Mobile UX

  • Scroll-lock della sidebar mobile: aprendo l'overlay il contenuto dietro non scorre più (position:fixed + ripristino scroll — overflow:hidden da solo non basta su iOS Safari).
  • Stat sidebar (Libri/Prestiti) centrate.

Verifica

  • PHPStan L5 verde su ogni commit; php -l su tutte le view.
  • main.css ricompilato (frontend webpack); le classi max-sm:!* safelistate.
  • Verifiche a schermo via playwright a 375/390px (flat, allineamento, colori) e desktop (invariato).
  • tests/toggles-all.spec.js: 5/5 passati.

Note

  • Code-only lato runtime (nessuna migrazione). Per arrivare sul sito live serve merge + nuova release (la view del plugin viaggia nello ZIP).

…ettings

The Mobile API plugin settings page diverged from every other settings
page: a sticky header bar with an indigo→purple gradient icon box and
indigo/purple accents throughout, instead of the canonical admin chrome
(plain text-3xl heading + flat blue icon, blue accents, .btn-primary).

Now it matches /admin/settings and the sibling plugin settings pages
(api-book-scraper, discogs):
- header: drop the sticky bar + gradient icon, use the text-3xl heading
  with a flat fa-mobile-screen-button text-blue-600 icon and a
  .btn-secondary "Plugin" back link
- recolor every indigo-* accent to blue-* (tabs, toggle, info box,
  selects, focus rings)
- save button → .btn-primary; success/error banners → the canonical
  px-4 py-3 rounded-lg green/red style
…lity

Color homogeneity — every plugin page now uses the same blue accent as the
core admin chrome (was a mix of blue/purple/indigo):
- discogs + goodlib settings: purple/indigo accents -> blue
- archives, ncip-server, digital-library feature pages: purple/indigo -> blue
- Tailwind now scans storage/plugins/**/views so plugin classes (incl. the
  recolored ones) actually compile instead of relying on app-view overlap

Mobile readability — settings pages (app + plugin) go flat below 640px: no
card chrome, single ~16px gutter, no doubled padding. Implemented with
additive max-sm:! resets on card containers only (forms/inputs/alerts
untouched). The ! (important) is required because vendor.css (Bootstrap)
ships !important .bg-white/.border utilities that otherwise win.

Sitemap clarity (advanced tab): the public URL is now the obvious value to
submit to Google (Copy button + hint); the filesystem path is labelled
server-only. New strings added to all 4 locale files.

Rebuilt public/assets/main.css.
Every toggle now matches the catalogue-mode reference (gray w-11 h-6 track,
white h-5 w-5 dot, #111827 when on, 20px slide):
- settings API toggle: replaced the oversized OFF/ON black switch (peer +
  custom CSS) with the canonical toggle-checkbox/toggle-bg/toggle-dot markup;
  the generic .toggle-checkbox driver already on the settings page renders it,
  and the form auto-submit on change is preserved
- events visibility toggle: restyled its CSS-only switch from 60x32 green to
  the canonical 44x24 dark dimensions/colors
- bulk-enrich switch: on-state blue → gray-900 (markup + JS), matching the rest

Rebuilt public/assets/main.css.
- advanced-tab: convert the two odd-one-out section headers (Sitemap XML, API
  Pubblica) from the icon-in-box + text-lg style to the canonical inline-icon
  text-xl used by every other settings section, so titles match in size and
  share the same left edge on mobile (added max-sm:!px-0/!border-0 so the
  header goes flush like the body). The API section stays collapsible
  (toggleApiSection + chevron preserved)
- new tests/toggles-all.spec.js: turns every restyled toggle ON and asserts it
  reflects ON — shared .toggle-checkbox driver paints the track dark, the API
  toggle auto-submits and persists, privacy toggles persist on save, the events
  visibility toggle flips, and the bulk-enrich AJAX switch flips. Restores each
  toggle so the run is idempotent
Opening the mobile sidebar showed the overlay but the content behind it (e.g.
the settings page) still scrolled. `overflow:hidden` on <body> alone does not
stop touch-drag scrolling on iOS Safari, so pin the body with position:fixed at
the captured scroll offset while the menu is open, and restore the exact scroll
position on close. Guarded so closes that never locked (desktop, nav-link
clicks) don't jump the page to the top.
The "Libri"/"Prestiti" stat cards in the sidebar had their number and label
left-aligned; center them inside each column (text-center).
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@fabiodalez-dev, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 35 minutes and 40 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: b2a39b23-07e0-45ac-8b9d-6d2d920226b7

📥 Commits

Reviewing files that changed from the base of the PR and between 5c37e27 and fb05cc7.

📒 Files selected for processing (34)
  • app/Views/admin/bulk-enrich.php
  • app/Views/events/index.php
  • app/Views/layout.php
  • app/Views/settings/advanced-tab.php
  • app/Views/settings/contacts-tab.php
  • app/Views/settings/index.php
  • app/Views/settings/loans-tab.php
  • app/Views/settings/messages-tab.php
  • app/Views/settings/privacy-tab.php
  • frontend/tailwind.config.js
  • locale/de_DE.json
  • locale/en_US.json
  • locale/fr_FR.json
  • locale/it_IT.json
  • public/assets/main.css
  • storage/plugins/api-book-scraper/views/settings.php
  • storage/plugins/archives/views/activities/form.php
  • storage/plugins/archives/views/activities/index.php
  • storage/plugins/archives/views/activities/show.php
  • storage/plugins/archives/views/authorities/index.php
  • storage/plugins/archives/views/authorities/show.php
  • storage/plugins/archives/views/index.php
  • storage/plugins/archives/views/places/form.php
  • storage/plugins/archives/views/places/index.php
  • storage/plugins/archives/views/places/show.php
  • storage/plugins/archives/views/search.php
  • storage/plugins/archives/views/show.php
  • storage/plugins/digital-library/views/admin-form-fields.php
  • storage/plugins/discogs/views/settings.php
  • storage/plugins/goodlib/views/settings.php
  • storage/plugins/mobile-api/views/settings.php
  • storage/plugins/ncip-server/views/partners.php
  • storage/plugins/ncip-server/views/transactions.php
  • tests/toggles-all.spec.js
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/settings-mobile-flat

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@fabiodalez-dev fabiodalez-dev merged commit 4d9ec0e into main Jun 25, 2026
6 checks passed
@fabiodalez-dev fabiodalez-dev deleted the fix/settings-mobile-flat branch June 25, 2026 13:43
fabiodalez-dev added a commit that referenced this pull request Jun 25, 2026
- Bump version.json to 0.7.24
- Mobile API plugin 1.0.1 -> 1.0.2 (unified toggle + canonical chrome)
- README: add "What's New in v0.7.24" section
- Code-only release, no new migration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant