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.
Changing the structure to fit adopt the favoured patterns from another, similar BubbleTea project i recently worked. This mostly involves using
views
,components
andstarter
packages for specific things, and changing the organisation of content within thetui
package.starter
: This contains only the starter model, which serves as the root of the Bubble Tea model tree. It is responsible for switching between "views".views
: These are the highest-level child models in the Bubble Tea model tree which actually display meaningful conent. Logically, these models often have a one-to-one relationship with screens in the program.components
: These are child models used within the views / view models. They can be reused across different views, but often they are still too view-specific for that. Generic components are normally official "bubbles" (in the bubbles repo) but would be stored here if I needed to invent my own bubble (domain-agnostic component) for this project.tui
: Assorted things for the TUI. Examples include errors, constants, utility functions, shared types, and BubbleTea commands and messages. Although anything can be stored here, I have an opinionated approach to how it should be organised.