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

Invent compatibility #3014

Open
mhsmith opened this issue Dec 3, 2024 · 4 comments
Open

Invent compatibility #3014

mhsmith opened this issue Dec 3, 2024 · 4 comments
Labels
enhancement New features, or improvements to existing features.

Comments

@mhsmith
Copy link
Member

mhsmith commented Dec 3, 2024

This is a meta-issue listing the items that would be required for Invent to base itself on Toga, along the lines of this diagram (source):

toga_invent

The following is mostly based on this comparison chart of the two projects' existing APIs.

General concepts:

Flexbox enhancements:

Other wIdget enhancements:

Testing:


New widgets – these would NOT be blockers, as long as the architecture allows them to be supported on Invent only at first:

@mhsmith mhsmith added the enhancement New features, or improvements to existing features. label Dec 3, 2024
@HalfWhitt
Copy link
Contributor

The comparison chart doesn't load for me.
Could you upload and inline your images so they're in the post?

@mhsmith
Copy link
Member Author

mhsmith commented Dec 3, 2024

The comparison chart doesn't load for me.

Sorry, I've fixed the link.

Could you upload and inline your images so they're in the post?

Done.

@HalfWhitt
Copy link
Contributor

Assuming all this works out... would Toga still even need a separate web backend? From that diagram, it looks like as long as the "Toga app components" are also implemented in toga_invent, a fully Toga app could then use that to display in a web browser. At which point it would make more sense to name the shared backend toga_pyscript.

@freakboy3742
Copy link
Member

@HalfWhitt It depends a little on the final form of rendering. Any web-based implementation will likely share a lot of common infrastructure and tooling; but there might be some differences depending on exactly how styles and web components are used.

Toga-web and Invent both use pyscript as a bridge; but when rendering widgets, Invent tries to keep things as close to "pure" HTML + CSS as possible, and uses paperCSS. Toga-web has historically used Bootstrap, and currently uses Shoelace (soon to be renamed "Web awesome") to provide a richer set of widgets. This doesn't matter as much for simple widgets like Button, but might for more complex widgets like "Tree" that doesn't have a "native" HTML widget that can be styled.

So - what is labeled as "toga-invent" in that diagram might end up being;

  • The same "toga-web" we currently have, but with Toga switching to using PaperCSS
  • The normal "toga-web" but with a "paperCSS rendering plugin" provided by Invent, and Toga providing a "shoelace rendering plugin" by default.
  • A new "toga-invent" backend which builds on a base "toga-web" backend that can't be used on its own. "toga-invent" would add paperCSS-based rendering; with Toga would then ship a toga-shoelace backend for shoelace-based rendering (or use shoelace by default in toga-web)

We need to do a little more investigation before it's going to be clear which approach will be most viable.

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

No branches or pull requests

3 participants