Skip to content

feat: global design, Reading Guide, Study Tools & Accessibility settings (v1.3.0) - #15

Open
matthummel-pa wants to merge 9 commits into
cursor/wp-org-differentiation-e680from
cursor/settings-design-ux-e680
Open

matthummel-pa wants to merge 9 commits into
cursor/wp-org-differentiation-e680from
cursor/settings-design-ux-e680

Conversation

@matthummel-pa

Copy link
Copy Markdown
Owner

Summary

Expands the Settings → TOCflow page with four new sections that give site owners global defaults for every auto-inserted block and shortcode — without touching per-block editor overrides.


Design & Appearance

Control CSS custom property Effect
Background colour --tocflow-bg Overrides default translucent background
Text colour --tocflow-color Overrides inherited text colour
Link colour --tocflow-link-color Overrides inherited link colour
Font size --tocflow-font-size e.g. 15px or 0.9rem
Link font weight --tocflow-font-weight 300–800 or blank
Line height --tocflow-line-height unitless e.g. 1.6
Border width / style / colour --tocflow-border-* Full border control
Border radius --tocflow-radius e.g. 8px
Padding --tocflow-padding e.g. 1.25rem

All values are stored as empty strings by default (= use built-in preset styles). Block-editor per-block overrides (Gutenberg's colour/typography/spacing/border supports) always cascade on top.

Preset styles (is-style-minimal etc.) explicitly reset the custom properties so they always win over any global colour setting.


Reading Guide & Study Tools (global defaults)

  • Hover section preview toggle
  • Guide mode master toggle with collapsible sub-options: previews, density bars, per-section read time, progress fade, emoji reactions, academic citations + citation format selector
  • Sub-options panel hides/shows via JS when guide mode is toggled (no page reload)

Study Tools & Export (global defaults)

  • Reading progress bar
  • Resume reading bookmark
  • Reader note pads
  • Export & print toolbar

Accessibility

  • Focus ring style selector: Default (underline), Bold (3 px outline, WCAG 2.1 AA), High-contrast (black outline on #ff0 background, WCAG 2.1 AAA)
  • Applied as data-tocflow-focus attribute on <nav> — no impact on block editor

Technical notes

  • admin/js/admin.js — vanilla JS, no build step; enqueued only on the settings screen; syncs hex text ↔ colour swatch and shows/hides guide sub-options
  • includes/class-tocflow-settings.php — 25 new defaults, sanitize_hex_color(), sanitize_css_length(), sanitize_css_number() private helpers; block_attributes() now forwards all Reading Guide / Study / Export defaults to auto-inserted blocks
  • includes/class-tocflow-headings.phprender_nav() builds design CSS custom properties from global settings and adds data-tocflow-focus attribute
  • src/style.scss — root selectors use var(--tocflow-*) with sensible fallbacks; focus ring variant rulesets placed after has-underlined-links to respect specificity order; is-style-minimal resets design custom props
  • All lint (lint:js, lint:css) passes; npm run build succeeds

Version bumped to 1.3.0.

Open in Web Open in Cursor 

matthummel-pa and others added 9 commits September 8, 2026 12:42
…esume bookmark, section planner)

Squash-merges all study-assistant commits from cursor/wp-org-differentiation-e680.

See PR #12 for full changelog.
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
…unce bookmark writes

- CHANGELOG.md: expanded v1.1.0 with all missing entries (hover preview,
  export/print toolbar, accessibility, page-builder compatibility for
  Elementor/Bricks/Divi/WPBakery/Oxygen/Beaver/Breakdance).
- README.md: added 'What's new' tables for v1.1.0 and v1.2.0 for
  WordPress.org reviewers; added 'Performance' section documenting
  asset loading gates, IntersectionObserver use, no remote calls,
  passive scroll listeners, debounced localStorage, and PHP caching.
- view.js: debounce localStorage bookmark write to 500ms (previously
  wrote on every IntersectionObserver callback during scroll).

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Matt Hummel <matt@matthummel.com>
…dme 1.2.1 entries, tag/indent fixes

- TOCFLOW_VERSION constant: 1.2.0 → 1.2.1 (was desynchronised from plugin header)
- Tested up to: 6.7 → 7.1 (WP 7.1 'Mary Lou' released 2026-08-19; 6.7 would flag review)
- readme.txt: add = 1.2.1 = Changelog + Upgrade Notice (stable tag must have matching entry)
- Tags: replace 'elementor' (third-party trademark) with 'study tools'
- PHP: fix shortcode Study-tool attrs indentation (3-tab vs 4-tab WPCS violation)
- Admin: fix settings.php shortcode-docs paragraph indentation

Co-authored-by: Matt Hummel <matt@matthummel.com>
Co-authored-by: Matt Hummel <matt@matthummel.com>
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2 to 3.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](softprops/action-gh-release@v2...v3)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matt Hummel <matt@matthummel.com>
…ngs (v1.3.0)

- Add Settings → Design & Appearance: bg/text/link colours, font size/weight/
  line-height, border (width/style/colour/radius), padding via CSS custom props
- Add Settings → Reading Guide & Study Tools: global defaults for hover preview,
  guide mode and all sub-options (previews, density, read time, fade, reactions,
  citations + citation format)
- Add Settings → Study Tools & Export: global defaults for progress bar, bookmark,
  reader notes, export toolbar
- Add Settings → Accessibility: focus ring style (default / bold / high-contrast)
  rendered as data-tocflow-focus attr on <nav>
- admin/js/admin.js: colour-picker text ↔ swatch sync, conditional guide sub-opts
- style.scss: CSS custom properties drive border/padding/bg/colour/font-size;
  focus ring variants; is-style-minimal resets custom props so preset wins
- class-tocflow-settings.php: 25 new defaults + sanitize_hex_color / css_length /
  css_number helpers; block_attributes() passes all new defaults to auto-inserts
- class-tocflow-headings.php: render_nav() applies design custom props and
  data-tocflow-focus to <nav> for shortcode / auto-insert paths
- Bump version to 1.3.0

Co-authored-by: Matt Hummel <matt@matthummel.com>
@matthummel-pa
matthummel-pa marked this pull request as ready for review September 8, 2026 18:12
@cursor

cursor Bot commented Sep 8, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_08179981-d159-4b15-92ae-b7ba568a033b)

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a non-blocking comment and did not approve: the Cursor Bugbot check was present but completed as skipped (usage limit; analysis did not finish). Human review is needed; a reviewer was assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

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