Skip to content

Editable text feature specs#2427

Merged
tf merged 4 commits into
codevise:masterfrom
tf:editable-text-feature-specs
May 22, 2026
Merged

Editable text feature specs#2427
tf merged 4 commits into
codevise:masterfrom
tf:editable-text-feature-specs

Conversation

@tf

@tf tf commented May 22, 2026

Copy link
Copy Markdown
Member

No description provided.

tf added 4 commits May 22, 2026 09:22
Break the monolithic spec into six focused files under
`EditableText/features/` (rendering, typography, placeholder,
commentHighlights, commentBadges, commentSelection), mirroring the
commenting feature spec layout.

Migrate off `renderWithCommenting` and the local DndProvider +
EditorStateProvider wrapper onto `renderEntry` from a new
`support/pageObjects/inlineEditing` module, so tests exercise the real
EntryDecorator instead of a hand-built provider tree. The inline-
editing EntryDecorator gains a `commenting` prop that seeds
ReviewState, parallel to commenting's EntryDecorator.

Hide badge role/styling details behind a `queryAllCommentBadges` page
object so specs assert via `isInDotMode()` / `isActive()` rather than
querying `[role=status]` and checking CSS module classes.
Both EditableText specs that previously used it now go through
renderEntry, exercising the real EntryDecorator provider tree. The
helper's only purpose was to shortcut that tree with a hand-built
provider stack, which had a habit of drifting from production.
Move editor-selection state changes off a test-only SelectionCapture
component (which reached into `useEditorSelection.select`) and onto
production pathways: `newThread` via a `SELECT` postMessage hitting
inline-editing's MessageHandler, and `highlightedThreadId` via clicking
an inline thread badge through a new `select()` method on the badge
page object.
jsdom's Selection implementation is incomplete for slate-react's
usage. Move the workaround stub (which returns undefined so slate
falls back to its internal selection state) from per-suite beforeAll
hooks in seven inline-editing specs into setupFilesAfterEnv, so the
stub is in place by default and slate-using specs no longer need to
remember it.
@tf tf added this to the v17.2 milestone May 22, 2026
@tf tf merged commit 3f41f1d into codevise:master May 22, 2026
18 checks passed
@tf tf deleted the editable-text-feature-specs branch May 22, 2026 07:39
@tf tf added internal and removed review labels May 22, 2026
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.

1 participant