Skip to content

Show explanatory indicators at active width boundaries #30

Closed

Description

@BinaryOutlook

Stage 3 — Layout and writing preferences

Synopsis

Show subtle paired marks at the active maximum-width boundaries so unused side space has an understandable explanation rather than appearing to be broken layout.

End goal

Users can tell when the maximum document width limits the visual column and can hide the indicators if preferred.

Start after

Start implementation only after every prerequisite is merged into main or has a maintainer-accepted technical freeze recorded in its linked issue. A freeze must identify the exact source/prototype commit and settled contracts; an open draft PR alone is insufficient. For an investigation prerequisite, acceptance must identify the approved design/report revision and prototype commit if one exists.

Fetch current origin/main before branching. If using a freeze, record an integration base containing all required prerequisite changes and link the freeze decisions in the PR. Validate the combined result again after the final prerequisite changes are integrated. The recorded freeze governs any agreed early start while a prerequisite issue remains open.

Agreed scope

  • An inverted triangle is a starting design suggestion, not a mandatory glyph; use a subtle legible pair of marks and include a reviewable visual in the PR.
  • Show the marks only while the maximum-width constraint is active; provide a preference to hide them.
  • Use explanatory text such as 'Maximum document width reached' on hover and keyboard focus. Do not call this content clipping when the document remains intact.
  • Tie the marks to the documented width boundary from the width-setting contract; distinguish the outer constrained box from padded text edges.
  • Treat indicators as editor UI, excluded from document selection, source, copy, and exports.

Acceptance criteria

  • Both marks follow default/custom width and left/center/right alignment accurately across pane and sidebar changes.
  • The marks disappear in full-width mode, below the constraint threshold, and when disabled; they do not jitter at the threshold.
  • The explanation is available without requiring pointer hover alone, and the marks remain understandable in supported themes/zoom.
  • Indicators neither obscure editing controls nor change document content, undo state, or export output.

Verification

  • Provide rendered narrow/wide examples and measured boundary positions for each alignment.
  • Check threshold transitions, pointer and keyboard access to the explanation, and the hide preference in both hosts.
  • Verify serialized Markdown, copied document text, and export preparation exclude the indicators.

Source pointers

  • src/shared/editor-body-html.js
  • src/webview/styles.css
  • src/webview/editor.js
  • src/editorProvider.ts
  • electron/src/settings-manager.ts
  • package.json
  • src/i18n/locales

Delivery contract

Implement the shared editor behavior in both VS Code and Electron. View-only settings/actions must preserve Markdown, selection/editing context, clean state, and undo history. For new or changed settings, keep host wiring, manifest descriptions, all supported translations, and documentation consistent. Preserve existing identifiers and defaults except for the deliberate changes specified above.

Work from the repository root using the Node version in .node-version and the maintained instructions in CONTRIBUTING.md, docs/building.md, and docs/testing/README.md; export changes also follow docs/export-verification.md. Run full compilation after webview JavaScript/CSS, shared-module, or translation changes, plus checks that exercise the changed behavior. Rebuild and reinstall for installed-extension evidence. Report failures/skips honestly; follow required CI and review gates. Update affected documentation and review any committed Markdown in source and rendered form.

Link the PR or investigation to this issue. Keep remediation on the same focused work item where practical. Completion requires the stated evidence and accepted outcome; opening a draft PR does not complete the issue. No deadline or assignee is imposed by this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    accessibilityenhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions