From 7a49093255ec36627b9dc88e0e993777930c7437 Mon Sep 17 00:00:00 2001 From: Philipp Doerre Date: Mon, 4 May 2026 10:51:38 +0000 Subject: [PATCH 1/5] =?UTF-8?q?fix(editor-ui):=20address=20review=20feedba?= =?UTF-8?q?ck=20=E2=80=94=20compare-mode=20+=20visual=20polish?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Quick-win batch from the first round of review (issues 4 and 5.4-5.6): * editor-toolbar: hide the device-preview button while comparing language- or version-variants. The two iframes side-by-side in those modes would have to share one device-frame wrapper, which has no meaningful UX. The trigger is suppressed via a new `isComparing` guard inside determineVisibleButtons() that checks both editorState.compareWithId and the COMPARE_VERSION_* edit modes. * device-preview-menu: add the gentics-ui-core `hollow` class to all icons inside the dropdown so they invert against the menu background and stay legible — matches the pattern used elsewhere in ui-core. * content-frame: the device-preview info pill now sticks to the top of the scrollable .frame-wrapper while the user scrolls a tall device frame. Implementation: pill moved to be the first sibling of the iframe containers in the template, switched from position: absolute to position: sticky / top: 0.5rem. * editor-toolbar: device-preview button now has a 0.5rem left margin so it no longer touches the BEARBEITEN button — matches the spacing convention for primary actions in the same file. * tests: added a code comment in device-preview.spec.ts explaining why the compare-mode hide is not asserted at the e2e level (would require multi-language test data + reaching into Angular's injector from page.evaluate, both incongruent with the existing test style). Issues 1, 2, 3, 5.1, 5.2 from the review will be addressed in follow-up commits as discussed (Observable->Property refactor, URL parameter persistence, aspect-ratio + design tokens). --- cms-ui/apps/editor-ui/e2e/device-preview.spec.ts | 11 +++++++++++ .../content-frame/content-frame.component.html | 16 ++++++++-------- .../content-frame/content-frame.component.scss | 15 +++++++++++---- .../device-preview-menu.component.html | 8 ++++---- .../editor-toolbar/editor-toolbar.component.scss | 5 +++++ .../editor-toolbar/editor-toolbar.component.ts | 14 ++++++++++++-- 6 files changed, 51 insertions(+), 18 deletions(-) diff --git a/cms-ui/apps/editor-ui/e2e/device-preview.spec.ts b/cms-ui/apps/editor-ui/e2e/device-preview.spec.ts index 87ae9f71c7..4df5da3c25 100644 --- a/cms-ui/apps/editor-ui/e2e/device-preview.spec.ts +++ b/cms-ui/apps/editor-ui/e2e/device-preview.spec.ts @@ -159,6 +159,17 @@ test.describe('Device Preview', () => { await expect(trigger).toBeVisible(); }); + // The compare-mode visibility hide (Vorschau button suppressed when + // editorState.compareWithId is set or editMode is one of the + // COMPARE_VERSION_* values) is implemented in + // EditorToolbarComponent.determineVisibleButtons() and should be + // covered by either a Component-level unit test or the existing + // language-compare e2e flows when those land. It is intentionally + // not asserted here — driving the editor into compare-mode purely + // from this spec would require multi-language test data plus a + // brittle reach into Angular's injector from page.evaluate(), + // which the rest of the test suite avoids. + test('removes the legacy Vorschau entry from the kebab menu', async ({ page }) => { const list = findList(page, ITEM_TYPE_PAGE); const row = findItem(list, IMPORTER.get(PAGE_ONE).id); diff --git a/cms-ui/apps/editor-ui/src/app/content-frame/components/content-frame/content-frame.component.html b/cms-ui/apps/editor-ui/src/app/content-frame/components/content-frame/content-frame.component.html index a2ff7374a8..e9f8449b8c 100644 --- a/cms-ui/apps/editor-ui/src/app/content-frame/components/content-frame/content-frame.component.html +++ b/cms-ui/apps/editor-ui/src/app/content-frame/components/content-frame/content-frame.component.html @@ -118,6 +118,14 @@ [longerMessage]="'editor.loading_takes_more_time' | gtxI18n" > + @if (devicePreviewActive$ | async; as activePreset) { +
+ {{ activePreset.icon }} + {{ activePreset.labelKey | gtxI18n }} + {{ activePreset.width }} × {{ activePreset.height }} +
+ } +