Repository navigation
Type-ahead: Keep ghost text from overlapping the next block - #1008
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1008 +/- ##
==========================================
Coverage 81.50% 81.50%
Complexity 2923 2923
==========================================
Files 122 122
Lines 11653 11653
==========================================
Hits 9498 9498
Misses 2155 2155
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
42c2443 to
ca88bb9
Compare
What, Why, and How?
Type-ahead suggestions at the end of a block are drawn as an overlay, so they never take up space in the layout. When a suggestion wraps onto another line, it sits on top of the next content, and both become hard to read.
This change reserves that space in the block itself. While a suggestion is showing on a non-empty block with the caret at the end, a hidden copy of the same text is placed after the real content so the block grows to fit. The overlay still draws the visible ghost; the hidden copy only holds the height, and it is removed as soon as the suggestion goes away.
Use of AI Tools
AI assistance: Yes
Tool(s): Cursor
Model(s): Grok 4.6
Used for: Code review and solution suggestion.
Testing Instructions
Screencasts
Before
before.mov
After
after.mov
Changelog Entry