Skip to content

Commit

Permalink
chore: fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
HashMapsData2Value committed Oct 22, 2024
1 parent 1d2b2e4 commit 83fbb89
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
21 changes: 13 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,25 @@ A guide on how to contribute to this project.
# Getting Started

Clone the project

```bash
git clone [email protected]:algorandfoundation/hack-tui.git
```

Change to the directory

```bash
cd hack-tui
```

Build the project

```bash
make build
```

Running a Participation Node

```bash
docker compose up
```
Expand Down Expand Up @@ -47,7 +51,7 @@ Launch the TUI
```

There are three top level modules (**cmd**, **internal**, **ui**) which align with the GoLang/Charm ecosystem.
There is an additional code-generated module called **api** which should not be edited by hand.
There is an additional code-generated module called **api** which should not be edited by hand.
See [generating rpc package](#generating-rpc-package) for more information

All submodules and endpoints **SHOULD** align with the command/ui namespaces.
Expand All @@ -59,6 +63,7 @@ hacktui status
```

Example Structure

```bash
├── cmd/status.go
├── internal/status.go
Expand All @@ -68,6 +73,7 @@ Example Structure
All submodules **SHOULD** abstract when appropriate to a submodule.

Example Refactor

```bash
├── cmd/status/root.go
├── internal/status/model.go
Expand All @@ -92,8 +98,8 @@ Effectively this package is the "controller" in MVC
### 🪨 internal

Common library code which includes the models and business logic
of the application.
It's main responsibility is constructing the state used in the TUI.
of the application.
Its main responsibility is constructing the state used in the TUI.
This package is considered the "Model" in MVC

- **SHOULD** be used to hold models.
Expand All @@ -102,9 +108,9 @@ This package is considered the "Model" in MVC

### 💄 ui

Elements to be presented to the user.
Elements to be presented to the user.
This is built on the `bubbletea` abstraction.
This package is the ViewModel and View in MVC.
This package is the ViewModel and View in MVC.

- **SHOULD** be used to build bubbletea interfaces.
- **SHOULD** be named by the component it represents.
Expand All @@ -113,10 +119,9 @@ This package is the ViewModel and View in MVC.
- **SHOULD** contain ViewModel state like "IsVisible"
- **SHOULD NOT** contain any model or CLI specific code (ViewModels/tea.Models should be composed of internal Models for testability).


# Generating RPC package

The `api` package is generated via [oapi-codegen](https://github.com/oapi-codegen/oapi-codegen).
The `api` package is generated via [oapi-codegen](https://github.com/oapi-codegen/oapi-codegen).
Its configuration is found under `generate.yaml` and can be run with the following make command:

```bash
Expand All @@ -127,4 +132,4 @@ The full command for reference

```bash
oapi-codegen -config generate.yaml https://raw.githubusercontent.com/algorand/go-algorand/v3.26.0-stable/daemon/algod/api/algod.oas3.yml
```
```
2 changes: 1 addition & 1 deletion internal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

The internal library holds the state machine and interfaces for the TUI. It largely is a wrapper around the
generated RPC client found in the api package. It supports gathering metrics from multiple sources, mainly
algod RPC and it's associated node.log file.
algod RPC and its associated node.log file.
2 changes: 1 addition & 1 deletion ui/pages/accounts/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func New(state *internal.StateModel) ViewModel {
Width: 0,
Height: 0,
Data: state.Accounts,
controls: controls.New(" (g)enerate | " + green.Render("(a)ccunts") + " | (k)eys | (t)xn "),
controls: controls.New(" (g)enerate | " + green.Render("(a)ccounts") + " | (k)eys | (t)xn "),
}

m.table = table.New(
Expand Down

0 comments on commit 83fbb89

Please sign in to comment.