Skip to content

Commit f9d99b2

Browse files
authored
feat(yasgui): "How MatGUI works" quick start tour
feat(yasgui): "How MatGUI works" quick start tour
2 parents d34d759 + c7a4f10 commit f9d99b2

11 files changed

Lines changed: 1240 additions & 4 deletions

File tree

‎.changeset/quick-start-tour.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@matdata/yasgui": minor
3+
---
4+
5+
"How MatGUI works": a quick start tour of five pages, each with three things to know and a small illustration, opens the first time someone uses MatGUI and stays available from the help menu and the Ctrl+K search. It links to the full user guide. Embedders can leave it out with `showQuickStart: false`, or keep it in the help menu only with `quickStartOnFirstVisit: false`.

‎docs/developer-guide.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,13 @@ interface Config {
701701
// Search for saved queries, commands and settings in the top bar, also opened with Ctrl+K / Cmd+K
702702
showCommandPalette?: boolean; // default: true
703703

704+
// "How MatGUI works" quick start tour in the help menu of the top bar
705+
showQuickStart?: boolean; // default: true
706+
707+
// Open the quick start tour on the first visit in a browser (remembered in local storage under
708+
// "matgui_quickStart_seen"). Set to false to only offer it in the help menu
709+
quickStartOnFirstVisit?: boolean; // default: true
710+
704711
// Layout orientation: 'vertical' or 'horizontal'
705712
orientation?: 'vertical' | 'horizontal'; // default: 'vertical'
706713

‎docs/user-guide.md‎

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- [Common SPARQL Query Types](#common-sparql-query-types)
1515
- [Getting Started](#getting-started)
1616
- [Accessing MatGUI](#accessing-matgui)
17+
- [Quick Start Tour](#quick-start-tour)
1718
- [Running Matgui with Docker](#running-matgui-with-docker)
1819
- [Your First Query](#your-first-query)
1920
- [Saving Your Work](#saving-your-work)
@@ -150,6 +151,20 @@ This excellent resource covers:
150151

151152
Matgui is available at: **[https://matgui.matdata.eu/](https://matgui.matdata.eu/)**
152153

154+
### Quick Start Tour
155+
156+
The first time you open MatGUI in a browser, **How MatGUI works** shows you around in five short pages, with three things to know on each:
157+
158+
1. **Write and run a query**: pick an endpoint, write with autocomplete, run with `Ctrl+Enter`
159+
2. **Explore the results**: switch views, describe a resource, download the results
160+
3. **Keep your queries**: work in tabs, save to a workspace, share a link
161+
4. **Let MatGUI help**: insert snippets, look at the endpoint, ask the AI assistant (or hover an IRI, when the site has no AI assistant)
162+
5. **Find your way**: search everything with `Ctrl+K`, open the side panel with `Ctrl+B`, switch the theme and open the settings
163+
164+
Click **Next** and **Back**, the dots at the bottom, or use the `←` and `→` keys to move between the pages. **Read the full user guide** opens this guide. Close the tour with **Skip**, **Start querying** on the last page, the × or `Esc`. MatGUI remembers in your browser that you saw it and doesn't open it again by itself.
165+
166+
To see it again, click **Help** (?) in the top bar and pick **How MatGUI works**, or search for it with `Ctrl+K`. Sites that embed MatGUI can leave the tour out, or keep it in the help menu without opening it on the first visit.
167+
153168
### Running Matgui with Docker
154169

155170
You can run Matgui locally using Docker, which is especially useful when working with local SPARQL endpoints.
@@ -353,7 +368,7 @@ From left to right:
353368
- **MatGUI**: the name of the application (sites that embed MatGUI can hide it)
354369
- **Query tabs**: one tab per query. The active tab is raised. Tabs that hold a saved (managed) query show a small dot before their name; the dot turns amber when the query has unsaved changes. Hover a tab to show its close button (×), click **+** to add a tab
355370
- **Search queries and commands** (`Ctrl+K`, or `⌘K` on a Mac): see [Search](#search)
356-
- **Help** (?): opens the help menu with **What's new** and the **Documentation** (see [Help Menu and What's New](#help-menu-and-whats-new)). A blue dot on the button means there is a release you haven't seen yet
371+
- **Help** (?): opens the help menu with **How MatGUI works** (the [quick start tour](#quick-start-tour)), **What's new** and the **Documentation** (see [Help Menu and What's New](#help-menu-and-whats-new)). A blue dot on the button means there is a release you haven't seen yet
357372
- **Theme** (sun / moon): switches between the light and dark theme
358373
- **Settings** (gear): opens the settings of the active tab
359374

@@ -363,7 +378,7 @@ Click **Search queries and commands** in the top bar, or press `Ctrl+K` (`⌘K`
363378

364379
- **Queries**: the saved queries of all your workspaces, with the workspace and folder they are in. Pick one to open it in a new tab, or to go to the tab that already has it open
365380
- **Snippets**: the code snippets of the [Insert menu](#insert-menu), found by name, group or the code they write (`filter` finds the comparison snippets). Pick one to insert it at the cursor
366-
- **Commands**: Run query, New tab, Insert snippet, Insert PREFIX declarations, Switch endpoint, Explore endpoint, Show saved queries, Toggle side panel, Toggle side-by-side layout, Format, Share, Save, Download, full screen editor, dark mode, What's new and the documentation. Commands with a shortcut show it at the right
381+
- **Commands**: Run query, New tab, Insert snippet, Insert PREFIX declarations, Switch endpoint, Explore endpoint, Show saved queries, Toggle side panel, Toggle side-by-side layout, Format, Share, Save, Download, full screen editor, dark mode, How MatGUI works, What's new and the documentation. Commands with a shortcut show it at the right
367382
- **Settings**: every page of the settings (General, SPARQL endpoints, Workspaces, Prefixes, Editor, AI, Import / export, Keyboard shortcuts, About), for example type `prefixes` and pick **Settings: Prefixes**
368383

369384
Type `>` first to search commands and settings only. Snippets and settings show up once you type something. Use `↑` and `↓` to move, `Enter` to open and `Esc` to close.
@@ -372,12 +387,13 @@ Type `>` first to search commands and settings only. Snippets and settings show
372387

373388
Click **Help** (?) in the top bar to open the help menu:
374389

390+
- **How MatGUI works**: the [quick start tour](#quick-start-tour), five short pages that show you around
375391
- **What's new**: what changed in each version of MatGUI since 5.0.0, newest first. Every change is marked **New**, **Improved** or **Fixed**; use the buttons at the top to show only one kind. Releases you haven't seen yet are marked **New to you**. **Full release notes on GitHub** opens the complete notes, including the changes for developers
376392
- **Documentation**: opens this user guide in a new browser tab
377393

378394
After MatGUI is updated, a blue dot on the Help button and next to **What's new** tells you there is something new. The dot goes away once you open What's new. On your first visit there is no dot. You can also open it from the [search](#search) (`Ctrl+K`, then type `what's new`). Press `Esc` to close it.
379395

380-
Sites that embed MatGUI can leave out What's new (`showWhatsNew: false`) or the documentation link (`helpUrl: false`).
396+
Sites that embed MatGUI can leave out the quick start tour (`showQuickStart: false`), What's new (`showWhatsNew: false`) or the documentation link (`helpUrl: false`).
381397

382398
### Query Card
383399

‎packages/yasgui/src/CommandPalette.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,18 @@ export default class CommandPalette {
386386
},
387387
});
388388
}
389+
if (yasgui.quickStart) {
390+
const quickStart = yasgui.quickStart;
391+
commands.push({
392+
section: "commands",
393+
label: "How MatGUI works",
394+
icon: "compass",
395+
keywords: "help quick start tour introduction onboarding",
396+
run: () => {
397+
quickStart.open();
398+
},
399+
});
400+
}
389401
if (yasgui.whatsNew) {
390402
commands.push({
391403
section: "commands",

0 commit comments

Comments
 (0)