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

Modes docs #3233

Merged
merged 7 commits into from
Sep 4, 2023
Merged

Modes docs #3233

merged 7 commits into from
Sep 4, 2023

Conversation

willmcgugan
Copy link
Collaborator

Adds docs for modes

screen, _ = self._get_screen(_screen())
else:
screen, _ = self._get_screen(self.MODES[mode])
new_screen: Screen | str = _screen() if callable(_screen) else _screen
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Mainly to fix typing.

Copy link
Contributor

@rodrigogiraoserrao rodrigogiraoserrao 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 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 Show resolved Hide resolved
docs/guide/screens.md Outdated Show resolved Hide resolved
Comment on lines 290 to 292
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.
Copy link
Contributor

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.

willmcgugan and others added 3 commits September 4, 2023 17:29
Co-authored-by: Rodrigo Girão Serrão <[email protected]>
Co-authored-by: Rodrigo Girão Serrão <[email protected]>
@willmcgugan willmcgugan merged commit cbed79c into main Sep 4, 2023
18 checks passed
@willmcgugan willmcgugan deleted the modes-docs branch September 4, 2023 16:40
@davep davep mentioned this pull request Sep 7, 2023
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.

2 participants