Creating a New Redux/React Editor

Hey everyone,
I’m in the middle of creating a new Editor for Foreman. I thought about opening a thread because I want to open a debate about changing the current UX. This new editor will also help us get rid of a big Technical Debt(Lots of jquery code :slight_smile:) . I’ll jump right into showing the progress:

Editor Navbar

Current Editor Navbar:

New Editor Navbar:

My Thoughts:

  • Navbar should be a bit smaller
  • Buttons should have a fixed width
  • The button of the current view should be shown as active ( blue )
  • Tabs that change the view should be on the left
  • Functionality and Dropdowns should be on the right

I Know this should be a practical and easy to use application but I wanted to try using icons instead of text, every icon shows a tooltip on hover after a 500ms delay


Diff View

Current Diff View:

New Diff View:

This Diff view is being reviewed in another PR and being used in the Audits page aswell. It shares the Github theme and can be switched from Unified to Split. I’m not sure about the position of the Unified and Split button in this case, any feedback is appreciated.

The previous fullscreen method would change CSS classes to display the editor inside the layout borders. Now clicking on fullscreen opens a modal that covers ~90% of the screen estate. The modal content is based on the current view as shown below:

I guess the most changed element is the Editor Navbar so any feedback on this is appreciated! Will soon link a WIP PR.



adding @ui_ux

I do like the new diff. Perhaps because I’m very used to the Github one :slight_smile:

What’s under Default and Monokai in the new design and what does the Hide content button do? It also feels a bit cluttered.

Thanks for mentioning the dropdowns.

Each of the dropdowns has a header when you open them to describe their purpose

So from left to right → Syntax, Keybinding, Theme

I thought about giving an option for a light theme as addition to Monokai, so i added a theme dropdown aswell.

The hide content icon masks the content ( like a password )
I put all the icons in the screenshot for demonstration, they are never all together in our Editor views:

Provisioning Templates: Revert, Import, Fullscreen
Report Templates: Revert, Fullscreen
Global Parameters: Hide Content, Revert, Fullscreen

The Revert Button is also a concept. It helps you undo all your actions in the current session, not from the original template.

Wow…impressive work so far. Correct me if I’m wrong…the “Default” dropdown changes the keybinding to for example Emacs ?

Imho the theme option (and a little bit the keybindings also) goes a bit too far for the usage of an editor within Foreman. But as I said, that is only my personal flavour.

I agree it goes a bit far and can distract from the main UI elements. I wonder if we could hide these controls in an advanced sub-menu.

How about this

1 Like

I think that looks cleaner and still covers 99% of the use cases when you open an editor.


I agree