Skip to content

M3 — Admin UI (chunk 1: CRUD foundation) - #113

Merged
loevgaard merged 8 commits into
1.xfrom
feature/m3-admin-ui
Jul 2, 2026
Merged

M3 — Admin UI (chunk 1: CRUD foundation)#113
loevgaard merged 8 commits into
1.xfrom
feature/m3-admin-ui

Conversation

@loevgaard

Copy link
Copy Markdown
Member

First chunk of M3 (Admin UI). Adds the Feed admin CRUD foundation:

  • Grid at /admin/feeds (code, format, state, lastGeneratedAt, enabled) + sylius_resource admin routes.
  • Form\Type\FeedType (code, translations, channels, format choice from FormatRegistry, enabled) + FeedTranslationType, wired as the feed resource form.
  • KnpMenu AdminMenuListener — a Feeds item under Catalog.

Tests: menu (unit) + feed/translation forms (functional). 209 tests, 0 uncovered.

Remaining M3 chunks (separate commits): source + FeedField mapping editor; "Generate now" + per-context results table. Target-first preset picker is M4, preview is M6, lookup-tables admin is M5.

Standing reds expected: BC (unreleased 1.x), Dependency Analysis (M-later deps), Mutation (continue-on-error).

- Feed grid at /admin/feeds (code, format, state, lastGeneratedAt, enabled) + sylius_resource
  admin routes (index/create/update/delete)
- Form\Type\FeedType (code, translations, channels, format choice from FormatRegistry, enabled)
  + FeedTranslationType; wired as the feed resource form
- KnpMenu AdminMenuListener adds a Feeds item under Catalog; English translations
- Tests: AdminMenuListener (unit) + the feed/translation forms (functional). 209 tests, 0 uncovered
@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (3e0fb1a) to head (36beed0).

Additional details and impacted files
@@             Coverage Diff              @@
##                 1.x      #113    +/-   ##
============================================
  Coverage     100.00%   100.00%            
- Complexity       498       527    +29     
============================================
  Files             60        67     +7     
  Lines           1122      1274   +152     
============================================
+ Hits            1122      1274   +152     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- FeedSourceType (feedType choice from the registry) + FeedFieldType (output field, source type
  field/literal, source value); sources collection on the feed form; positions reindexed on submit
- GenerateFeedAction (grid 'Generate now' row action -> dispatch ProcessFeed + flash + redirect)
- FeedResultsAction + admin/feed/results.html.twig (lists generated files with public download links)
- grid row actions (generate/results); flashes.en.yaml + expanded messages.en.yaml

Tests: both admin actions (unit) + full-feed form submission (functional). 214 tests, 0 uncovered.
@loevgaard
loevgaard marked this pull request as ready for review June 22, 2026 10:02
- Grid: row actions used type 'link' (no such Sylius template -> 500); use type 'default'
- Add missing 'new_feed'/'edit_feed' UI translations (admin titles showed raw keys)
- Test app: switch node-sass -> dart-sass so admin assets build on arm64 / current Node
- Test app (dev only): route the plugin's CommandInterface to the async transport so
  'Generate now' queues a run (functional tests stay synchronous)
- CLAUDE.md: require verifying every UI feature in a real browser with Playwright (MCP)
…icit sass dep)

node-sass was never a dependency (@sylius-ui/frontend uses gulp-sass 5 + dart-sass); the arm64
error came from a stale node_modules. Remove the explicit 'sass' dep I had added (it's transitive)
and pin Node 22 via .nvmrc (dart-sass needs >=20.19). A clean 'yarn install && yarn build' now
works on Apple Silicon.
Node 18 per request. The latest dart-sass requires Node >=20.19, so a yarn 'resolutions' entry
pins sass to 1.77.8 (Node 18 compatible, satisfies @sylius-ui/frontend's ^1.54.8). Clean
'yarn install && yarn build' succeeds on Node 18 with no warnings; node-sass is not involved.
@sylius-ui/frontend@1.0.3 declares engines ^14||^16||^18||^20 (excludes Node 22), and the dart-sass
it pulls requires Node >=20.19 (excludes 16/18) — so Node 20 is the only version that satisfies
both. Revert package.json to the exact skeleton (no node-sass, no sass pin, no resolutions); pin
Node 20 via .nvmrc. Clean 'yarn install && yarn build' works with no flags.

Documented the separate, pre-existing @sylius-ui/frontend admin-JS 'dirtyForms' bug (present in the
unmodified skeleton) that blocks in-browser clicks.
…n JS

@sylius-ui/frontend was a meta-package with an engine constraint (^14||^16||^18||^20) and pulled a
duplicate jquery@4 via jquery.dirtyforms (dep 'jquery: >=1.4.2') + semantic-ui-css, so .dirtyForms
attached to a different jQuery instance than Sylius's admin entry used -> 'dirtyForms is not a
function' -> the whole admin JS init halted (collection add/remove, etc. dead).

Inline its build deps directly, pin sass to 1.77.8 (Node 18 compatible), and add a resolution
deduping jquery to 3.7.1. Pin Node 18 via .nvmrc. Verified in the browser: no console errors,
dirtyForms attaches, and the sources/fields collection editor adds items on click.
@loevgaard
loevgaard merged commit ccb90f1 into 1.x Jul 2, 2026
23 of 30 checks passed
@loevgaard
loevgaard deleted the feature/m3-admin-ui branch July 2, 2026 08:40
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