4.8 KiB
author | created on | last updated | issue id |
---|---|---|---|
Kayla Cinnamon @cinnamon-msft | 2020-06-29 | 2020-08-10 |
Settings UI Implementation
Abstract
This spec describes the basic functionality of the settings UI, including disabling it, the navigation items, launch methods, and editing of settings. The specific layout of each page will defined in later design reviews.
Inspiration
We have been wanting a settings UI since the dawn of Terminal time, so we need to define how it will interact with the application and how users should expect to interact with it.
Solution Design
The settings UI will be the default experience. We will provide users an option to skip the settings UI and edit the raw JSON file.
Ability to disable displaying the settings UI
Some users don't want a UI for the settings. We can update the openSettings
key binding with a settingsUI
option.
If people still like the UI but want to access the JSON file, we can provide an "Open the JSON file" button at the bottom of the navigation menu.
Launch method: launch in a new tab
Clicking the settings button in the dropdown menu will open the settings UI in a new tab. This helps us take steps toward supporting non-terminal content in a tab. Users will be able to see their visual changes by using the preview window inside the settings UI on relevant pages.
We also considered: launch in a new window
Clicking the settings button in the dropdown menu will open the settings UI in a new window. This allows the user to edit their settings and see the Terminal live update with their changes.
In the Windows taskbar, the icon will appear as if Terminal has multiple windows open.
Editing and saving settings: implement a save button
Users will only see their settings changes take place once they click "Save". Clicking "Save" will write to the settings.json file. This aligns with the functionality that exists today by editing the settings.json file in a text editor and saving it.
We will also be adding a TerminalControl inside the settings UI to preview what the changes will look like before actually saving them to the settings.json file.
We also considered: automatically save settings
As users edit fields in the settings UI, they are automatically saved and written to the JSON file. This allows the user to see their settings changes taking place in real time.
UI/UX Design
Layout of all of the settings per page can be found in the design doc.
Top-level navigation: more descriptive navigation
The navigation menu is broken up into more digestible sections. This aligns more closely to other terminals. The following are the proposed navigation items:
- General
- Startup
- Interaction
- Rendering
- Appearance
- Global
- Color schemes
- Themes*
- Profiles
- Defaults
- Enumerate profiles
- Add new
- Keyboard
- Mouse*
- Command Palette*
- Marketplace*
* Themes, mouse, command palette, and marketplace will be added once they're implemented.
We also considered: align with JSON
The settings UI could have top-level navigation that aligns with the overall structure of the settings.json file. The following are the proposed navigation items:
- Globals
- Profiles
- Color schemes
- Bindings
For Bindings, it would have key bindings, mouse bindings, and command palette inside it.
Capabilities
Accessibility
This will have to undergo full accessibility testing because it is a new UI element. All items inside the settings UI should be accessible by a screen reader and the keyboard. Additionally, all of the settings UI will have to be localized.
Security
This does not impact security.
Reliability
This will not improve reliability.
Compatibility
This will change the default experience to open the UI, rather than the JSON file in a text editor. This behavior can be reverted with the setting listed above.
Performance, Power, and Efficiency
This does not affect performance, power, nor efficiency.
Potential Issues
Future considerations
- We will have to have design reviews for all of the content pages.
- The
hidden
property will need special consideration. Ideally, all profiles will appear in the settings regardless ifhidden
is set totrue
. - We should have undo functionality. In a text editor, you can type
Ctrl+Z
however the settings UI is a bit more complex. - Once we have a marketplace for themes and extensions, this should be added to the top-level navigation.
- As we add more features, the top-level navigation is subject to change in favor of improved usability.