'View source' everywhere
Apologies if this is the wrong place or the wrong way to propose this. But I've got an Idea (tm), and it seems like GNOME might be a good place to start with it. I'm not a GNOME developer, but I'm an interested user.
We care about software freedom, not just software that costs nothing. That means the user can find out what their software is doing and, if they want, change it. But in practice, it's not easy to find the code that runs when you click something on screen: you have to work out which project it's part of, where the source code for that lives, and then search through that code to find the button you're interested in and the event handler bound to it.
I think this feeds into the struggles a lot of FOSS GUI software faces: lots of people are happy to use it, but there's a big hurdle to get over from using to contributing. So people wind up treating it like proprietary software: if you have a problem, complain to the makers and hope they fix it.
I'm not under any illusion that there's a magic silver bullet for this, but I think we could make that hurdle significantly smaller. This is the idea I'm calling view source everywhere. I'd like every button, every menu item, every application launcher and every keyboard shortcut to expose a way to view the code that gets run when it is invoked. Both in applications and in the desktop itself. It could show a local copy of the code if possible, or pull up a website (like Gitlab) if not.
I'm pretty sure this is technically possible. For Python applications, it's probably not even very hard: we usually have the code around anyway, and functions written in Python store their filename and line number.
It would need:
- UI conventions for how you 'view source' on different elements. Context menu? Alt-click? A session-wide "developer mode" of some kind?
- Standard ways to store and access the information mapping UI elements to files/URLs and line numbers.
- For sandboxed apps (e.g. Flatpaks), some way to launch an editor outside the sandbox and map a file in the sandbox to a path outside it.
- Developer tooling to easily add this to applications.
Why GNOME? I think this needs a certain critical mass to be worth the initial development time and to become widely known to advanced users. GNOME's desktop and applications probably have that critical mass. I also believe that GNOME is forward looking and cares about software freedom.
Eventually, I'd love to see the next step: edit source for any element and install your modified code at the touch of a button. But I imagine that the 'view source' plan is already ambitious enough without trying to figure out 'edit source'.
Thanks for taking the time to read this proposal. :-)