Skip to content

Add ability to view default edit-template in interact context menu#4391

Open
burieberry wants to merge 3 commits intomainfrom
multiple-edit-options-example
Open

Add ability to view default edit-template in interact context menu#4391
burieberry wants to merge 3 commits intomainfrom
multiple-edit-options-example

Conversation

@burieberry
Copy link
Copy Markdown
Contributor

@burieberry burieberry commented Apr 13, 2026

  • Can toggle between the standard base template and card's custom template from isolated and edit views in interact mode
isolated-custom isolated-default edit-custom edit-default

@github-actions
Copy link
Copy Markdown

Preview deployments

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 13, 2026

Host Test Results

2 264 tests  +10   2 249 ✅ +10   2h 31m 14s ⏱️ - 3m 52s
    1 suites ± 0      15 💤 ± 0 
    1 files   ± 0       0 ❌ ± 0 

Results for commit 6034d2b. ± Comparison against base commit f0a14e3.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 13, 2026

Realm Server Test Results

  1 files  ±0    1 suites  ±0   13m 49s ⏱️ +58s
894 tests ±0  894 ✅ ±0  0 💤 ±0  0 ❌ ±0 
966 runs  ±0  966 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 6034d2b. ± Comparison against base commit f0a14e3.

♻️ This comment has been updated with latest results.

@burieberry burieberry force-pushed the multiple-edit-options-example branch 2 times, most recently from a012200 to 0f23581 Compare April 14, 2026 00:28
@burieberry burieberry changed the title testing default-edit option Add ability to view default edit-template in interact context menu Apr 14, 2026
@burieberry burieberry marked this pull request as ready for review April 14, 2026 13:42
@burieberry burieberry requested a review from a team April 14, 2026 13:43
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 408ef22b52

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/base/menu-items.ts Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds an “Edit Fields” action to Interact-mode context menus that opens a card in the default/base edit template (instead of a card’s custom static edit template), with logic to only show the option when appropriate based on whether the card type has a custom edit template.

Changes:

  • Add CardDef.hasCustomEditTemplate and use it to conditionally show an “Edit Fields” menu item in Interact context menus.
  • Plumb a useDefaultEditTemplate flag through view/edit flows and stack state so cards can be opened in edit format while forcing the base CardDef template.
  • Add/extend unit + integration test coverage, and update realm indexing expectations for the newly referenced icon.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/host/tests/unit/card-def-menu-items-test.ts Adds unit tests asserting when “Edit Fields” appears in Interact menu items.
packages/host/tests/integration/realm-indexing-test.gts Updates expected indexed icon URLs to include the new forms icon.
packages/host/tests/integration/components/overlay-menu-items-test.gts Adds integration coverage for overlay menu visibility and default-edit behavior when clicking “Edit Fields”.
packages/host/app/services/operator-mode-state-service.ts Extends editCardOnStack to carry an optional useDefaultEditTemplate flag into the stack item.
packages/host/app/lib/stack-item.ts Adds useDefaultEditTemplate to stack items and ensures cloning preserves it.
packages/host/app/components/operator-mode/stack-item.gts Passes @codeRef={{baseCardRef}} to CardRenderer when default-edit-template mode is requested.
packages/host/app/components/operator-mode/overlays.gts Extends overlay open/select/view plumbing to carry useDefaultEditTemplate.
packages/host/app/components/operator-mode/operator-mode-overlays.gts Adds “Edit Fields” to overlay context menu (including prerendered/string targets) and passes through the new flag.
packages/host/app/components/operator-mode/interact-submode.gts Extends view/edit actions to accept useDefaultEditTemplate and handles cards not already on the stack.
packages/base/menu-items.ts Adds “Edit Fields” to default Interact card menu items (only for cards with custom edit templates).
packages/base/card-api.gts Adds CardDef.hasCustomEditTemplate and updates EditCardFn to accept options.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/host/app/components/operator-mode/operator-mode-overlays.gts Outdated
@habdelra
Copy link
Copy Markdown
Contributor

habdelra commented Apr 15, 2026

i know that you are checking to see if the card is in the store first so that you don't end up loading every card in the grid in order to see if you should show an edit view--which is good, otherwise that defeats the purpose of prerendering. but won't it also be confusing to the user that sometimes they see the edit item in teh menu and sometimes they don't all because of whether the store decided to load the card or not? it seems like it might be flaky

@burieberry burieberry marked this pull request as draft April 15, 2026 21:50
@burieberry burieberry force-pushed the multiple-edit-options-example branch from f359e81 to 3d797b9 Compare April 16, 2026 13:42
@burieberry
Copy link
Copy Markdown
Contributor Author

i know that you are checking to see if the card is in the store first so that you don't end up loading every card in the grid in order to see if you should show an edit view--which is good, otherwise that defeats the purpose of prerendering. but won't it also be confusing to the user that sometimes they see the edit item in teh menu and sometimes they don't all because of whether the store decided to load the card or not? it seems like it might be flaky

Yes, we've actually changed this and now the switching between custom and default templates is only from isolated and edit view of a card in interact mode. I've updated the PR

@burieberry burieberry marked this pull request as ready for review April 16, 2026 16:31
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 52418c3b92

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/host/app/components/operator-mode/interact-submode.gts Outdated
@burieberry burieberry force-pushed the multiple-edit-options-example branch from 52418c3 to 6034d2b Compare April 16, 2026 22:13
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.

4 participants