Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(v2) consistency and best practices #656

Merged
merged 10 commits into from
Oct 31, 2024
Merged

(v2) consistency and best practices #656

merged 10 commits into from
Oct 31, 2024

Conversation

meowgorithm
Copy link
Member

This is a set of breaking changes to enforce consistency and best practices in Bubbles v2.

The two big package-wide ones are:

  1. All bubbles now use getters and setters for width and height. This will prevent us from having to make breaking changes in the future when changing size needs to affect other parameters.
// Before
type Model struct {
    Height int
}

// After
func (m Model) Height() int
func (m *Model) SetHeight(int)
  1. Default keymaps are no longer global. This guards against the default keycap being altered on the package level.
// Before
var DefaultKeyMap = KeyMap{/* ... */}

// After
func DefaultKeyMap() KeyMap

There are also a series of small package-level adjustments which we'll outline in the release notes.

@meowgorithm meowgorithm merged commit 591dfd5 into v2-exp Oct 31, 2024
18 checks passed
@meowgorithm meowgorithm deleted the v2-tidy-again branch October 31, 2024 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants