-
-
Notifications
You must be signed in to change notification settings - Fork 332
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
chore: remove usage of prelude #1390
Conversation
This helps make the doc examples more explicit about what is being used. It will also makes it a bit easier to do future refactoring of Ratatui, into several crates, as the ambiguity of where types are coming from will be reduced.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1390 /- ##
=====================================
Coverage 93.5% 93.5%
=====================================
Files 67 67
Lines 15897 15897
=====================================
Hits 14871 14871
Misses 1026 1026 ☔ View full report in Codecov by Sentry. |
Does it remove the prelude or the usages? I am preparing a presentation/workshop and I kinda depend on it - and I was thinking of making improvements. |
Just the usages - the prelude is still there and still documented as being available. This just makes the internal code not use it and the doc comment examples also not use it. Context: in #1389 I found that having the prelude scattered around made it a bit difficult to properly refactor towards modules without adding another prelude in ratatui-core, and then there being confusion over where the types came from. Documented in #1388 |
This removes almost every reference to prelude, so the only way to know about it is to get it suggested by your LSP I guess. It is in the crate docs - but I'm still wondering if we should mention it explicitly somewhere. |
fair |
This helps make the doc examples more explicit about what is being used. It will also makes it a bit easier to do future refactoring of Ratatui, into several crates, as the ambiguity of where types are coming from will be reduced. Additionally, several doc examples have been simplified to use Stylize, and necessary imports are no longer hidden. This doesn't remove the prelude. Only the internal usages.
This helps make the doc examples more explicit about what is being used.
It will also makes it a bit easier to do future refactoring of Ratatui,
into several crates, as the ambiguity of where types are coming from
will be reduced.
Additionally, several doc examples have been simplified to use Stylize, and
necessary imports are no longer hidden.