Skip to content

Add DocumentMode groundwork with MaskMode and Q toggle#4001

Open
krVatsal wants to merge 6 commits intoGraphiteEditor:masterfrom
krVatsal:documentMode-extension
Open

Add DocumentMode groundwork with MaskMode and Q toggle#4001
krVatsal wants to merge 6 commits intoGraphiteEditor:masterfrom
krVatsal:documentMode-extension

Conversation

@krVatsal
Copy link
Copy Markdown
Contributor

@krVatsal krVatsal commented Apr 3, 2026

This PR implements the early groundwork for Document Mode as planned for community bonding / week 1 in Marquee Selection Masking.
It introduces MaskMode and wires a keyboard toggle, while intentionally avoiding rendering or visual feature work.

What this PR changes?

  • Re-enables DocumentMode enum and adds MaskMode
  • Stores current document_mode in editor state
  • Adds ToggleDocumentMode message
  • Handles toggle logic in document message handler:
  1. DesignMode -> MaskMode
    
  2. MaskMode -> DesignMode
    
  • Maps Q to ToggleDocumentMode

Scope and intent

  • Pure editor state change only
  • No rendering pipeline changes
  • No frontend UI additions
  • No behavior beyond mode state toggle

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new DocumentMode enum, including a MaskMode variant, and integrates it into the DocumentMessageHandler to allow toggling and setting the document mode. The review feedback suggests ensuring UI consistency by triggering PortfolioMessage::UpdateDocumentWidgets when the mode changes and recommends uncommenting and updating the fmt::Display implementation for DocumentMode to avoid leaving dead code.

@krVatsal krVatsal force-pushed the documentMode-extension branch from ca57043 to 268ec73 Compare April 9, 2026 08:59
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.

1 participant