Skip to content

feat(yasgui): hide the query editor and redesign the share popup - #259

Open
MathiasVDA wants to merge 2 commits into
mainfrom
claude/project-thread-ck6h1p
Open

MathiasVDA wants to merge 2 commits into
mainfrom
claude/project-thread-ck6h1p

Conversation

@MathiasVDA

Copy link
Copy Markdown
Collaborator

Requested by Mathias · project thread

Closes #258.

Hide the query

  • New Hide query button at the right end of the editor toolbar, plus a Ctrl+K command. When the query is hidden, the editor folds to one line ("The query is hidden") and the results fill the card. Share, Save and Run stay available, while the editing tools (Prefixes, Insert, AI, format, fullscreen, layout) are hidden. Click Show query or the line itself to bring the editor back.
  • Each tab remembers the state (queryHidden in the persisted tab JSON).
  • This works in the stacked and side-by-side layouts. In side-by-side, the folded editor sits above the results.
  • Share links: hideQuery=true opens the link with the query hidden. The share popup offers this as "Show only the results", ticked by default when the tab's query is hidden. If a link holds an update or invalid query, MatGUI does not run it, so it always shows the editor in that case.
  • Config: hideQuery: true opens new tabs with the query hidden. The default is false.

Share popup redesign

  • The popup moves to packages/yasqe/src/sharePopup.ts and uses the MatData look. It has a "Link" section (read-only URL field with a Copy button, the hide-query option and Shorten link) and a "Command line" section (cURL, PowerShell and wget rows).
  • After a copy, the button shows "Copied" inline, which replaces the old toasts. A note lists the credentials when the request has any, and errors appear inline.
  • The popup closes on Escape, on an outside click or when you click Share again. On narrow screens it spans the viewport. The old yasgui overrides in themes.scss and tab.scss are removed.
  • Yasqe API: createShareableLink(yasqe, options?) now receives { hideQuery }. A new shareHideQueryOption config shows the option. Existing one-argument createShareableLink functions keep working.

Docs

  • User guide has a new "Hide the Query" section and an updated "Share Queries" section. The developer guide covers hideQuery and shareHideQueryOption.
  • What's new has an undated 6.14.0 entry, and there's a changeset (minor for yasgui and yasqe).

Tests

  • Two new browser tests in share-link-browser.ts: a hideQuery link (state, popup option and link, Show query), and a hidden update query that gets shown.
  • Puppeteer suite: 101 passing. Unit tests: 1785 passing. Lint and util:validateTs are clean on the changed files.

Screenshots are in the project files (issue-258/).


Generated by Claude Code

Hide query folds the editor to one line so the results take the card
(#258). The state is kept per tab, can be toggled from Ctrl+K, and share
links open that way with hideQuery=true ("Show only the results" in the
share popup). An update or invalid query from a link is always shown.
New tabs can start hidden with the hideQuery config option.

The share popup moves to its own module in the MatData look: the link
with a Copy button, the option, the shortener and the cURL, PowerShell
and wget commands, with inline Copied feedback and a credentials note
instead of toasts. It closes on Escape and spans a narrow viewport.
@MathiasVDA MathiasVDA self-assigned this Nov 6, 2026

This branch has not been deployed

No deployments
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.

Show/hide SPARQL query

1 participant