From ebc1b86a8f4e220100f03bc718d5935197f118ec Mon Sep 17 00:00:00 2001 From: Shreyan C Date: Sun, 4 Oct 2026 10:00:12 +0530 Subject: [PATCH 1/2] feat(header): the logo credits its author and opens About Hovering or focusing the logo shows "by Shreyan Chaubey" under the wordmark, a miniature of the About dialog's own header, and clicking it opens About. The byline hangs out of flow and only transforms and opacity move, so the tab strip beside the logo never shifts. The reveal waits 60ms so a passing pointer does not flicker it, hover is gated on (hover: hover) so a tap on a touch screen goes straight to About, and reduced motion keeps the fade without the movement. The byline and About's credit share .logo-author, now in the sans face. The rest makes the app describe itself one way everywhere: - About's blurb, the README tagline, the package description and the page's new meta description are one line: "An IDE for designing, simulating and analysing automata and formal languages." - The package author is "Shreyan Chaubey", and build.copyright states the LICENSE's notice, so the installers stop saying "Shreyan C". - On macOS the app menu's About opens the app's dialog, as the Help menu's already did, rather than Electron's stock panel. tests/markup.test.js pins the logo to openAboutModal and the byline, the About credit and the aria label to one name. --- README.md | 2 +- css/layout.css | 94 +++++++++++++++++++++++++++++++++++++++++--- css/mobile.css | 6 ++- electron/main.cjs | 4 +- index.html | 19 ++++++--- package.json | 5 ++- tests/markup.test.js | 19 +++++++++ 7 files changed, 133 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index e9d4daf..2b06617 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # AutomataStudio -**An IDE for designing, simulating and analysing automata.** +**An IDE for designing, simulating and analysing automata and formal languages.** Draw a machine, run it step by step, derive its language, put it through the textbook constructions, and take it out as a diagram, LaTeX or working code. It covers 30 diff --git a/css/layout.css b/css/layout.css index a920d12..8f0a78b 100644 --- a/css/layout.css +++ b/css/layout.css @@ -199,12 +199,29 @@ body:has(.rpanel.is-empty) .hdr-right { centre. Centring both puts the mark's middle within 0.5px of the wordmark's cap-height middle, which is the alignment the eye actually reads. */ .logo-wrapper { + /* A button only so it is focusable and opens About; it must not look like + one. `font` comes first because the shorthand resets line-height, and + the stack below is measured at line-height 1. The padding gives the + focus ring room around the revealed byline, and the negative margin hands + the width back so the lockup sits exactly where the bare div used to. */ + font: inherit; display: inline-flex; align-items: center; gap: 6px; line-height: 1; - cursor: default; user-select: none; + padding: 6px 8px; + margin: 0 -8px; + border: 0; + border-radius: 8px; + background: none; + color: inherit; + cursor: pointer; +} + +.logo-wrapper:focus-visible { + outline: 2px solid var(--accent); + outline-offset: 0; } /* The in index.html pulls in #logo-mark, whose strokes are `currentColor` @@ -229,7 +246,7 @@ body:has(.rpanel.is-empty) .hdr-right { /* margin: 0 because the About dialog's copy of this lockup is the

that names the dialog — it has no .modal-title to carry that job — and a UA heading margin there would push the byline off the wordmark. The header's - copy is a div and never had one to reset. */ + copy is a span and never had one to reset. */ .logo { font-family: var(--sans); font-size: 1.15rem; @@ -247,14 +264,81 @@ body:has(.rpanel.is-empty) .hdr-right { } .logo-author { - font-family: var(--mono); - font-size: 0.6rem; + font-family: var(--sans); + font-size: 0.68rem; + font-weight: 500; color: var(--text3); white-space: nowrap; - letter-spacing: 0.04em; + letter-spacing: 0.01em; padding-left: 2px; } +/* ─── The byline reveal ─── + Hover or focus turns the lockup into the About dialog's header: wordmark + over byline. Only transforms and opacity move, so nothing reflows — the + byline hangs below the wordmark out of flow, adding no width or height, and + the whole stack lifts 6px so the pair centres on the mark the way the + single wordmark did. 6px is half of the byline's 2px gap plus its 0.68rem + line, rounded. + + The enter waits 60ms and the leave does not: a pointer sweeping across the + header (or towards the window controls in the desktop app) should not + flicker the name on its way past. Hover is gated on `(hover: hover)` + because a touch browser keeps :hover stuck on after a tap, which would + leave the byline showing behind the About dialog it just opened. */ +.logo-stack { + position: relative; + display: flex; + flex-direction: column; + transition: transform .18s cubic-bezier(.2, .7, .2, 1); +} + +.logo-byline { + position: absolute; + left: 0; + top: calc(100% + 2px); + padding-left: 0; + opacity: 0; + transform: translateY(3px); + transition: opacity .14s ease-out, transform .18s cubic-bezier(.2, .7, .2, 1); + pointer-events: none; +} + +.logo-wrapper:focus-visible .logo-stack { + transform: translateY(-6px); +} + +.logo-wrapper:focus-visible .logo-byline { + opacity: 1; + transform: none; +} + +@media (hover: hover) { + .logo-wrapper:hover .logo-stack { + transform: translateY(-6px); + transition-delay: 60ms; + } + + .logo-wrapper:hover .logo-byline { + opacity: 1; + transform: none; + transition-delay: 60ms; + } +} + +/* Reduced motion keeps the fade and drops the movement: the stack still has + to make room, so it jumps there instead of travelling. */ +@media (prefers-reduced-motion: reduce) { + .logo-stack { + transition: none; + } + + .logo-byline { + transform: none; + transition: opacity .14s ease-out; + } +} + /* ─── HEADER MENU (More, and the Explore group inside it) ─── Anchored to its trigger rather than the viewport, so it overrides the position:fixed that .ctx uses for cursor-placed context menus. The .ctx- diff --git a/css/mobile.css b/css/mobile.css index 35bf8c8..6a2735b 100644 --- a/css/mobile.css +++ b/css/mobile.css @@ -1475,9 +1475,11 @@ /* Below this the wordmark is 100px of a 390px header spent saying something the mark already says. The mark stays — it is the logo, and an app with no - mark anywhere reads as a page that failed to finish loading. */ + mark anywhere reads as a page that failed to finish loading. The byline + goes with it, since it hangs off the wordmark; the mark alone still opens + About, where the credit is. */ @media (max-width: 520px) { - .hdr-left .logo { + .hdr-left .logo-stack { display: none; } diff --git a/electron/main.cjs b/electron/main.cjs index d5982bc..904cd72 100644 --- a/electron/main.cjs +++ b/electron/main.cjs @@ -670,7 +670,9 @@ function buildMenu() { ...(isMac ? [{ label: app.name, submenu: [ - { role: 'about' }, + // The app's own About, not Electron's stock panel: the Help menu opens + // this one too, and the stock panel has no author, licence or blurb. + { label: 'About AutomataStudio', click: () => sendMenuAction('about') }, { type: 'separator' }, { label: "Install 'automata' Command in PATH", click: () => installCliCommand() }, { label: "Uninstall 'automata' Command from PATH", click: () => uninstallCliCommand() }, diff --git a/index.html b/index.html index c6015b6..14ccd35 100644 --- a/index.html +++ b/index.html @@ -20,6 +20,7 @@ gtag('config', 'G-R1LKJ6JFEF'); AutomataStudio +
-
+ +
+ +
@@ -2427,8 +2437,7 @@
Shreyan Chaubey
- +