Skip to content

Claude/UI editor refactor 6421d4 - #96

Open
LBU4SH wants to merge 6 commits into
mainfrom
claude/ui-editor-refactor-6421d4
Open

Claude/UI editor refactor 6421d4#96
LBU4SH wants to merge 6 commits into
mainfrom
claude/ui-editor-refactor-6421d4

Conversation

@LBU4SH

@LBU4SH LBU4SH commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

LBU4SH added 6 commits August 26, 2026 16:59
- fontFamily/fontSize: replace native <select> with a ui-button trigger
  opening a ui-menu popup (size="small"), same pattern as ui-button-split.
  blockFormat stays a native <select>.
- Add indent/outdent tools (native execCommand passthrough, opt-in via
  tools like fontSize).
- Add textColor/highlightColor tools, each opening a new ui-swatch-picker
  popup. Colors are written as ui-editor-color-*/ui-editor-highlight-*
  classes bound to --primitives-* tokens, never inline styles.
- New ui-swatch-picker component (projects/ui-kit/forms/): color grid
  popup derived from primitives tokens, 2D roving-tabindex keyboard nav,
  listbox/option a11y pattern, reused by ui-editor for both pickers.
- Regenerate docs manifest and component-vars (npm run docs:config).

Docs: rewrite the "listes déroulantes" section of ui-editor.mdx to
reflect the select/popup split and updated tool list.
…er chevron, add text alignment

- Fix blockFormat opening blank until the caret had touched the content:
  readBlockFormat() depends on document.queryCommandValue, which reflects
  the live selection only. New readInitialBlockFormat() reads the first
  child's tag once after the initial render instead (falls back to `p`).
- Fix the fontFamily/fontSize trigger chevron sticking to the label instead
  of the field's edge: the width/justify-content rules targeted the
  <ui-button> host (inline by default, ignores min-inline-size), not the
  inner .ui-button element that actually lays out icon+label. Now targets
  it via ::ng-deep and makes the host inline-flex.
- Add alignLeft/alignCenter/alignRight/alignJustify tools: execCommand
  passthrough (justifyLeft/Center/Right/Full), toggle-tracked like
  bold/italic/underline (browser guarantees mutual exclusion via
  queryCommandState), in DEFAULT_EDITOR_TOOLS.
- Finish removing blockFormat (started uncommitted): the tool, EditorBlock,
  EDITOR_BLOCKS, applyBlockFormat/readBlockFormat/readInitialBlockFormat are
  gone. The editor only ever produces <p> now — no H1-H3 from the toolbar.
  BREAKING for any `tools` list still referencing 'blockFormat'.
- Fix the template left broken by that in-progress removal: the select-tool
  branch rendered both ui-menu popups unconditionally, on every select entry,
  with no trigger button at all — fontFamily/fontSize were unreachable.
  Restored one ui-button trigger + the matching single ui-menu per entry.
- Move fontSize into DEFAULT_EDITOR_TOOLS: it was opt-in only to avoid
  duplicating blockFormat on screen, a reason that no longer applies.
- Drop the now-dead native <select> CSS/SCSS variables and the onSelectChange/
  selectValue leftovers that only existed for blockFormat's <select>.
- Update stories/mdx: drop the Headings story (nothing left to demonstrate),
  fold FontMenus into the now-default FontFamily/FontSize stories, rewrite
  the toolbar section to describe two default selectors instead of three.
…learFormat

- Finish switching fontFamily/fontSize from the ui-button+ui-menu popup
  pattern to ui-select (started uncommitted): one <ui-select size="small">
  per select-tool, [ngModel]-bound to the current value, (valueChange)
  applying the font/size command. Drops the now-dead ui-menu/UiMenuItem
  wiring, viewChilds, open-state signals and trigger-label helpers.
- Fix "Effacer le formatage" leaving font/size/color/highlight in place:
  removeFormat only strips native inline formatting, never the editor's own
  <span class="ui-editor-*"> wrappers. New clearFormatMarkers() unwraps them
  across the current selection, run alongside the native command.
- Update stories/mdx/changelog to match (ui-select, not ui-menu popup); drop
  the now-stale blockFormat/chevron Fixed entries superseded by this work.
…lbar

Blend the ui-select boxes into the toolbar surface instead of rendering as
their own bordered form field: --ui-field-stroke-width: 0 (public hook) for
the border, a ::ng-deep override on .ui-field-box for the fill (no public
hook for that — scoped to .ui-editor-select only, no other ui-select in the
kit is affected), plus a hover state matching the rest of the toolbar.
clearFormatMarkers() doesn't reliably clear every marker class yet. Rather
than ship a button that doesn't always do what it says, pull 'clearFormat'
out of DEFAULT_EDITOR_TOOLS for now — the tool itself, its icon/label and
clearFormatMarkers() are untouched, still available via an explicit `tools`.
@LBU4SH
LBU4SH force-pushed the claude/ui-editor-refactor-6421d4 branch from b0db047 to d7e8324 Compare August 26, 2026 15:02
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.

1 participant