Repository navigation
feat: Ribbon.OnLeave and Ribbon.Measure - #501
Merged
Merged
Conversation
OnLeave tells the host the keyboard use of the ribbon is over - a command ran from the keyboard, Escape on the tabs with nothing open, the keytips ended - so it can give the keyboard back to the editor. Measure makes the ribbon a natural size for VBox.AddNatural: the width offered, the height it needs now (which shrinks when collapsed), with no host code to resize it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Two seams found while wiring the ribbon into the go-slides playground.
Ribbon.OnLeave func(): called when the keyboard use of the ribbon is over (a command ran from the keyboard, Escape on the tabs with nothing open, keytips ended or toggled off), so the host hands the keyboard back to the editor. A click does not call it.Ribbon.Measure(availW, availH): the ribbon is a natural size forVBox.AddNatural, and followsCollapsed()when the box is laid out again.100% per function; gofmt/vet clean.
🤖 Generated with Claude Code