Let apps mark a pinned command menu item as the primary action #26261
Replies: 2 comments
|
Issue proposes that pinned command menu items should be allowed to render as the primary header action when provided by an app. Currently, PinnedCommandMenuItemButtons.tsx hardcodes primary styling based only on EngineComponentKey values (CREATE_NEW_RECORD, COMPOSE_CAMPAIGN, SEND_MESSAGE_CAMPAIGN), and CommandMenuItemManifest lacks a flag/expression to mark an item as primary. Severity: MEDIUM because this blocks app-defined UX consistency for record header actions but does not appear to break core flows; it’s an extensibility/design bug. Root-cause hypothesis (code not fetched due to path mismatch/limited budget): frontend record header rendering in packages/twenty-front/src/modules/record (component PinnedCommandMenuItemButtons.tsx) should honor a new optional manifest property like isPrimaryAction or conditionalPrimaryExpression; additionally extend CommandMenuItemManifest. Confidence: low. Missing report: reproduction steps (which app/engineComponentKey triggers the incorrect secondary styling), plus exact expected vs actual UI beyond the stated primary/secondary mismatch. |
|
@Bonapara technically possible, wdyt on your side? |
Uh oh!
There was an error while loading. Please reload this page.
An app can pin a command menu item (
isPinned: true). The item then shows as a button in the record page header. We use this for the main action on a record (for example "Send invitation" on a meeting). But app buttons always use the secondary style. Only three built-in actions can be primary.In
PinnedCommandMenuItemButtons.tsxthe primary style is hardcoded:CommandMenuItemManifesthas no property for this.Describe the solution you'd like
An optional property on the command menu item, for example:
PinnedCommandMenuItemButtonswould then useitem.isPrimaryAction || <the current engine key check>.Describe alternatives you've considered
conditionalPrimaryExpression, the same asconditionalPinnedExpression. Then an action can be primary only in some states (for example only while the invitation is not sent yet. Once it has been sent, the secondary buttons is fine).Additional context
twenty/v2.41.0=d1bb92d111f91529478da56aa677efbdba230c00All reactions