Skip to content

feat(start): style cards in the consuming page - #1751

Merged
yevheniia0831 merged 6 commits into
mainfrom
strcards
Nov 19, 2026
Merged

yevheniia0831 merged 6 commits into
mainfrom
strcards

Conversation

@yevheniia0831

@yevheniia0831 yevheniia0831 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Refs #1637 (cards layout only). Replaces adobe/da-nx#1016.

Summary

Keep the Start-page layout in the DA consumer instead of the generic Nexter cards block, as requested in adobe/da-nx#1016.

  • Move the existing panel styling to styles/start.css, scoped to .nx-cards.start: centered 664px cap, responsive columns, token-based padding, background, rounding and shadow.
  • Load that stylesheet from DA's existing decorateArea hook only when Start cards are present. Repeated decoration does not add another stylesheet; Tools-only pages do not load it.
  • Move the responsive layout regression into DA's startup tests, including a narrow grid parent and the stylesheet-loading behavior.

The authored start-copy content, Markus's nx-cards renderer and shared nx-action-card stay unchanged. No new card variants, renderer, content edits, document publishing, Add Site or greeting changes.

Ready for review. This PR can merge independently of adobe/da-nx#978. It only adds scoped Start-card styling, conditional stylesheet loading and layout tests; it does not change Nexter or card behavior. The test URLs select nx=tools to preview the styling with the cards from adobe/da-nx#978, not because that PR is a merge dependency.

Test URLs

Validation

  • Passed, 36 tests across two files:
    npx --no-install wtr 'test/unit/scripts/{scripts,utils}.test.js' --node-resolve --port=2058
  • Passed:
    npx --no-install eslint scripts/scripts.js test/unit/scripts/scripts.test.js
    npx --no-install stylelint styles/start.css
    git diff --check
  • Published branch preview checked in Chrome without local source or content interception: 1280px/two columns, 375px/one column, no horizontal overflow, all four default action cards and existing action paths/menus preserved, one consumer stylesheet, no page errors. This uses the existing Start-copy document and deployed nx=tools components.
  • Light/dark rendering checked using browser media preference and CSS color-scheme.
  • The existing startup tests report fixture-only missing stylesheet/image requests. All tests pass.
  • Full unit suite and authenticated E2E/navigation were not run locally. After merging the latest main, CI passed, including 207 Playwright tests and the Lint & Test check.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aem-code-sync

aem-code-sync Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-sync branch
Commits

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dicagno

dicagno commented Nov 19, 2026

Copy link
Copy Markdown
Member

Generally looks good, just one point:
in test/unit/scripts/scripts.test.js:124 the layout test doesn't run with the real token values.
The test doesn't load the nx2 token stylesheet, so padding: var(--s2-spacing-300) resolves to 0, and the gap is hard-coded inline as gap: 16px.
The "2 columns at 664px" check therefore measures a 664px content area. In production it is 632px.
This test would still pass if padding moved to --s2-spacing-400 (24px), even though production would then drop to one column (616px available, 624px needed).
Suggestion: define the four tokens on container in the test, or add an assertion on the content-box width.

dicagno
dicagno previously approved these changes Nov 19, 2026

@dicagno dicagno left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with nits. Please address the above before merging

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@dicagno dicagno left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yevheniia0831
yevheniia0831 merged commit 4341cf0 into main Nov 19, 2026
8 checks passed
@yevheniia0831
yevheniia0831 deleted the strcards branch November 19, 2026 16:34
adobe-bot pushed a commit that referenced this pull request Nov 19, 2026
# [1.33.0](v1.32.0...v1.33.0) (2026-11-19)

### Features

* **start:** style cards in the consuming page ([#1751](#1751)) ([4341cf0](4341cf0))
@adobe-bot

Copy link
Copy Markdown

🎉 This PR is included in version 1.33.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

This branch was successfully deployed

1 active deployment
strcards — fea2505c Deployed Nov 19, 2026 by aem-code-sync[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants