Skip to content

feat: document group field dot notation in field add help#152

Merged
angeloashmore merged 2 commits intomainfrom
feat/dot-notation-help
Apr 18, 2026
Merged

feat: document group field dot notation in field add help#152
angeloashmore merged 2 commits intomainfrom
feat/dot-notation-help

Conversation

@angeloashmore
Copy link
Copy Markdown
Member

@angeloashmore angeloashmore commented Apr 18, 2026

Resolves: #139

Description

Documents the dot notation syntax for adding fields inside groups (e.g. prismic field add text my_group.description --to-type blog_post). Adds sections support to command routers so the field add router can show a GROUP FIELDS section in its --help output.

Checklist

  • A comprehensive Linear ticket, providing sufficient context and details to facilitate the review of the PR, is linked to the PR.
  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

How to QA 1

Run prismic field add --help and verify the GROUP FIELDS section appears explaining dot notation.


Note

Low Risk
Low risk: changes only CLI help text rendering and adds an optional sections block to router help output, with no impact on command execution paths beyond printing help.

Overview
Adds optional sections support to createCommandRouter help generation so routers can display additional formatted documentation blocks.

Updates prismic field add --help to include a GROUP FIELDS section describing dot-notation (my_group.description) for adding fields inside existing groups.

Reviewed by Cursor Bugbot for commit 84c514b. Bugbot is set up for automated code reviews on this repo. Configure here.

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

Add sections support to command routers and use it to document dot
notation for adding fields inside groups (e.g. my_group.description).

Resolves #139

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread src/lib/command.ts
Copy link
Copy Markdown
Member Author

@angeloashmore angeloashmore left a comment

Choose a reason for hiding this comment

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

Is it necessary to add that bit about group fields into every field type supported in group fields? Conversely, do we need to explicitly state in each field type if it is not supported in groups (for example, groups cannot have groups).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 84c514b. Configure here.

Comment thread src/lib/command.ts
Copy link
Copy Markdown
Member Author

@angeloashmore angeloashmore left a comment

Choose a reason for hiding this comment

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

The dot notation section is only on the field add router help, not duplicated into each field type. This seems like the right place since it applies to all field types that support groups. I don't think we need to explicitly state in each field type whether it supports groups -- that's better left to the docs or error messages when someone tries to nest unsupported types.

@angeloashmore angeloashmore merged commit c353e2f into main Apr 18, 2026
22 of 23 checks passed
@angeloashmore angeloashmore deleted the feat/dot-notation-help branch April 18, 2026 01:53
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.

Group field dot notation is undocumented in field add help

1 participant