Make a text container's width in columns the line width of its snippet - #107
Merged
Conversation
The DAX formatter wraps at 65 characters; a new container showed 58, so formatted DAX wrapped on screen at once. A new container is now 65 columns wide, measured in the code font, and F6 wraps DAX to the columns the container shows, which are invariant under display-mode scaling. SQL and KQL break by structure and ignore the width. Shift while dragging a text container's handle changes its width in columns and reflows the text, keeping the size; the handle shows the count while dragging. A plain drag keeps scaling the container like a picture, which is what a presenter needs and what every other container does. Decision 29 records why scaling was kept. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Dragging the right edge changes the width in columns and reflows, with the horizontal resize cursor on hover, which is what makes it discoverable; Shift on the corner still does the same, and a plain drag of the corner still scales. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Collaborator
Author
|
Added: the right edge of a text container is now a width handle too. Hovering it shows the horizontal resize cursor, and dragging it changes the columns and reflows, the same as Shift on the corner. The corner without Shift still scales. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The DAX formatter wraps at 65 characters, but a new text container showed about 58, so formatted DAX wrapped on screen at once. And there was no way to give one snippet longer lines short of entering edit mode, dragging, formatting, and committing. Only DAX has a width to configure; SQL and KQL break lines by structure. So instead of a width setting, the container's own width becomes the line width. Decision 29 has the reasoning, including why display-mode scaling was kept.
What changes
columnsargument; SQL and KQL ignore it.Verified
Build clean; smoke tests cover the formatter honouring a given width. A harness against the real font metrics confirms the default width is 65 columns, a 65-character line does not wrap, scaling leaves the count unchanged, and the count clamps to 40 to 200. The Shift-drag gesture itself was reviewed but not driven by a test, since it is a pointer gesture on the canvas.
Not to be merged yet.
🤖 Generated with Claude Code