-
Notifications
You must be signed in to change notification settings - Fork 780
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
Modes docs #3233
Modes docs #3233
Conversation
screen, _ = self._get_screen(_screen()) | ||
else: | ||
screen, _ = self._get_screen(self.MODES[mode]) | ||
new_screen: Screen | str = _screen() if callable(_screen) else _screen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainly to fix typing.
There was a problem hiding this 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 after a couple of typo fixes.
I left a suggestion on the table but I don't mind either way.
docs/guide/screens.md
Outdated
You can the switch between these screens at any time by calling [`App.switch_mode`][textual.app.App.switch_mode]. | ||
When you switch to a new mode, it becomes the active screen stack and the topmost screen in the new stack becomes visible. | ||
Any calls to [`App.push_screen`][textual.app.App.push_screen] or [`App.pop_screen`][textual.app.App.pop_screen] will affect only the active mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this would go well with the paragraph that starts with “In Textual, we can manage this with modes.”.
As it stands, it feels like we're taking too long to tell the reader what are the methods that matter.
Co-authored-by: Rodrigo Girão Serrão <[email protected]>
Co-authored-by: Rodrigo Girão Serrão <[email protected]>
Adds docs for modes