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: simple-async template as a alternative for simple ✨ #43

Merged
merged 1 commit into from
Jan 14, 2024

Conversation

kdheepak
Copy link
Contributor

This PR does the following:

  1. Renames existing async template to component
  2. Makes simple support ratatui v0.25.0
  3. Adds a new simple-async uses tokio to implement an async event stream
    • simple-async is identical to simple except that it uses async events

This will make it easier for someone new to Ratatui to dip their toes into async without understanding the nuances of the now component template.

@kdheepak kdheepak force-pushed the simple-async branch 2 times, most recently from cff427f to 9f0e8bc Compare January 14, 2024 10:53
README.md Show resolved Hide resolved
Copy link
Member

@Valentin271 Valentin271 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Though I'm not sold on component name, I don't really understand what does it involve when choosing this template.

simple-async/README.md Show resolved Hide resolved
@kdheepak
Copy link
Contributor Author

Though I'm not sold on component name, I don't really understand what does it involve when choosing this template.

I'm hoping to document why it is called component later. Open to other suggestions too when I improve the docs for it. This template might even go away as we rework the tutorials and build a new template.

@kdheepak kdheepak merged commit 4fd82be into main Jan 14, 2024
3 checks passed
@kdheepak kdheepak deleted the simple-async branch January 14, 2024 11:46
@Valentin271
Copy link
Member

Valentin271 commented Jan 14, 2024

I'm hoping to document why it is called component later. Open to other suggestions too when I improve the docs for it. This template might even go away as we rework the tutorials and build a new template.

To me this seems like a full app template so ... full, app? opinionated was good too.

I'm just putting myself as a user and I don't know what component is supposed to mean, it's fine if it's explained in the doc later though.

@kdheepak
Copy link
Contributor Author

Yeah, opinionated is good too. What do we think about namespaced templates? qmk has keyboard layouts in their folder that have username prefixes. So this can be in the kdheepak/opinionated and I can add another template that's kdheepak/panic-hooks-and-logging etc.

@Valentin271
Copy link
Member

So for our case it could be something like

templates/
├── simple/
└── async/
    ├── simple/
    └── opinionated/

Or are you talking about templates namespaced by user? If so I think this would belong better in each user's repo, potentially with links from here.

@kdheepak
Copy link
Contributor Author

I think cargo generate gets a little weird with this like of nested folder structures. It's also easier to go to this repo and know that top level folder names are all templates you can get with cargo generate ratatui-org/templates $folder_name.

I was talking about the latter and I like linking to user's repos here.

@Valentin271
Copy link
Member

Alright flat folder it it then.

It's also easier to go to this repo and know that top level folder names are all templates

I prefer that too.

We could link to well maintained/interesting templates. Is it a section for this repo or awesome-ratatui though?

@kdheepak
Copy link
Contributor Author

I think awesome-ratatui but could be convinced otherwise :)

@Valentin271
Copy link
Member

Actually we could link the awesome-ratatui template section from here.

Do you know of some templates we could add to initiate the section?

A github search doesn't bring a log https://github.com/search?q=ratatui%20template&type=repositories

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.

Create new template for async and rename current async template to components or opinionated
3 participants