Prototype: Share as Private Gist selection UI - #336475
Draft
Ralph Feltis (rfeltis) wants to merge 10 commits into
Draft
Ralph Feltis (rfeltis) wants to merge 10 commits into
Ralph Feltis (rfeltis) wants to merge 10 commits into
Conversation
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]>
Contributor
There was a problem hiding this comment.
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
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]>
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Test plan
Notes
UI prototype only — sharing backend intentionally not implemented.