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

New backend - Textual #1867

Closed
freakboy3742 opened this issue Apr 14, 2023 · 2 comments · Fixed by #2065
Closed

New backend - Textual #1867

freakboy3742 opened this issue Apr 14, 2023 · 2 comments · Fixed by #2065
Labels
enhancement New features, or improvements to existing features.

Comments

@freakboy3742
Copy link
Member

freakboy3742 commented Apr 14, 2023

What is the problem or limitation you are having?

While graphical APIs like Cocoa and GTK are the default for modern laptops, sometimes a console based interface is useful.

Describe the solution you'd like

We should add a backend based on Textual. This would allow a user to take their Toga app, and deploy it as a console based app.

Describe alternatives you've considered

Curses would also be a possibility for a console backend; however Textual has a much richer widget API, and is known to have integration with Python's asyncio libraries.

Additional context

  • Some APIs will likely be no-ops - for example, fonts and window size changing APIs will likely be impossible.
  • Some widgets won't be possible - Canvas and ImageView are definitely impossible; WebView would be... an interesting challenge.
  • Some sort of scaling factor between pixels and characters will be needed. Assuming an 80x24 console is the same as an 800x600 screen might be a good starting point for this sort of calculation.
  • Changes to Briefcase may be needed to allow for command line apps (see Generating a command-line executable without the GUI features briefcase#556)
@freakboy3742 freakboy3742 added the enhancement New features, or improvements to existing features. label Apr 14, 2023
@brendan-simon-indt
Copy link

Not sure if this is relevant or not, but some apps can start as a GUI or console, typically be passing explicit arguments on the CLI (or inferred from arguments). e.g. a batch mode where files are supplied as arguments. No files specified => GUI displayed to browse for files or some dashboard with action buttons, etc.

@freakboy3742
Copy link
Member Author

@brendan-simon-indt Thanks - but that's really a UX decision for an individual app to make. This ticket is about providing a different option for building that GUI - a text mode "GUI" (something that could be run over a TTY session), rather than a traditional windows/macOS/Linux "GUI".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features, or improvements to existing features.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants