-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ac3fecb
commit e57dbe0
Showing
5 changed files
with
130 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
--- | ||
author: Kayla Cinnamon - cinnamon-msft | ||
created on: 2021-03-04 | ||
last updated: 2021-03-09 | ||
issue id: 6900 | ||
--- | ||
|
||
# Actions Page | ||
|
||
## Abstract | ||
|
||
We need to represent actions inside the settings UI. This spec goes through the possible use cases and reasoning for including specific features for actions inside the settings UI. | ||
|
||
## Background | ||
|
||
### Inspiration | ||
|
||
It would be ideal if we could get the settings UI to have parity with the JSON file. This will take some design work if we want every feature possible in relation to actions. There is also the option of not having parity with the JSON file in order to present a simpler UX. | ||
|
||
### User Stories | ||
|
||
All of these features are possible with the JSON file. This spec will go into discussion of which (possibly all) of these user stories need to be handled by the settings UI. | ||
|
||
- Add key bindings to an action that does not already have keys assigned | ||
- Edit key bindings for an action | ||
- Remove key bindings from an action | ||
- Add multiple key bindings for the same action | ||
- Create an iterable action | ||
- Create a nested action | ||
- Choose which actions appear inside the command palette | ||
- See all possible actions, regardless of keys | ||
|
||
Commands with properties: | ||
- sendInput has "input" | ||
- closeOtherTabs has "index" | ||
- closeTabsAfter has "index" | ||
- renameTab has "title"* | ||
- setTabColor has "color"* | ||
- newWindow has "commandline", "startingDirectory", "tabTitle", "index", "profile" | ||
- splitPane has "split", "commandline", "startingDirectory", "tabTitle", "index", "profile", "splitMode", "size" | ||
- copy has "singleLine", "copyFormatting" | ||
- scrollUp has "rowsToScroll" | ||
- scrollDown has "rowsToScroll" | ||
- setColorScheme has "colorScheme" | ||
|
||
Majority of these commands listed above are inteded for the command palette, so they wouldn't make much sense with keys assigned to them anyway. | ||
|
||
### Future Considerations | ||
|
||
One day we'll have actions that can be invoked by items in the dropdown menu. This setting will have to live somewhere. Also, once we get a status bar, people may want to invoke actions from there. | ||
|
||
## Solution Design | ||
|
||
### Proposal 1: Keyboard and Command Palette pages | ||
|
||
Implement a Keyboard page in place of the Actions page. Also plan for a Command Palette page in the future if it's something that's heavily requested. The Command Palette page would cover the missing use cases listed below. | ||
|
||
When users want to add a new key binding, the dropdown will list every action, regardless if it already has keys assigned. This page should show every key binding assigned to an action, even if there are multiple bindings to the same action. | ||
|
||
Users will be able to view every possible action from the command palette if they'd like. | ||
|
||
Use cases covered: | ||
- Add key bindings to an action that does not already have keys assigned | ||
- Edit key bindings for an action | ||
- Remove key bindings from an action | ||
- Add multiple key bindings for the same action | ||
- See all actions that have keys assigned | ||
|
||
Use cases missing: | ||
- Create an iterable action | ||
- Create a nested action | ||
- Choose which actions appear inside the command palette | ||
- See all possible actions, regardless of keys | ||
|
||
* **Pros**: | ||
- This allows people to edit their actions in most of their scenarios. | ||
- This gives us some wiggle room to cover majority of the use cases we need and seeing if people want the other use cases that are missing. | ||
|
||
* **Cons**: | ||
- Unfortunately we couldn't cover every single use case with this design. | ||
- You can't edit the properties that are on some commands, however the default commands from the command palette include options with properties anyway. For example "decrease font size" has the `delta` property already included. | ||
|
||
### Proposal 2: Have everything on one Actions page | ||
|
||
Implement an Actions page that allows you to create actions designed for the command palette as well as actions with keys. | ||
|
||
Use cases covered: | ||
- Add key bindings to an action that does not already have keys assigned | ||
- Edit key bindings for an action | ||
- Remove key bindings from an action | ||
- Add multiple key bindings for the same action | ||
- See all actions that have keys assigned | ||
- Create an iterable action | ||
- Create a nested action | ||
- Choose which actions appear inside the command palette | ||
- See all possible actions, regardless of keys | ||
|
||
I could not come up with a UX design that wasn't too complicated or confusing for this scenario. | ||
|
||
**Pros**: | ||
- There is full parity with the JSON file. | ||
|
||
**Cons**: | ||
- Could not come up with a simplistic design to represent all of the use cases (which makes the settings UI not as enticing since it promotes ease of use). | ||
|
||
## Conclusion | ||
|
||
We considered Proposal 2, however the design became cluttered very quickly and we agreed to create two pages and start off with Proposal 1. | ||
|
||
## UI/UX Design | ||
|
||
![Click edit on key binding](./edit-click.png) | ||
|
||
The Add new button is using the secondary color, to align with the button on the Color schemes page. | ||
|
||
![Edit key binding](./edit-keys.png) | ||
|
||
![Click add new](./add-click.png) | ||
|
||
![Add key binding](./add-keys.png) | ||
|
||
## Potential Issues | ||
|
||
This design is not 1:1 with the JSON file, so actions that don't have keys will not appear on this page. Additionally, you can't add a new action without keys with this current design. | ||
|
||
You also cannot specify properties on commands (like the `newTab` command) and these will have to be added throught the JSON file. Considering there are only a few of these and we're planning to iterate on this and add a Command Palette page, we were okay with this decision. | ||
|
||
## Resources | ||
|
||
### Footnotes |
e57dbe0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Misspellings found, please review:
To accept these changes, run the following commands from this repository on this branch
✏️ Contributor please read this
By default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
perl
command excluding the outer'
marks and dropping any'"
/"'
quotation mark pairs into a file and then runperl file.pl
from the root of the repository to run the code. Alternatively, you can manually insert the items...If the listed items are:
.github/actions/spelling/dictionary/names.txt
..github/actions/spelling/dictionary/
..github/actions/spelling/expect/
..github/actions/spelling/patterns/
.See the
README.md
in each directory for more information.🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉
🗜️ If you see a bunch of garbage and it relates to a binary-ish string, please add a file path to the
.github/actions/spelling/excludes.txt
file instead of just accepting the garbage.File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
^
refers to the file's path from the root of the repository, so^README\.md$
would exclude README.md (on whichever branch you're using).