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

feat: refactor project #22

Merged
merged 8 commits into from
Nov 15, 2024
Merged

feat: refactor project #22

merged 8 commits into from
Nov 15, 2024

Conversation

Broderick-Westrope
Copy link
Owner

Changing the structure to fit adopt the favoured patterns from another, similar BubbleTea project i recently worked. This mostly involves using views, components and starter packages for specific things, and changing the organisation of content within the tui 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.

@Broderick-Westrope Broderick-Westrope self-assigned this Nov 14, 2024
@Broderick-Westrope Broderick-Westrope merged commit c270928 into main Nov 15, 2024
5 checks passed
@Broderick-Westrope Broderick-Westrope deleted the feature/refactor-project branch November 15, 2024 00:10
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.

1 participant