--
You received this message because you are subscribed to the Google Groups "Beeware Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beeware-develop...@googlegroups.com.
To post to this group, send email to beeware-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/beeware-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/beeware-developers/CAJxq84_D0tGUx-yQkL_AYRaAnaGvkYTcGN3bGJBikK_-gwwnEw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Hi Russ,I think this is a great idea. All the problems you outlined for constraint-based layout are spot-on; the second and fourth points are, in my experience, particularly annoying implementing things with Toga. There are multiple times I got stuck in a constraint problem that’s just impossible to debug, and had to nuke everything and start all over again. And since Autolayout in OS X and iOS projects have the same problem, I don’t think there’s anyway to get around it, as long as Cassowary is used. So this seems like a good way out.As for the interface, however, the example below is still pretty verbose to me. I would wish for a more declarative way to specify styling, instead of separate .style calls. I made a Gist to demonstrate what I mean:[*]
Hi Russ,I think this is a great idea. All the problems you outlined for constraint-based layout are spot-on; the second and fourth points are, in my experience, particularly annoying implementing things with Toga. There are multiple times I got stuck in a constraint problem that’s just impossible to debug, and had to nuke everything and start all over again. And since Autolayout in OS X and iOS projects have the same problem, I don’t think there’s anyway to get around it, as long as Cassowary is used. So this seems like a good way out.As for the interface, however, the example below is still pretty verbose to me. I would wish for a more declarative way to specify styling, instead of separate .style calls. I made a Gist to demonstrate what I mean:[*]This is inspired partly by django-crispy-forms’s FormHelper, which I think provides a very nice API for UI layouts in Python code.[*]: I didn’t really implement the API and test the code, so it probably won’t work. But I hope it shows the idea.
Well, this is certainly interesting.
The big thing I see here, and the reason I'm replying is that, if you still care about accessibility, it might prove problematic. The emphasis here is on might.
The specific issue I'm seeing is that label creation and tab order can matter, and this might encourage people to make, say, a bunch of labels. And then move them to the right places with CSS. And then make the controls.
I need to find out how screen readers on Windows associate labels with controls. There's people I can ask, but I believe it's tab order.
I'm not sure what happens for other OSes, but I'm interested in Toga because it holds promise to be an accessible GUI toolkit, something which we kind of don't have (as in blind programmers, the ones who care the most, have to jump through hoops for anything more advanced than the very basics and figure out workarounds for each platform. My friend had to write an abstraction over WX because regular listboxes don't work on mac, for example).
--
You received this message because you are subscribed to the Google Groups "Beeware Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beeware-develop...@googlegroups.com.
To post to this group, send email to beeware-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/beeware-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/beeware-developers/8ace5f51-94e7-4ac8-b941-b450370b72cc%40googlegroups.com.
On Sunday, March 29, 2015 at 4:26:42 AM UTC-4, Tzu-ping Chung wrote:
Hi Russ,I think this is a great idea. All the problems you outlined for constraint-based layout are spot-on; the second and fourth points are, in my experience, particularly annoying implementing things with Toga. There are multiple times I got stuck in a constraint problem that’s just impossible to debug, and had to nuke everything and start all over again. And since Autolayout in OS X and iOS projects have the same problem, I don’t think there’s anyway to get around it, as long as Cassowary is used. So this seems like a good way out.As for the interface, however, the example below is still pretty verbose to me. I would wish for a more declarative way to specify styling, instead of separate .style calls. I made a Gist to demonstrate what I mean:[*]
This is a really verbose way of explaining a particular look and feel. Would it not be easier to make a gui editor?
Yours,Russ Magee %-)
On Sunday, March 29, 2015 at 9:29:11 PM UTC-4, Russell Keith-Magee wrote:On Mon, Mar 30, 2015 at 12:22 AM, Gabriel Csapo <gabe...@gmail.com> wrote:
On Sunday, March 29, 2015 at 4:26:42 AM UTC-4, Tzu-ping Chung wrote:Hi Russ,I think this is a great idea. All the problems you outlined for constraint-based layout are spot-on; the second and fourth points are, in my experience, particularly annoying implementing things with Toga. There are multiple times I got stuck in a constraint problem that’s just impossible to debug, and had to nuke everything and start all over again. And since Autolayout in OS X and iOS projects have the same problem, I don’t think there’s anyway to get around it, as long as Cassowary is used. So this seems like a good way out.As for the interface, however, the example below is still pretty verbose to me. I would wish for a more declarative way to specify styling, instead of separate .style calls. I made a Gist to demonstrate what I mean:[*]This is a really verbose way of explaining a particular look and feel. Would it not be easier to make a gui editor?... it's easier to build a *GUI editor*? Ok... you first :-)Seriously - as I said in my earlier response to Tzu-ping, there's a lot in his syntax that is superfluous; it can be simplified quite a bit. The real question is whether a DSL-like language for GUI layout is desirable; that question is mostly orthogonal to the CSS layout questionI was being a little sarcastic. I think the problem with layout is not the syntax it is the way some people visualize that syntax. Without having a visual aid, it is hard to understand a constrained layout and sometimes it is a pedantic process trying to get a certain layout, but for the most part, building forms and or simple layouts is perfectly understandable with a constrained layout. Also constrained layouts are not just an cocoa realization, they exist in all realms of ui. Even android doesn't know how to fix this and they use xml....
The GUI editor solves a lot of headache for people because it takes the guess work out. I for one don't think that changing the syntax for layout elements will help solve the bigger issue of visualizing that desired look.
I am not discounting the fact that this is a large issue, but would you consider delaying this implementation till all toga gui libraries have enough features to facilitate the need for a new layout strategy?I can devote a lot of my time to helping with the gtk and osx libraries, but implementing this will cause a set back in progress and debugging issues that might set this back a couple of months.
Again, I really like the idea of this and the reason I want to contribute to toga is because it makes building native applications a understandable and non-comprehensive process, but really would like to see all the widgets having events and implementation documentation before a new layout strategy is considered.
To view this discussion on the web visit https://groups.google.com/d/msgid/beeware-developers/CAJxq84-zCBpmeBUT6T1aRz3pH5fr1WdVLsuJP6FCdCLZ55pRwQ%40mail.gmail.com.
I got information for windows specifically directly from james Teh, one of the developers on NVDA. This looks like it's not a problem on that platform: he says that there's a way to annotate textboxes and such with MSAA without having to do a full implementation and that it's only 10 lines or so in C/C++. I should be able to work out this code fairly quickly, should it be necessary.
According to him, however, it's creation order that matters. I can't find official docs on this because screen reader development is the darkest black magic you can imagine, but he is telling me that the default implementation of MSAA labels textboxes automatically if a static text is created just before them. The beauty of constraint-based layout dsls is that you often call constructors, and you often call constructors for labels immediately before the things they label. I think this entire issue can be simply worked around by providing a labelled textbox of some sort and, in addition, that's a pretty common thing to use anyway.
On Mac, the accessibility hierarchy is exposed directly with no intermediate interpretation. This is why most blind people dislike it so much, but it also means that this question has less importance there. From my time on the platform, I am almost certain that Voiceover actually sorts controls left to right, top to bottom, but I'd need to actually do nontrivial experiments to determine if this statement is true.
So I think accessibility is probably a nonissue in regard to this topic, especially if someone writes a best practices guide. But you're overestimating my expertise: I don't have a huge deal of first-hand experience save that I'm a pretty competent programmer who happens to be blind and, in that situation, you can't help but dig into it some at some point.
As for my personal preference, though: I love Cassowary. Finding a GUI library that would give me constraint-based layout in a way which is not painful and tied to the pixel made me very happy. This is primarily because of my visual impairment, consequently giving me zero motivation to actually learn CSS and what we can call a rather unique perspective on the issue. But I am a minority. Would it be possible to have constraint-based layout on top of CSS at some point?
And does CSS solve the problem of everything from a 5-inch to a 50-inch screen better than Cassowary? Because given the platforms Toga aims to support, I think that might be the real problem and that encouraging people to go for a specific look on one device will not help.
--
You received this message because you are subscribed to the Google Groups "Beeware Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beeware-develop...@googlegroups.com.
To post to this group, send email to beeware-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/beeware-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/beeware-developers/CAJxq849WfQbUrDj76pBucndLwzMsjOuKAJdApTsuooF2qZt__A%40mail.gmail.com.
To clarify on the MSAA point: the default is based on the order in which the handles are created, as far as I understand. But with annotation we can change it to whatever we want, whenever we want. If textboxes incorporate their labels in some manner, then the windows textbox need only annotate accessible name to something appropriate, probably the label text. The important thing is that Toga know what the label is.
I have a tendency to be wordy and to provide way more information than is required, so I'm not surprised this was unclear.