Skip to content

feat(toolbar): add font family combobox#3692

Open
caio-pizzol wants to merge 14 commits into
mainfrom
caio-pizzol/font-family-combobox
Open

feat(toolbar): add font family combobox#3692
caio-pizzol wants to merge 14 commits into
mainfrom
caio-pizzol/font-family-combobox

Conversation

@caio-pizzol

@caio-pizzol caio-pizzol commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Adds an editable font family combobox to the built-in toolbar so users can type a font name, accept autocomplete with Tab or Enter, and move through the flow from font family to font size back into the editor.

Also fixes the editor input path used after toolbar-preserved selections. When typing over a visually preserved selection, SuperDoc now uses the preserved selection once, keeps ProseMirror native inline mark inheritance, and clears the preserved selection so replacement text keeps the chosen font and size without materializing style-derived marks.

Custom UI support is updated too: font-size picker options are now available through ui.fonts.getSizeOptions(), state.fonts.sizeOptions, and useSuperDocFontSizeOptions(). Docs and the configurable-toolbar example show the recommended path: use command state for current values, ui.toolbar.execute(...) for interactive toolbar mutations, and editor.doc.format.apply(...) for explicit target edits.

Commit structure:

  • feat(toolbar): add font family combobox
  • fix(editor): preserve formatting when typing over toolbar selection
  • feat(ui): expose font size options

Review:

  • Combobox replaces only font family. Other toolbar dropdowns stay on the shared dropdown.
  • Editor fix is split into its own commit and only touches editable.js plus tests.
  • Font-size options reuse the headless toolbar defaults. There is no third hand-maintained size list.
  • Local unit tests were not run per repo rule. CI should run the new unit and behavior specs.

Verified:

  • pnpm check:types
  • pnpm check:public:superdoc
  • pnpm --prefix apps/docs run check:imports
  • pnpm --prefix apps/docs run test:examples
  • pnpm --filter @superdoc-examples/custom-ui-configurable-toolbar build
  • git diff --check
  • node --check for the edited editor files
  • Browser repro for font family to font size to editor typing flow
  • Browser regression check for style-only replacement not gaining direct textStyle marks

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Agent docs audit

Found deterministic findings on 2 changed agent-doc item(s).

apps/docs/AGENTS.md (211 lines)

  • over nested-warn (211 > 200)
  • 5 broken path ref(s)
  • 3 unresolved command(s)

Broken path refs:

  • icon="/path/to/icon.svg"
  • packages/superdoc/src/core/SuperDoc.js
  • packages/superdoc/src/core/types/index.js
  • superdoc/ui
  • superdoc/ui/react

Unresolved pnpm commands (advisory):

  • pnpm check:icons
  • pnpm check:imports
  • pnpm test:examples

tests/behavior/AGENTS.md (267 lines)

  • over nested-warn (267 > 200)

Deterministic L1 only: no AI, no Bash, no secrets. Semantic L2/L3 audit runs weekly on main. Policy: agent-docs-policy.md.

@caio-pizzol caio-pizzol marked this pull request as ready for review June 9, 2026 19:26
@caio-pizzol caio-pizzol requested a review from a team as a code owner June 9, 2026 19:26

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6e52e9bc60

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@linear-code

linear-code Bot commented Jun 9, 2026

Copy link
Copy Markdown

SD-3411

SD-3410

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants