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(showcase): showcase tabs widget #391

Merged
merged 3 commits into from
Mar 3, 2024
Merged

Conversation

bulkan
Copy link
Contributor

@bulkan bulkan commented Jan 23, 2024

Relates to #249

@bulkan bulkan force-pushed the feat/tabs-showcase branch from 8b69e46 to 4cd76f1 Compare January 23, 2024 11:59
@Valentin271
Copy link
Member

Thanks for this. A couple of things:

  • You'll need to upload the gif and png using git lfs (forgot to check that in your other PR). Once installed, the files should show up as modified and it should be as simple as committing them again.

  • I like the way you styled the tabs, I'm not sure the border is useful though.
    I feel it is somewhat unclear for a new user what this represents exactly. I don't really know how to improve it, maybe a similar presentation to https://ratatui.rs/showcase/widgets/#barchart?
    I need to think about it. Maybe another reviewer could help.

@bulkan bulkan force-pushed the feat/tabs-showcase branch from c401cfb to 4cd76f1 Compare January 23, 2024 23:41
@joshka
Copy link
Member

joshka commented Jan 24, 2024

+1 to the dropping the border.

Perhaps give a couple of examples. I like the format (TODO,... DONE) you've chosen as the first choice. Let's add a second one like new tabs example (though with just the tabs, not the body and remove the dividers / padding) ratatui/ratatui#855

This one makes some sense to animate (slowly - use 1s per tab.). For that, make sure to add a "Hide" line to the beginning of the tape (before cargo run) and then sleep 2s after the run before "Show". Also sleep 2s at the start of the tape. Don't worry about making the code have to wrap the tabs around, the tape will automatically loop back to the first item.

@bulkan
Copy link
Contributor Author

bulkan commented Jan 24, 2024

@Valentin271 My bad I didn't realise git lfs was being used. I've installed it now but the tabs.gif or tabs.png aren't showing as modified. Do I need to explicitly add them via git lfs track ?

Thank you both for the feedback on improving the showcase. I will work on animating and adding a second example.

@Valentin271
Copy link
Member

No problem at all, that's on our end, its currently poorly documented. As you can see I've just introduced a check for that.

Did you git lfs install? If so you can try git lfs track, I'm no specialist in git lfs, maybe @joshka can help a bit more.

@bulkan
Copy link
Contributor Author

bulkan commented Jan 24, 2024

I ran git lfs track for each file and it looks like the new github check is passing 🎉

@Valentin271
Copy link
Member

Yeah all good!

@joshka joshka merged commit c6324cf into ratatui:main Mar 3, 2024
6 of 7 checks passed
@joshka joshka mentioned this pull request Jun 4, 2024
joshka pushed a commit that referenced this pull request Jun 4, 2024
* chore(Cargo.toml): change "time" to "dep:time"

* docs(lib): document optional and default features
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