Skip to content
Merged
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
- 🛠️ **[Developer Guide](https://github.com/Matdata-eu/Matgui/blob/main/docs/developer-guide.md)** - API reference and integration guide
- 🚀 **[Production Environment](https://matgui.matdata.eu/)** - Live instance
- 📦 **[npm Package](https://www.npmjs.com/package/@matdata/yasgui)**
- 🐳 **[Docker Hub](https://hub.docker.com/r/mathiasvda/yasgui)**
- 🐳 **[Docker Hub](https://hub.docker.com/r/mathiasvda/matgui)**
- 📝 **[Releases & Changelog](https://github.com/Matdata-eu/Matgui/releases)**
- 💻 **[GitHub Repository](https://github.com/Matdata-eu/MatGUI)**

Expand Down Expand Up @@ -126,8 +126,8 @@ yarn add @matdata/yasgui

**Run with default endpoint:**
```bash
docker pull mathiasvda/yasgui:latest
docker run -p 8080:8080 mathiasvda/yasgui:latest
docker pull mathiasvda/matgui:latest
docker run -p 8080:8080 mathiasvda/matgui:latest
```

Access at: `http://localhost:8080`
Expand All @@ -136,7 +136,7 @@ Access at: `http://localhost:8080`
```bash
docker run -p 8080:8080 \
-e MATGUI_DEFAULT_ENDPOINT=https://your-endpoint.com/sparql \
mathiasvda/yasgui:latest
mathiasvda/matgui:latest
```

For detailed installation instructions and usage examples, see the **[Developer Guide](https://github.com/Matdata-eu/Matgui/blob/main/docs/developer-guide.md#installation)** and **[User Guide - Docker](https://github.com/Matdata-eu/Matgui/blob/main/docs/user-guide.md#running-matgui-with-docker)**.
Expand Down
11 changes: 7 additions & 4 deletions docs/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ You can run Matgui locally using Docker, which is especially useful when working
**Running MatGUI:**

```bash
docker run -p 8080:8080 mathiasvda/yasgui
docker run -p 8080:8080 mathiasvda/matgui
```

This command:
Expand Down Expand Up @@ -173,7 +173,7 @@ This command:
To run on a different port (e.g., 3000):

```bash
docker run -p 3000:8080 mathiasvda/yasgui
docker run -p 3000:8080 mathiasvda/matgui
```

Then access at `http://localhost:3000`
Expand Down Expand Up @@ -253,7 +253,7 @@ The process is similar in Chrome, Firefox, and Safari:
If you frequently work with local endpoints, consider running Matgui locally with Docker:

```bash
docker run -p 8080:8080 mathiasvda/yasgui
docker run -p 8080:8080 mathiasvda/matgui
```

Then open your browser and navigate to `http://localhost:8080`.
Expand Down Expand Up @@ -1396,19 +1396,22 @@ Shows the raw response from the SPARQL endpoint.
- Code folding for nested structures
- Copy to clipboard functionality
- Line numbers
- **Ctrl+Click on a URI** to run a `DESCRIBE` query for that resource and append the returned triples to the response view (similar to the Graph plugin's node expansion)

**Best For:**

- Debugging queries
- Inspecting raw endpoint responses
- Understanding response structure
- Working with specific response formats
- Progressively exploring a resource without leaving the raw response view

**Usage:**

- Execute any query
- Select "Response" from the plugin selector
- View raw response with syntax highlighting
- Hold `Ctrl` (or `Cmd` on macOS) and click any URI in the response to fetch and append its `DESCRIBE` result

### Graph Plugin

Expand Down Expand Up @@ -1903,7 +1906,7 @@ Browsers block HTTP requests to local endpoints from HTTPS pages (mixed content
1. **Run Matgui Locally with Docker** (Recommended):

```bash
docker run -p 8080:8080 mathiasvda/yasgui
docker run -p 8080:8080 mathiasvda/matgui
```

- Eliminates all permission issues
Expand Down
16 changes: 16 additions & 0 deletions packages/yasgui/src/PersistentConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,22 @@ export default class PersistentConfig {
this.toStorage();
}

/**
* Get the persisted layout orientation
*/
public getOrientation(): "vertical" | "horizontal" | undefined {
const orientation = this.persistedJson.orientation;
return orientation === "vertical" || orientation === "horizontal" ? orientation : undefined;
}

/**
* Set and persist the layout orientation
*/
public setOrientation(orientation: "vertical" | "horizontal") {
this.persistedJson.orientation = orientation;
this.toStorage();
}

/**
* Get list of disabled developer-configured endpoint buttons
*/
Expand Down
3 changes: 3 additions & 0 deletions packages/yasgui/src/Tab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,9 @@ export class Tab extends EventEmitter {
// Update global config
this.yasgui.config.orientation = newOrientation;

// Persist orientation
this.yasgui.persistentConfig.setOrientation(newOrientation);

// Apply to all tabs
for (const tabId in this.yasgui._tabs) {
const tab = this.yasgui._tabs[tabId];
Expand Down
6 changes: 6 additions & 0 deletions packages/yasgui/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@ export class Yasgui extends EventEmitter {
this.config.showSnippetsBar = persistedShowSnippetsBar;
}

// Load persisted orientation if available
const persistedOrientation = this.persistentConfig.getOrientation();
if (persistedOrientation !== undefined) {
this.config.orientation = persistedOrientation;
}

this.tabElements = new TabElements(this);
this.tabPanelsEl = document.createElement("div");

Expand Down
Loading
Loading