freedomofpress / securedrop-client

a Qt-based GUI for SecureDrop journalists 📰🗞️
GNU Affero General Public License v3.0
40 stars 38 forks source link

Qt Learning Spike: Overlays built-into UI #1372

Open ninavizz opened 2 years ago

ninavizz commented 2 years ago

Problem

Traditionally, "overlays" in client apps are not dialogs—rather, they provide they're modal UIs that provide the visual illusion of sitting atop the regular client chrome, yet they're just high z-axis dealie-os (when the designer tries to get technical—bear with me, heh). QT has z-axis/layering issues... which may be the version of QT we're limited to by PyQT, or is also an issue on the latest version of QT more plausible to work with after updating the packaging wrapper. (I think is how Allie explained it—will just stop and bat my eyelashes and smile and be charming at this point).

Solution

Learning spike to learn how to mimic visual "layering" of UI panels atop other UI objects in QT. Why? When a thing does not need to be moved, and is not desirable to have a Qubes-rendered outline around it (as all menus have, today), it would be preferred to more elegantly be able to mimic overlays as Slack does, below.

Specifically, the on-hover fly-outs for the Journalist Badge, the Logged In User's badge, and the Seen By bubbles invokable in this prototype.

Screen Shot 2021-12-08 at 12 06 30 AM

Menus-2ndrev

eloquence commented 2 years ago

I agree it's worth at least a first timeboxed investigation (in a future sprint) for us all to be able to better understand and reason about the interaction between GUI toolkit, window manager, and OS. This is important as we add more flyouts, custom tooltips, etc

My current understanding is this:

In other words, I think we'll want to find out if there are good ways to render widgets on top of other widgets in a manner that's not technically a separate window -- but we will then also have to make sure that they're not cut off. This could be the kind of problem it could be useful to collaborate with Felgo on, once we've done our own investigation.