Idea | Track mode on a per-tab basis #1458
Replies: 5 comments
-
I've had this idea previously, may have even discussed it at Mu-moot, but I fear it adds too much complexity from both a code and UX perspective Other thoughts:
|
Beta Was this translation helpful? Give feedback.
-
...sorry for the long-ish feedback delay (crazy work weeks as of late!): here are a few more ideas.
Switching tabs could update the "current mode indication" on the status bar.
Whichever current mode is active: if no tabs are open, the mode button would select the mode. Otherwise, a new tab would take the same mode as the current open tab.
I think the example I shared is reasonable: imagine a beginner's workshop where the first programs are Python mode, playing around with the It is not unreasonable for a beginner to have, say, two or three tabs with "different mode" programs... And while it is true that for "checking past code you don't need to be able to run it", the possibility of trying out a few changes and running it is valuable. :-) |
Beta Was this translation helpful? Give feedback.
-
Well that's a given but doesn't tell you what mode other tabs are
Hmm, Still not convinced really And that's a whole lotta extra state to track I know @ntoll has said modes are based on vim's modes but I'm more of a nano person so not sure how that handles multiple tabs |
Beta Was this translation helpful? Give feedback.
-
Oh, of course, I hadn't thought about that... I'm not sure that such indicators would be a fundamental feature, but I do understand your perspective. Maybe the already visible "tab title / filename" is enough? The file/project name should be meaningful to the user, hopefully! :) By comparison (and away from the Mu-world), I know that whenever I'm working on a given project I don't really think about its environment (and dependencies/virtual environment -- which could be thought of as the "Mu mode"): all that's on my mind is that I'm working on project A or B.
...and that is perfectly reasonable.
More state, yes. I'm not sure about the "whole lotta", but certainly more state. :) A possible implementation could handle "per file/tab mode tracking" at load/save time:
Is that a "whole lotta" state? Well, maybe... The only challenge I foresee is a way of somehow pruning the disk-based map which could potentially grow indefinitely. But size-wise, I feel it would be a smallish thing when compared to, say, the logs that Mu produces. :)
I'm a vim user myself, but so old-school that whenever I need a new "vim tab", I spawn a new terminal/shell and vim instance, so I wouldn't know! :) PARTING THOUGHT:
|
Beta Was this translation helpful? Give feedback.
-
I think this is less about tabs, and more about projects. Like @ZanderBrown I think it will be too confusing for beginners to understand that the mode setting is not global. However, I can see the point that when a student loads a project, it might suggest "you're not in the right mode, do you want to change?" I can't find the issue now, but I think it has also be suggested to have some kind of "project"-support in Mu, then it could be that when you load a project og swap between project it made such mode-change suggestions. If we decide not to go for project-support, it could perhaps be implemented by looking through the import statements and suggest to change mode, if it looks incompatible with the current mode (import microbit in Python 3 mode) |
Beta Was this translation helpful? Give feedback.
-
Picking up on an idea I shared in the context of #761 which I'm about to close, I wonder if Mu could "track/remember" its mode on a per-tab basis.
Possible usage:
splatacat.py
.ninjaturtle.py
.splatacat.py
editor tab could automatically switch Mu to PyGame Zero mode.This would make it easier for a beginner to quickly switch tabs and play around with recent projects.
Challenge:
splatacat.py
is a PyGame Zero program and thatninjaturtle.py
is a Python mode program?Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions