Skip to content

Conversation

Acorn221
Copy link

@Acorn221 Acorn221 commented Mar 18, 2025

Description

This PR introduces a "Creator Mode" layout, which closely follows the VsCode native "Zen Mode" but it lays out the elements in the positions we want them to be in

Warning

This currently adds in an an F1 menu option (seen here) which will ideally to be removed before deployment

image

Before entering Creator Mode:
image

Entering Creator Mode:
image

Exiting Creator Mode:
image


Important

Introduces "Creator Mode" layout with custom settings, adds commands and context keys, and updates layout services and tests.

  • Behavior:
    • Adds "Creator Mode" layout similar to Zen Mode with custom element positions in layout.ts.
    • New commands enterCreatorMode and exitCreatorMode in layoutActions.ts.
    • Temporary F1 menu option for Creator Mode in layoutActions.ts.
  • Context Keys:
    • Adds InEditorCreatorModeContext to contextkeys.ts.
  • Layout Service:
    • Updates IWorkbenchLayoutService in layoutService.ts to include Creator Mode events and methods.
  • Tests:
    • Updates TestLayoutService in workbenchTestServices.ts to include Creator Mode methods.

This description was created by Ellipsis for c619fda. It will automatically update as commits are pushed.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to c619fda in 4 minutes and 30 seconds

More details
  • Looked at 650 lines of code in 8 files
  • Skipped 0 files when reviewing.
  • Skipped posting 21 drafted comments based on config settings.
1. src/vs/workbench/services/layout/browser/layoutService.ts:1480
  • Draft comment:
    Creator Mode logic is almost a copy of Zen mode. Consider refactoring and extracting common functionality into helper functions to reduce duplication.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. src/vs/workbench/services/layout/browser/layoutService.ts:1490
  • Draft comment:
    Avoid using console.log/console.warn for production modules. Use a logging service or remove debug prints before deployment.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. src/vs/workbench/browser/parts/overlay/pearOverlayPart.ts:3
  • Draft comment:
    The header comments indicate that the overlay layout implementation is messy. Consider refactoring and moving inline style definitions into separate CSS files.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. src/vs/workbench/browser/parts/overlay/pearOverlayPart.ts:190
  • Draft comment:
    There is duplicated code for setting styles on the webview container and overlays. Refactor repeating style assignments into a shared helper to ease future maintenance.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. src/vs/workbench/common/contextkeys.ts:89
  • Draft comment:
    The pear icon comment (🍐) may be confusing to new developers. Consider clarifying its purpose or removing emoticons from production code.
  • Reason this comment was not posted:
    Confidence changes required: 30% <= threshold 50%
    None
6. src/vs/workbench/test/browser/workbenchTestServices.ts:6
  • Draft comment:
    Test service implementations are lengthy but acceptable in tests. Ensure that any unimplemented methods intended only for tests provide clear error messages if accidentally called.
  • Reason this comment was not posted:
    Confidence changes required: 20% <= threshold 50%
    None
7. src/vs/workbench/common/contextkeys.ts:89
  • Draft comment:
    Remove the non‐standard 🍐 emoji from the InEditorCreatorModeContext comment; it may not be appropriate in production code.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50%
    While having emojis in production code might be considered non-standard, this is really a minor stylistic issue. The emoji is in a comment and doesn't affect functionality. The comment doesn't point out any actual problems with the code changes. It's more of a personal preference about code style.
    The emoji could potentially be part of some internal team convention or have special meaning I'm not aware of. Maybe there's a good reason it's there.
    Even if the emoji has some special meaning, commenting on decorative elements in comments is not a valuable use of code review. The emoji doesn't affect functionality and isn't causing any real issues.
    This comment should be deleted as it's focused on a minor stylistic issue in a comment rather than any substantive code problems.
8. src/vs/workbench/services/layout/browser/layoutService.ts:1480
  • Draft comment:
    Avoid using console.log/console.warn in production code (e.g. in Creator Mode methods). Consider replacing them with a proper logger.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
9. src/vs/workbench/services/layout/browser/layoutService.ts:1480
  • Draft comment:
    The Creator Mode enter/exit logic is verbose and duplicates patterns similar to Zen Mode. Refactor common routines into helper functions to improve readability and maintainability.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
10. src/vs/workbench/parts/overlay/pearOverlayPart.ts:3
  • Draft comment:
    The header comments indicate that this overlay layout code is messy and unmaintainable. Consider refactoring by moving inline styles into dedicated CSS files, unifying the open and show functions, and clarifying layout responsibilities.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
11. src/vs/workbench/parts/overlay/pearOverlayPart.ts:311
  • Draft comment:
    The open() method attaches a click listener to the fullScreenOverlay every time it's called, which may lead to multiple listeners. Ensure that the listener is added only once or is properly removed on close.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
12. src/vs/workbench/parts/overlay/pearOverlayPart.ts:119
  • Draft comment:
    Extract inline style assignments into separate CSS files to simplify maintenance and improve clarity.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
13. src/vs/workbench/browser/actions/layoutActions.ts:185
  • Draft comment:
    Typo: The localization key 'cofigureLayoutIcon' should be corrected to 'configureLayoutIcon' for consistency.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
14. src/vs/workbench/browser/actions/layoutActions.ts:631
  • Draft comment:
    Typographical error: In the HideEditorActionsAction definition, the localization keys 'hideEditorActons' and 'hideEditorActonsDescription' have a typo. They should be corrected to 'hideEditorActions' and 'hideEditorActionsDescription' respectively.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
15. src/vs/workbench/browser/actions/layoutActions.ts:654
  • Draft comment:
    Typographical error: In the ShowEditorActionsAction definition, the localization keys 'showEditorActons' and 'showEditorActonsDescription' are misspelled. They should be corrected to 'showEditorActions' and 'showEditorActionsDescription' respectively.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
16. src/vs/workbench/browser/layout.ts:1502
  • Draft comment:
    Typographical error: In the comment describing the configuration lookup for an editor's URI, 'respecting it's uri' should be corrected to 'respecting its uri'.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 30% <= threshold 50%
    This comment points out a typographical error in a comment within the code. Correcting typographical errors can improve code readability and maintainability. However, it is purely informative and does not suggest a change to the code logic or functionality.
17. src/vs/workbench/browser/layout.ts:1894
  • Draft comment:
    CSS Issue: The container for pearOverlayPart is assigned style.display = 'absolute', which is not a valid value for the display property. Consider using a valid display value (e.g., 'block') or removing this incorrect assignment.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
18. src/vs/workbench/browser/layout.ts:2989
  • Draft comment:
    Typographical error: The key 'SIDEBAR_POSITON' is misspelled. It should be 'SIDEBAR_POSITION' to correctly reflect its meaning.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
19. src/vs/workbench/browser/parts/overlay/pearOverlayPart.ts:3
  • Draft comment:
    There are a few typographical issues in the header comments:

  • Line 4: "its not maintainable and iterable." should ideally be "it's not maintainable and iterable." (add the missing apostrophe).

  • Line 5: "Simplyfy this." is misspelled; consider changing it to "Simplify this."

  • Line 6: The sentence "why open and show are two different functions?" could be rephrased for clarity, for example: "Why are 'open' and 'show' implemented as two different functions?"

These are minor edits but would enhance readability.

  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
20. src/vs/workbench/common/contextkeys.ts:163
  • Draft comment:
    Typographical error: The function name 'getVisbileViewContextKey' appears to have a typo. Consider renaming it to 'getVisibleViewContextKey' for improved clarity.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
21. src/vs/workbench/services/layout/browser/layoutService.ts:273
  • Draft comment:
    Typo in comment: 'Gets the panel alignement.' should be 'Gets the panel alignment.'
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_elTRZUa9q1c1tjls


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

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