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

JSON Tutorial missing centered_rect function definition #454

Closed
oboyte opened this issue Feb 17, 2024 · 2 comments · Fixed by #470
Closed

JSON Tutorial missing centered_rect function definition #454

oboyte opened this issue Feb 17, 2024 · 2 comments · Fixed by #470
Labels
bug Something isn't working

Comments

@oboyte
Copy link

oboyte commented Feb 17, 2024

Description

JSON Tutorial missing the centered_rect function definition, which is important for you to progress further through the tutorial.

Screenshots

image

Additional context

Although not crucial, some sections earlier on in the tutorial do lack some information which would be nice to have, like lacking some use declarations, whilst the code examples expect you to have.
One example is when you create a new terminal variable in Main.rs section let mut terminal = Terminal::new(backend)?;. However the page never imports ratatui::terminal::Terminal into scope. (Its inside ratatui::prelude, so I assume that was accidentally removed at some point)

@oboyte oboyte added the bug Something isn't working label Feb 17, 2024
@Valentin271
Copy link
Member

You can find a centered_rect function here in ratatui or here in the json app source code.

Moving this to the website. cc @kdheepak

@Valentin271 Valentin271 transferred this issue from ratatui/ratatui Feb 18, 2024
@kdheepak
Copy link
Contributor

Thanks for opening the issue @thomas0305!

w.r.t.:

Although not crucial, some sections earlier on in the tutorial do lack some information which would be nice to have, like lacking some use declarations, whilst the code examples expect you to have.
One example is when you create a new terminal variable in Main.rs section let mut terminal = Terminal::new(backend)?;. However the page never imports ratatui::terminal::Terminal into scope. (Its inside ratatui::prelude, so I assume that was accidentally removed at some point)

I'm hoping to work through all the tutorials with a completely fresh state and ensure no information is missing. But that'll probably happen after the crates-tui tutorial is merged (#440).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants