Skip to content

Show the resource info blocks actions as buttons - #1283

Merged
pfferrari merged 3 commits into
mainfrom
feat/resource-info-blocks-actions
Oct 28, 2026
Merged

pfferrari merged 3 commits into
mainfrom
feat/resource-info-blocks-actions

Conversation

@pfferrari

@pfferrari pfferrari commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Closes commercelayer/issues-app#772

What I did

ResourceTags, ResourceMetadata and ResourceDetails no longer hide their actions behind a … menu in the section header: each has an "Edit" button instead, shown only when the user can update the resource.

  • Tags: "Edit" opens the tags modal.
  • Metadata: "Edit" opens the metadata modal. "View JSON" moves inside the metadata card, below the values it shows.
  • Details: "Edit" opens the reference modal. "Copy id" is removed, so a user who cannot update the resource sees no action at all.

The buttons are secondary and mini, and keep print:hidden as the menus had (the "View JSON" row is hidden as a whole). The common.copy_id and common.details_options translations are no longer used and have been removed.

ResourceInfoBlocks in dashboard-apps and the other consumers only render these blocks, so they need no change: they get the new actions by updating app-elements.

Screenshot 2026-10-22 alle 15 34 55

How to test

  • pnpm test: the ResourceTags, ResourceMetadata and ResourceDetails tests check that the header has a single "Edit" button, that "View JSON" sits inside the metadata card, and that the reference modal opens from the button.
  • Storybook: open the Tags, Metadata and Details stories. Each header shows "Edit", the metadata card ends with "View JSON", and print preview hides all of them.

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests).
  • Make sure to add/update documentation regarding your changes.
  • You are NOT deprecating/removing a feature.

@netlify

netlify Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for commercelayer-app-elements ready!

Name Link
🔨 Latest commit c55b301
🔍 Latest deploy log https://app.netlify.com/projects/commercelayer-app-elements/deploys/6ae09c0d13db8ae2bd70a5e7
😎 Deploy Preview https://deploy-preview-1283--commercelayer-app-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@pfferrari pfferrari self-assigned this Oct 22, 2026
@pfferrari pfferrari added the enhancement New feature or request label Oct 22, 2026
@pkg-pr-new

pkg-pr-new Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
npm i https://pkg.pr.new/commercelayer/app-elements/@commercelayer/app-elements@1283

commit: c55b301

@pfferrari
pfferrari merged commit f276143 into main Oct 28, 2026
11 checks passed
@pfferrari
pfferrari deleted the feat/resource-info-blocks-actions branch October 28, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants