Skip to content

Prototype: Share as Private Gist selection UI - #336475

Draft
Ralph Feltis (rfeltis) wants to merge 10 commits into
microsoft:mainfrom
rfeltis:rfeltis-private-gist-share-ui
Draft

Ralph Feltis (rfeltis) wants to merge 10 commits into
microsoft:mainfrom
rfeltis:rfeltis-private-gist-share-ui

Conversation

@rfeltis

Copy link
Copy Markdown
Contributor

Summary

  • Adds a selection-gated Share as Private Gist action to the editor Share submenu, File > Share, and editor title Share menu.
  • Prototype confirmation dialog previews the selected text; no real gist is created.
  • Product-ready proof recorded in Codespace against Code OSS.

Test plan

  • Select text in editor
  • Open context menu Share > Share as Private Gist
  • Confirm prototype dialog and completion message
  • Full-window H.264 proof video + screenshots

Notes

UI prototype only — sharing backend intentionally not implemented.

Add a selection-gated Share as Private Gist action to the editor Share
menus and File > Share. Shows a prototype confirmation dialog with a
selection preview; does not create a real gist.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings September 16, 2026 20:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Editor-title invocation and multi-selection handling can target, hide, or share the wrong selection.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity · 1 Low severity

Open (2)
What changed in this PR

Adds a selection-gated prototype for sharing editor text as a private gist without implementing a backend.

Changes:

  • Adds Share menu actions and confirmation/completion dialogs.
  • Adds a scrollable selected-text preview.
  • Supports copying the selection.
File Description
share.css Styles the selection preview.
share.contribution.ts Registers and implements the prototype action.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +110 to +113
id: MenuId.EditorTitleContextShare,
group: '0_gist',
order: 1,
when: EditorContextKeys.hasNonEmptySelection
Comment on lines +152 to +157
detail: localize(
'shareAsPrivateGist.detail',
"Prototype only — no gist will be created. {0} line(s) from '{1}' are ready to share privately.",
lineCount,
fileLabel
),
Prototype line-number context action copies a github.com blob URL and
shows a bottom-right notification with an Open Link action.

Co-authored-by: Copilot App <[email protected]>
Show the prototype next to existing Share entries (including editor
context Share with no selection), not only on the line gutter.

Co-authored-by: Copilot App <[email protected]>
Reuse the editor Quick Fix / lightbulb surface with a preferred code
action: Show me how to share this code. Opens a tip dialog and can
continue into Share as Private Gist.

Co-authored-by: Copilot App <[email protected]>
Include refactor kind so the share tip is more likely to surface on
selection via the standard Quick Fix / lightbulb UI.

Co-authored-by: Copilot App <[email protected]>
Show a lightbulb affordance on non-empty selections that opens the
Show me how to share this code tip (Quick Action style). Keep Share
menu GitHub link and private gist flows.

Co-authored-by: Copilot App <[email protected]>
Keep editor selection when opening the share tip and when continuing
into Share as Private Gist from the tip dialog.

Co-authored-by: Copilot App <[email protected]>
Capture selected text before the tip dialog and show the private gist
prototype dialog from the tip button without relying on re-querying
editor selection.

Co-authored-by: Copilot App <[email protected]>
Reuse the selection lightbulb affordance with share tip copy, keep Share as
Private Gist and Copy GitHub.com Link menu actions for the UI prototype.

Co-authored-by: Copilot App <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants