Skip to content
This repository has been archived by the owner on Jun 7, 2018. It is now read-only.

High-level Toga API #4

Open
proofit404 opened this issue Feb 23, 2017 · 5 comments
Open

High-level Toga API #4

proofit404 opened this issue Feb 23, 2017 · 5 comments

Comments

@proofit404
Copy link

Hello.

Thank you for this repository. I think it address very important issue for toga. Right now writing toga applications looks like manual build widgets hierarchy with inline css.

It is important to have such low level interface for tricky UIs, but in general programming API should be more declarative.

As preparation step for my PyCon Belarus talk I wrote declarative widgets tree formed in the jade/pug template. It is possible to move css properties into separate file and then apply those rules to the tree before widgets generation.

Also there are pyxl library hack running inside browser with Batavia.

https://github.com/proofit404/proofit404.github.io/tree/master/talks/the-right-bees

I think we can develop new layer of high level API for toga. Personally I want to see something component based for UI and probably kind of redux port as another little project for state management.

Also I think this projects should be part of the pybee organization to gain more popularity.

Let's discuss our thoughts in this issue first.

cc @freakboy3742

@notpushkin
Copy link
Owner

Thanks for bringing this up, Artem! I agree that a real high-level API for Toga would be awesome. Also, I think that sticking to React design and ideology (while probably simplifying some things occasionally) would be great as well so that those who come from the frontend webdev world would already know how to deal with it.

On pyxl: would be awesome to use it, but it seems like it's eared towards classic HTML more for now. We can always fork it and adapt for our needs, though.

On Redux: there are already some implementations like Pydux by @usrlocalben or aioredux by @ariddell, we might use these (if they'll work with Toga, that is; I haven't tested yet).

@notpushkin
Copy link
Owner

@proofit404 And by the way, any chance to see your talk's recording? Haven't found it on PyCon's website.

@proofit404
Copy link
Author

Here is the video of my talk (in Russian): https://www.youtube.com/shared?ci=KB0DqG_oOa4

@notpushkin
Copy link
Owner

So OK, the primary problem I've faced is that there's no way to dynamically remove a child element (beeware/toga#30) which is pretty crucial for React-ish behavior.

@notpushkin
Copy link
Owner

In the time being, we could try develop against Qt or something like that. I really like the idea behind Toga, but the implementation is a bit too alpha-quality for now :(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants