This repository was archived by the owner on May 29, 2026. It is now read-only.
Seed Nextcloud / Conduction / Sendent tiles on every new dashboard#40
Merged
rubenvdlinde merged 2 commits intoApr 30, 2026
Conversation
Every new dashboard now ships with three branded link tiles below the default top-row widgets, stacked at the right edge (cols 9-11, rows 5-7, 3x1 each): - Nextcloud -> https://nextcloud.com (blue background, white text) - Conduction -> https://conduction.nl (white background, dark text) - Sendent -> https://sendent.com (white background, dark text) Tiles are not compulsory, so users can delete them like any other tile. Implementation -------------- - New DashboardSeeder service owns the SEED_TILES config and the PlacementService + IURLGenerator dependencies. Keeps DashboardService coupling unchanged (PHPMD coupling threshold stays under 13). - DashboardService::createDashboard() invokes DashboardSeeder::seed() after the dashboard is persisted. Path covers both manual creates (POST /api/dashboard) and the auto-provisioned default-fallback path in tryCreateFromTemplate (which already routes through createDashboard). Template-derived dashboards intentionally remain unseeded - the admin template is authoritative for those. - Icon URLs resolved through IURLGenerator::imagePath so the seeder works under both dev (/custom_apps/...) and prod (/apps/...) install layouts. Tile model uses iconType=url + linkType=url. Assets ------ - img/seed-tiles/nextcloud.svg (Wikimedia Commons official SVG) - img/seed-tiles/conduction.png - img/seed-tiles/sendent.png Tests ----- - DashboardSeederTest (5 cases): tile order, grid positions, iconType + link type, icon URL prefix, company link targets, dashboard ID pass-through. - DashboardServiceSeedTilesTest (2 cases): createDashboard invokes the seeder with the persisted dashboard id and returns the persisted entity. - Total: 113 / 113 passing (322 assertions). PHPCS / PHPMD / Psalm clean.
Captured against the feat/seed-tiles-on-new-dashboard branch with the Marketing Template removed so the user-fallback path runs and seeds the three tiles. Screenshot shows the expected default state for any fresh dashboard: Nextcloud / Conduction / Sendent stacked at the right edge below the standard widgets. Note: the Nextcloud and Conduction logos render faintly because their source images use blue-on-transparent / black-on-transparent paths. Replacing with white-on-transparent (Nextcloud) and a coloured PNG (Conduction) is a follow-up polish item.
5 tasks
d9ffbb5
into
chore/polish-and-walkthrough-2026-04-29
1 check passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every new dashboard (manual create + auto-provisioned default) now ships with three branded link tiles stacked at the right edge below the default widgets:
#0082c9#ffffff#ffffffTiles are not compulsory, so users can delete them like any other tile.
Why a separate
DashboardSeederserviceInlining the seed logic in
DashboardServicepushed PHPMD coupling to 14 (threshold 13). Extracting the config + tile-creation intoDashboardSeederkeepsDashboardServiceboundaries narrow and gives the seed logic an obvious home for future expansion (admin-configurable defaults, conditional seeds per group, etc.).Scope decisions
POST /api/dashboard) → seeded ✅createDashboardinternally)Implementation notes
IURLGenerator::imagePathresolves icon URLs at seed time so the seeder works under both dev (/custom_apps/...) and prod (/apps/...) install layouts. Tile model usesiconType=url(existing renderer support —<img :src=...>) +linkType=url.img/seed-tiles/. Sources: Nextcloud Wikimedia Commons SVG, Conduction's public site logo PNG, Sendent's public site logo PNG.Tests
DashboardSeederTest(5 cases): tile order, grid positions, iconType / linkType, icon URL prefix, company link targets, dashboard ID pass-through.DashboardServiceSeedTilesTest(2 cases):createDashboardinvokes the seeder with the persisted dashboard id; returned entity is the persisted one.Test plan
composer phpcs— cleancomposer phpmd— clean (coupling under threshold thanks to DashboardSeeder)composer psalm— 0 errorsphpunit— 113/113 passing/custom_apps/mydash/img/seed-tiles/{file}Notes
chore/polish-and-walkthrough-2026-04-29(PR Repair conditional rules + admin templates + permission defaults #39), notdevelopment. Once Repair conditional rules + admin templates + permission defaults #39 merges, this PR retargets cleanly todevelopment.2026.02.12_sendent-workspace-main.zipandsendent-workspace-main/in your worktree — leftover reference material from research, not part of this PR.