Skip to content

Conversation

@mtsgrd
Copy link
Contributor

@mtsgrd mtsgrd commented Nov 26, 2025

  • Fix bug where typing in middle of paragraph lost characters during
    rewrap Replace setTimeout with deterministic waits in HardWrapPlugin
    tests Remove legacy MarkdownTransitionPlugin and simplify initialization
  • Add tests for automatic wrapping on init (enabled/disabled)
  • Fix typos and improve null checking in RichTextEditor

@vercel
Copy link

vercel bot commented Nov 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
gitbutler-web Ready Ready Preview Comment Nov 27, 2025 8:04am

- Replace arbitrary timeouts with deterministic browser idle detection

  in Playwright tests

- Fix line wrapping to use full available width (trim trailing spaces

  from length calculation)

- Simplify rich text editor by removing plaintext mode and markdown

  transition plugin

- Consolidate IndentPlugin to work with paragraph-based structure

  (remove PlainTextIndentPlugin)

- Add comprehensive test utilities for browser idle detection with

  examples and documentation
Fix linewrap tests to expect trimmed newLine values

Tests for the rich text editor's linewrap behavior were failing because expectations assumed trailing spaces would be preserved. Update assertions to expect trimmed newLine values (and document that whitespace-only lines become empty) so the tests reflect the actual trimming behavior implemented in the linewrap logic.
Preserve single newlines when extracting editor text

Fix extra blank lines produced by getTextContent(): instead of using getRoot().getTextContent(), iterate over root children, extract each paragraph's text, and join with single '\n'. This prevents added empty lines between paragraphs and resolves the failing test that was seeing too many newlines.
@mtsgrd
Copy link
Contributor Author

mtsgrd commented Nov 27, 2025

@PavelLaptev fyi - if you could keep your eyes out for any regression related to this pr. It's a pretty substantial simplification to the rich text editor in that it removes the plainText prop.

@mtsgrd mtsgrd enabled auto-merge (rebase) November 27, 2025 08:13
@mtsgrd mtsgrd disabled auto-merge November 27, 2025 08:14
Comment on lines -358 to -369
.editor-scroller {
display: flex;
z-index: 0;
position: relative;
flex-direction: column;
height: 100%;
overflow: auto;
border: 0;
outline: 0;
/* It's unclear why the resizer is on by default on this element. */
resize: none;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@PavelLaptev this looks a bit sus, but also it wasn't being used.

@mtsgrd mtsgrd enabled auto-merge (rebase) November 27, 2025 08:16
@mtsgrd mtsgrd merged commit 1d2569c into master Nov 27, 2025
22 checks passed
@mtsgrd mtsgrd deleted the replace-timeouts-with-deterministic-waits branch November 27, 2025 08:16
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