Skip to content

Improve album equipment layout and add a visibility toggle - #132

Merged
fabiodalez-dev merged 18 commits into
fabiodalez-dev:mainfrom
MiranoVerhoef:feature/album-equipment-visibility
Oct 13, 2026
Merged

fabiodalez-dev merged 18 commits into
fabiodalez-dev:mainfrom
MiranoVerhoef:feature/album-equipment-visibility

Conversation

@MiranoVerhoef

Copy link
Copy Markdown
Contributor

Problem

Multiple cameras and lenses, especially long model names, make the album equipment section difficult to scan. There is also no core per-album way to hide the section while retaining equipment metadata.

Implementation

  • Add translated "Show equipment" controls to album creation and editing, enabled by default.
  • Store the presentation preference as album.<id>.show_equipment in existing settings; remove it on album deletion without changing the album schema.
  • Pass the flag through public album view data and cache warming while keeping equipment loading and metadata intact.
  • Apply visibility to the equipment block in Classic, Hero, and Magazine album page layouts, and improve wrapping/grouping with cards and chips.
  • Rebuild the shipped frontend CSS and update its Vite manifest entry for the new layout utilities.

Verification

  • PHP syntax checks passed for all changed controllers/services; changed JSON and Twig parsed successfully.
  • Rendered the equipment blocks from all three layouts with the flag absent, enabled, and disabled. The default remains visible, and disabling it removes the equipment block.
  • Exercised the real album controller against a temporary SQLite database with enabled/disabled/re-enabled preferences; rendered view data follows the preference and retains camera/lens metadata.
  • npm ci --ignore-scripts --no-audit --no-fund and npm run build succeeded. Only the relevant frontend CSS/manifest changes are included.
  • Reviewed existing album-save cache invalidation. No browser visual review, MySQL runtime, or Docker end-to-end session was used.
  • PHPUnit 10.5 on PHP 8.3: 162 tests, 388 assertions, no failures/errors; 7 skips and 2 Windows symlink-permission warnings. Some imaging tests require unavailable libvips/JPEG-XL tools.
  • git diff --check passed.

Fixes #131

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 17 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a9eb7f0e-a712-444b-9bc2-df99b6432926
📥 Commits

Reviewing files that changed from the base of the PR and between 8df71bf and 525b063.

📒 Files selected for processing (22)
  • .gitignore
  • app/Controllers/Admin/AlbumsController.php
  • app/Controllers/Frontend/PageController.php
  • app/Views/admin/albums/create.twig
  • app/Views/admin/albums/edit.twig
  • app/Views/frontend/gallery.twig
  • app/Views/frontend/gallery_hero.twig
  • app/Views/frontend/gallery_magazine.twig
  • database/migrations/migrate_1.4.24_mysql.sql
  • database/migrations/migrate_1.4.24_sqlite.sql
  • database/schema.mysql.sql
  • database/schema.sqlite.sql
  • database/template.sqlite
  • public/assets/.vite/manifest.json
  • public/assets/app-C86leL_a.css
  • public/assets/app-jM-4wNK7.css
  • public/assets/app.css
  • storage/translations/en_admin.json
  • storage/translations/fr_admin.json
  • storage/translations/it_admin.json
  • tests/Database/MigrationsTest.php
  • tests/e2e/album-equipment-visibility.spec.js
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

# Conflicts:
#	public/assets/.vite/manifest.json
#	storage/translations/en_admin.json
#	storage/translations/it_admin.json
@fabiodalez-dev

Copy link
Copy Markdown
Owner

Thanks, the new layout reads much better with several cameras and lenses, and the gating is correct in all three album page templates. I pushed changes on top before merging, the main one being where the flag lives: instead of one album.<id>.show_equipment row per album in settings (loaded into the global settings cache on every request, and every album save was clearing that cache), it is now an albums.show_equipment column next to show_date, with a 1.4.24 migration for SQLite and MySQL and the schema files updated. It is written with its own best-effort UPDATE, so an install that has not run the migration yet still saves albums. I also rebuilt the CSS bundle against current main, removed the now-unused equipment_count / grid_cols blocks, added dark-theme variants to the Classic and Magazine cards (the Hero panel stays light in both themes, so its chips do too), added the French strings, and added an e2e spec covering on/off/on in the three templates plus metadata retention. While testing I found that album edits were not reaching logged-out visitors because of a stale page-cache path; that is fixed separately in #136, which this needed to be visible.

@fabiodalez-dev
fabiodalez-dev merged commit 5999025 into fabiodalez-dev:main Oct 13, 2026
4 checks passed
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.

Improve album equipment layout and add a visibility toggle

2 participants