[Feature Request] Add "Copy as" actions to Results View

Aperta
#284 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
postgresql, vscode
Ambito
desktop, frontend

Direzione di ricerca

Inizia nella Results View e ispeziona le azioni "Save as" esistenti e i relativi formati di output. Determina come vengono attualmente serializzati i risultati, quindi definisci i formati supportati da "Copy as" e la loro posizione nell’UI; il lavoro è completato quando gli utenti possono copiare i formati selezionati dalla Results View con un output coerente con il salvataggio.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

There's options to save as JSON, CSV, or even Excel, but my workflows rarely have me saving results. Instead sharing them in chat threads and comment sections of my company's team and project management tools; especially if the results are one-row results.

I'd like to request "Copy As" actions for the Results View.

From a UI/UX perspective, layered icons with your typical "copy" or "clipboard" icon as the top layer and the output format as the bottom layer would be sufficient. You could line them up below the current "Save as" actions in the results view. For short enough viewports, you could probably collapse the "Save as" actions and "Copy as" actions into their own context menus or even have a "..." menu at the bottom of the actions for "the rest".

Useful "Copy As" actions off the top of my head.

  • json
[
 {
  "column_a": "lorem ipsum",
  "column_b": 1,
  "column_c": "2026-07-16T21:01:15.861Z"
 },
 {
  "column_a": "lorem ipsum",
  "column_b": 1,
  "column_c": "2026-07-16T21:01:15.861Z"
 },
 {
  "column_a": "lorem ipsum",
  "column_b": 1,
  "column_c": "2026-07-16T21:01:15.861Z"
 }
]
  • csv
column_a,column_b,column_c
lorem ipsum,1,2026-07-16T21:01:15.861Z
lorem ipsum,1,2026-07-16T21:01:15.861Z
lorem ipsum,1,2026-07-16T21:01:15.861Z
  • tsv (tabs shown for reference here)
column_a\tcolumn_b\tcolumn_c
lorem ipsum\t1\t2026-07-16T21:01:15.861Z
lorem ipsum\t1\t2026-07-16T21:01:15.861Z
lorem ipsum\t1\t2026-07-16T21:01:15.861Z
  • markdown
| column_a | column_b | column_c |
| --- | --- | --- |
| lorem ipsum | 1 | 2026-07-16T21:01:15.861Z |
| lorem ipsum | 1 | 2026-07-16T21:01:15.861Z |
| lorem ipsum | 1 | 2026-07-16T21:01:15.861Z |
  • fancy text (a format I consistently see in stack overflow, and other forums, answers)
+-------------+----------+--------------------------+
| column_a    | column_b | column_c                 |
+-------------+----------+--------------------------+
| lorem ipsum | 1        | 2026-07-16T21:01:15.861Z |
| lorem ipsum | 1        | 2026-07-16T21:01:15.861Z |
| lorem ipsum | 1        | 2026-07-16T21:01:15.861Z |
+-------------+----------+--------------------------+

There are rendering questions with regards to certain data-types (i.e. jsonb), but I'll leave those implementation answers to the extension developers and community. I'd expect the outputs to be generally close to how they are outputted when I "Save as".

I recognize, and concede, that large results are better served by the "Save as" actions. Maybe there's a character threshold that disables "Copy as" actions or maybe you just let the users deal with the consequences of copying 10,000 rows of 100 columns to their clipboard. Maybe you prompt for confirmation when a copy would be better served by a save. If I were the user, I would know based on the results whether I'm saving or even attempting to copy anyways.

I'm also sure there are many other formats you could save/copy as. The ones listed are examples of formats I've seen or would want myself. If there's one I'd like first, it's json, because it's the most flexible, and probably easiest to implement of the bunch. Second, markdown because I'm seeing more and more tools support markdown input for AI Agents.

Lingua principale
Nessun dato sulla lingua
Stelle
395
Fork
33
Merge medio
1h 46m
PR unite (30g)
3

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/vscode-pgsql

Tutte le issue di microsoft/vscode-pgsql

Issue simili

Altre issue su Desktop Dev

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.