Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add "Exit Code Editor" toolbar. #10061
This PR intends to fix #9445. It adds a toolbar to the code editor with a label showing what you are doing, as well as an "Exit Code Editor" button that takes you back to the visual editor.
I hope the space between this label and the close button can be used, in the future, to add a slot fill so a plugin could add quicktags here.
The PR also cleans up a few things, removes some redundant rules, refactors the centering stuff. It is tested for all breakpoints. However, it is not yet wired up, and I could use some help here. Essentially the button doesn't do anything yet. @tofumatt or @gziolo can you help me wire this up? Thanks.
Thanks, I don't think a fix is urgent. Would love your help some time next week, thank you.
It's buttony as soon as you hover :D and in that vein it follows the same pattern as the "Close" button on the sidebar.
Adding "Needs Design Feedback" for thoughts on that! Thanks for your help!
Switching back to the visual mode is super slow. We probably should optimize it in a separate PR. From what I see we unmount visual editor when going into code editing mode. In my opinion, we should have visual mode always rendered but hidden with CSS when we switch to the text mode to improve the user experience and accommodate. Another option is to finally add some optimizations to the editor's visual mode to render only those blocks that are visible on the screen. /cc @mtias
Sep 25, 2018
That's an interesting idea. Initially, I thought about making it look like a screen takeover but we don't have this UI piece yet :) Modal seems like a good compromise. There is still a question what about those users which prefer to use Code editor instead as a default mode. It was raised by @jasmussen in our chat on Slack.