8000 Move the Editor surface to colour names, with focus rings by kiran-brahma · Pull Request #79 · kiran-brahma/writing-tool · GitHub
[go: up one dir, main page]

Skip to content

Move the Editor surface to colour names, with focus rings - #79

Merged
kiran-brahma merged 3 commits into
v1.3from
v1.3-59
Sep 26, 2026
Merged

kiran-brahma merged 3 commits into
v1.3from
v1.3-59

Conversation

@kiran-brahma
@kiran-brahma kiran-brahma commented Sep 26, 2026 •
Copy link
Copy Markdown
Owner

Part of #57. Closes #59.

The app shell and header, the Editor and its toolbar, the Callout, the Document menu, the first-run and Scratchpad notes, and the save / storage / import banners now use the colour names from src/index.css. Each palette class maps through the table in that file's header. No token was added or changed. Rebased on the latest v1.3, which includes #78.

The spec's rule is blue pencil for marks, amber for warnings and red for failures. So the save-error and import-error banners take border-failure-rule bg-failure-surface text-failure, and the storage notice stays a warning. text-failure on failure-surface has a contrast of about 5.9:1, computed from the oklch tokens.

Focus rings follow the shared convention (focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus). The storage notice's Dismiss button keeps ring-warning-focus. Ink-filled controls (the current header destination and an active toolbar button) add focus-visible:ring-offset-2.

Acceptance criteria

  • No raw palette colour class remains in the Editor surface. Verified by grep over App.tsx, DocumentMenu.tsx, DocumentEditor.tsx, FindingCallout.tsx and main.tsx.

  • Banners use warning or failure, never mark. Verified:

    • "Could not save your document" and "Could not import that markdown" use the failure names.
    • The storage notice uses warning-surface / warning-rule / warning, and its Dismiss button uses warning-rule-strong / ring-warning-focus.
    • DocumentEditor, DocumentMenu and FindingCallout have no other error text.
    • The full-screen "Obelus could not open your Library" message is a page, not a banner, so it keeps ink.
  • Every button, input and link in the surface shows a visible focus ring from the keyboard. Verified in headless Chromium by tabbing through the surface and taking screenshots. The following controls had no ring before and now have one:

    • the toolbar buttons
    • the notes' action link and Dismiss button
    • Import Markdown in the Document menu, through has-focus-visible: on the label that wraps the hidden file input
    • Export Markdown in the Document menu
    • the title field, whose ring is inset because the field runs edge to edge

    The rings on ink-filled controls are offset and visible against the fill.

  • The surface looks unchanged apart from focus rings (checked by eye at 1440px). Verified against an origin/v1.3 build at 1440×900, at rest and with the Document menu open. A pixel diff finds differences of at most 1–2/255, only on anti-aliased text, from index.css tokens written as hex. The save and import banners now take the failure colours, as the spec requires. They only appear on an error, so they did not show in the screenshots taken at rest.

  • Tests, typecheck and agent gates pass. Verified after the rebase: pnpm test (1021 passed), pnpm typecheck, pnpm run gates and pnpm build.

Noticed, not changed

  • The Document menu is clipped by the header's overflow-x-auto at 1440px, both here and on origin/v1.3. This was already the case before this change and is outside this ticket.
  • The ProseMirror writing surface keeps .obelus-editor:focus { outline: none }.

🤖 Generated with Claude Code

@chatgpt-codex-connector
chatgpt-codex-connector Bot commented Sep 26, 2026 •
Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-09-26T09:54:57.055325Z a6dca18 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

The app shell and header, the Editor and its toolbar, the Callout, the
Document menu, the first-run and Scratchpad notes, and the save, storage
and import banners now use the colour names from index.css instead of
palette classes. The banners take warning rather than amber, so a
failure and a mark no longer share a colour.

Every control in the surface shows a focus ring from the keyboard
(story 209): the toolbar buttons, the notes' action and dismissal, the
Document menu's Import and Export items, and the title field, whose
ring is inset because the field runs edge to edge.

Part of #57. Closes #59.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FjB3Gu8vhg5enkAneTdqga
A ring in the focus colour disappears against an ink fill, so the
current destination in the header and an active toolbar button carry a
ring offset, as the shared convention now says.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FjB3Gu8vhg5enkAneTdqga
< AB17 /div>
A save that failed and an import that failed are failures, not
warnings, so their banners take failure-rule, failure-surface and
failure. The storage notice stays a warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FjB3Gu8vhg5enkAneTdqga
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.

2 participants

0