Compare commits

..
Author SHA1 Message Date
root-at-skic 4b36136432 0.10.10: Buy me a coffee button at the top of the README 2026-11-08 22:09:03 +02:00
root-at-skic 7dde9ffffe Merge pull request '0.10.9: square Sync button on model, registry, decision and Graph pages' (#40) from fix/sync-button-width into main 2026-11-08 11:31:37 -08:00
root-at-skic f6f59fae67 0.10.9: square Sync button on model, registry, decision and Graph pages
aspect-ratio with a stretched height left the width at the icon's size.
Fixed sizes instead: 33px beside the model switch, 29px in the Graph
header.
2026-11-08 21:31:22 +02:00
root-at-skic 0752128789 Merge pull request '0.10.8: main.archify opens with its top-level panels collapsed' (#39) from feat/model-panels-collapsed into main 2026-11-08 11:06:10 -08:00
root-at-skic 517697197e Sync button sits in the view switch's row on every page
Model, registry and decision pages: next to the switch, not floating above
it. Graph page: after Export PNG (its header is built by graph.js a moment
later, so the button waits for it) instead of covering Export. Sized to
the controls beside it.
2026-11-08 20:59:16 +02:00
root-at-skic c71296b01a 0.10.8: main.archify opens with its top-level panels collapsed
Shared, Diagrams, Registries and Decisions start closed on the model page;
folders inside keep their own default. Open or closed is still kept in
the webview state while the page is open.
2026-11-08 20:48:35 +02:00
root-at-skic 86a8adf03b Merge pull request '0.10.7: Model | Graph | Source styled like 2D | 3D' (#38) from fix/mode-switch-style into main 2026-11-08 10:37:07 -08:00
root-at-skic 6153c7f145 0.10.7: Model | Graph | Source styled like 2D | 3D
Archify gives every toolbar button a 2.75rem minimum height and a painted
::before; the switch's segments are buttons, so they grew to full height.
Segments now keep 1.75rem inside a 2.75rem switch, like 2D | 3D. The high
contrast rule no longer turns a shared model's Sync button blue.
2026-11-08 20:35:48 +02:00
root-at-skic 885977c4aa Merge pull request '0.10.6: Sync sign-in comes back through 127.0.0.1' (#37) from fix/sync-signin-loopback into main 2026-11-08 10:06:32 -08:00
5 changed files with 52 additions and 18 deletions

No files matched your search

+18
View File
@@ -1,5 +1,23 @@
# Changelog
## 0.10.10 — 2026-11-08
- README: the Buy me a coffee button at the top.
## 0.10.9 — 2026-11-08
- The Sync button is square again on the model, registry, decision and Graph pages (0.10.8 squeezed it narrow there).
## 0.10.8 — 2026-11-08
- **A model opens as its outline.** On `main.archify` the top-level panels (Shared, Diagrams, Registries, Decisions) start collapsed; open the one you need. What you open or close is kept while the page is open.
- **Sync button in line on every page.** On the model, registry and decision pages it sits next to Model | Graph | Source instead of floating above it, and on the Graph page it comes after Export PNG instead of covering it. It takes the height of the controls beside it.
## 0.10.7 — 2026-11-08
- **Model | Graph | Source looks like 2D | 3D.** The selected view is the same inset pill, the same height as the other toolbar controls.
- The Sync button of a shared model is green in high contrast themes too.
## 0.10.6 — 2026-11-08
- **Sync sign-in comes back by itself.** The browser now returns the sign-in to a one-off port on this machine (`127.0.0.1`) instead of a `vscode://` link. Browsers open such links only after a click, so when you were already signed in to the identity provider the editor kept waiting. Remote and web editors still use the link.
+2 -2
View File
@@ -1,13 +1,13 @@
# Archify Diagram Viewer
[![Buy me a coffee](https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png)](https://buymeacoffee.com/root.at.skic)
Create and view [Archify](https://github.com/tt-a1i/archify) diagrams inside VS Code. You write a diagram as a **`.archify` file in YAML**; clicking it opens the interactive diagram, and the diagram follows your edits as you type.
![An Archify workflow diagram as shown by the preview](docs/preview.png)
This is an unofficial extension. It bundles the Archify renderer (MIT, © tt-a1i) and runs it on VS Code's own Node runtime, so nothing else needs to be installed.
Free and open source. If it saves you time, you can [buy me a coffee](https://buymeacoffee.com/root.at.skic) ☕
## Supported files
| File | Format | What the extension does |
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "archify-vscode-ext",
"version": "0.10.6",
"version": "0.10.10",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "archify-vscode-ext",
"version": "0.10.6",
"version": "0.10.10",
"license": "MIT",
"dependencies": {
"@codemirror/autocomplete": "^6.20.4",
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "archify-vscode-ext",
"displayName": "Archify Diagram Viewer",
"description": "Archify diagrams in VS Code. Write diagrams as .archify files in YAML: they open as the interactive diagram, with live updates, validation, templates and completion. Also previews Archify's own JSON files (*.architecture.json, …) and opens rendered Archify HTML.",
"version": "0.10.6",
"version": "0.10.10",
"publisher": "root-at-skic",
"license": "MIT",
"sponsor": {
+29 -13
View File
@@ -208,6 +208,7 @@ function bridgeScript(options: PageOptions): string {
}, true);
// Collapsible panels of the model page; open/closed is kept in the webview state.
// The model page's top-level panels start closed: a model opens as its outline.
function panelStates() { return (vscode.getState() || {}).modelPanels || {}; }
function panel(key, className, title, count, defaultOpen) {
// count: a number or a short text such as "3 files".
@@ -624,7 +625,7 @@ function bridgeScript(options: PageOptions): string {
live.hidden = true;
body.appendChild(live);
var count = model.groups.reduce(function (n, g) { return n + g.diagrams.length; }, 0);
var diagramsPanel = panel('diagrams', 'archify-model-diagrams', 'Diagrams', count, true);
var diagramsPanel = panel('diagrams', 'archify-model-diagrams', 'Diagrams', count, false);
body.appendChild(diagramsPanel);
if (!count) diagramsPanel.appendChild(el('p', 'archify-model-empty', 'No diagrams yet. Add .archify files next to main.archify or in subfolders.'));
model.groups.forEach(function (group) {
@@ -658,7 +659,7 @@ function bridgeScript(options: PageOptions): string {
byFile[element.file].push(element);
});
files.sort();
var registryPanel = panel('registry', 'archify-model-registry', 'Registries', files.length + (files.length === 1 ? ' file' : ' files'), true);
var registryPanel = panel('registry', 'archify-model-registry', 'Registries', files.length + (files.length === 1 ? ' file' : ' files'), false);
body.appendChild(registryPanel);
files.forEach(function (file) {
var elements = byFile[file].slice().sort(function (a, b) { return a.line - b.line; });
@@ -676,7 +677,7 @@ function bridgeScript(options: PageOptions): string {
}
// Decisions: one list, live ones first, superseded and rejected dimmed and last.
if (model.decisions && model.decisions.length) {
var decisionsPanel = panel('decisions', 'archify-model-decisions', 'Decisions', model.decisions.length, true);
var decisionsPanel = panel('decisions', 'archify-model-decisions', 'Decisions', model.decisions.length, false);
body.appendChild(decisionsPanel);
var decisionList = el('ul', 'archify-model-list archify-decision-list');
model.decisions.forEach(function (row) { decisionList.appendChild(decisionRowItem(row)); });
@@ -723,7 +724,7 @@ function bridgeScript(options: PageOptions): string {
if (!info) { holder.hidden = true; return; }
holder.hidden = false;
var others = info.people.filter(function (p) { return !p.me; });
var livePanel = panel('live', 'archify-model-live is-' + info.state, 'Shared \u00b7 ' + info.name, others.length ? others.length + 1 + ' here' : info.host, true);
var livePanel = panel('live', 'archify-model-live is-' + info.state, 'Shared \u00b7 ' + info.name, others.length ? others.length + 1 + ' here' : info.host, false);
var status = el('div', 'archify-live-status');
status.appendChild(el('span', 'archify-live-dot'));
status.appendChild(el('span', 'archify-live-state', (LIVE_STATE[info.state] || info.state) + (info.state === 'online' ? ' on ' + info.host : '')));
@@ -901,14 +902,23 @@ function bridgeScript(options: PageOptions): string {
button.type = 'button';
button.title = 'Archify Sync: sign in, share this model with others, or join one';
button.addEventListener('click', function (event) { event.stopPropagation(); post({ type: 'syncMenu' }); });
// A diagram page has Archify's toolbar at the top right: the button goes
// last in it, after Export. Other pages have nothing there; it floats.
var toolbar = document.querySelector('body > .toolbar');
if (toolbar) {
// Last in the row that holds the view switch: Archify's toolbar on a
// diagram (after Export), the Graph page's header actions (after Export,
// built a moment later by graph.js), next to the switch on the other
// pages. It floats only while there is no such row.
document.body.appendChild(button);
function place() {
var modeSwitch = document.getElementById('archify-mode-switch');
var row = document.querySelector('.ag-actions') || (modeSwitch && modeSwitch.parentElement) || document.querySelector('body > .toolbar');
if (!row || row === document.body) return false;
button.classList.add('in-toolbar');
toolbar.appendChild(button);
} else {
document.body.appendChild(button);
row.classList.add('archify-sync-row');
row.appendChild(button);
return true;
}
if (!place() && window.MutationObserver) {
var watch = new MutationObserver(function () { if (place()) watch.disconnect(); });
watch.observe(document.body, { childList: true, subtree: true });
}
showSyncState(false);
post({ type: 'syncReady' });
@@ -939,8 +949,11 @@ function bridgeScript(options: PageOptions): string {
+ ' display: flex !important; align-items: center !important; justify-content: center !important; border-radius: 8px !important; cursor: pointer !important;'
+ ' color: #fff !important; background: var(--vscode-button-background, #0e639c) !important; border: 1px solid var(--vscode-contrastBorder, transparent) !important;'
+ ' box-shadow: 0 1px 4px rgba(0,0,0,.35) !important; }'
+ ' .archify-model-switch-row.archify-sync-row { display: flex !important; align-items: center !important; gap: 0.5rem !important; }'
+ ' #archify-sync-button.in-toolbar { position: relative !important; top: auto !important; right: auto !important; align-self: center !important; flex: none !important; width: 36px !important; height: 36px !important; }'
+ ' body.vscode-high-contrast #archify-sync-button { background: #0e639c !important; }'
+ ' .archify-model-switch-row #archify-sync-button.in-toolbar { width: 33px !important; height: 33px !important; }'
+ ' .ag-actions #archify-sync-button.in-toolbar { width: 29px !important; height: 29px !important; }'
+ ' body.vscode-high-contrast #archify-sync-button:not(.is-shared) { background: #0e639c !important; }'
+ ' #archify-sync-button svg { display: block !important; width: 16px !important; height: 16px !important; flex: none !important; }'
+ ' #archify-sync-button:hover { background: var(--vscode-button-hoverBackground, #1177bb) !important; }'
+ ' #archify-sync-button.is-shared { background: #1f8f5f !important; }'
@@ -1073,10 +1086,13 @@ const MODEL_STYLE = `
/* The Model | Graph switch: in Archify's toolbar it is the 2D | 3D switch's twin; on the model page it sits top right. */
const SWITCH_STYLE = `
.archify-mode-switch { display: inline-flex; align-items: center; padding: 0 0.25rem; gap: 0; color: var(--text-muted, var(--vscode-descriptionForeground)); position: relative; }
.toolbar .archify-mode-switch { height: 2.75rem; box-sizing: border-box; }
.toolbar .archify-mode-switch::before { content: ""; position: absolute; inset: 0.25rem 0; border-radius: 0.6875rem; background: color-mix(in srgb, var(--panel) 78%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--panel-border) 85%, transparent), 0 1px 2px rgba(15, 23, 42, 0.04); backdrop-filter: blur(12px); }
.toolbar .archify-mode-switch:hover::before { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 22%, transparent), 0 1px 2px rgba(15, 23, 42, 0.04); }
/* Anchored on the id: Archify's .toolbar button rules (one of them with :not(#btn-theme)) would win otherwise. */
#archify-mode-switch .archify-mode-seg { position: relative; display: inline-flex; align-items: center; height: 1.75rem; padding: 0 0.7rem; border: 0; border-radius: 0.5rem; background: transparent; color: inherit; font: inherit; font-weight: 550; font-size: 0.8125rem; cursor: pointer; transition: background 0.15s, color 0.15s; }
#archify-mode-switch .archify-mode-seg { position: relative; display: inline-flex; align-items: center; height: 1.75rem; min-height: 0; margin: 0; padding: 0 0.7rem; border: 0; border-radius: 0.5rem; background: transparent; color: inherit; font: inherit; font-weight: 550; font-size: 0.8125rem; cursor: pointer; transition: background 0.15s, color 0.15s; }
/* Archify's toolbar buttons are 2.75rem tall with a painted ::before; the segments are not, like 2D | 3D. */
#archify-mode-switch .archify-mode-seg::before, #archify-mode-switch .archify-mode-seg::after { content: none; }
#archify-mode-switch .archify-mode-seg.on[aria-pressed="true"] { color: var(--bg, var(--vscode-editor-background)); background: var(--text, var(--vscode-foreground)); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 6px 16px -8px rgba(15, 23, 42, 0.4); }
#archify-mode-switch .archify-mode-seg:hover:not(.on) { color: var(--text, var(--vscode-foreground)); }
#archify-mode-switch .archify-mode-seg:focus-visible { outline: 2px solid var(--frontend-stroke, var(--vscode-focusBorder)); outline-offset: 1px; }