From 7d61a8924f1a8457fb3a759f3bfef4df292c4fbc Mon Sep 17 00:00:00 2001 From: Kushagra Gour Date: Sun, 3 Mar 2019 19:04:22 +0530 Subject: [PATCH] command palette ui fixes --- src/components/CommandPalette.jsx | 19 ++++++++++++++----- src/components/KeyboardShortcutsModal.jsx | 4 ++-- src/style.css | 11 ++++++++--- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/src/components/CommandPalette.jsx b/src/components/CommandPalette.jsx index 8b7bf72..e981060 100644 --- a/src/components/CommandPalette.jsx +++ b/src/components/CommandPalette.jsx @@ -24,13 +24,20 @@ function Row({ item, onClick, isSelected }) { }`} onClick={onClick} > - {item.path ? : null} - {item.name} - {item.path ? ( +
+ {item.path ? : null} + {item.name} + {item.path ? ( + + {getFolder(item.path)} + + ) : null} +
+
- {getFolder(item.path)} + {item.keyboardShortcut ? item.keyboardShortcut : ''} - ) : null} +
); @@ -101,6 +108,7 @@ export class CommandPalette extends Component { closeHandler={this.props.closeHandler} noOverlay hideCloseButton + extraClasses="modal--command-palette" >
    {this.state.list.map((item, index) => ( diff --git a/src/components/KeyboardShortcutsModal.jsx b/src/components/KeyboardShortcutsModal.jsx index 5127977..764cdf5 100644 --- a/src/components/KeyboardShortcutsModal.jsx +++ b/src/components/KeyboardShortcutsModal.jsx @@ -9,10 +9,10 @@ export function KeyboardShortcutsModal({ show, closeHandler }) {

    Global

    -

    + {/*

    Ctrl/⌘ + Shift + ? See keyboard shortcuts -

    +

    */}

    Ctrl/⌘ + Shift + 5 Refresh preview diff --git a/src/style.css b/src/style.css index 52d72b9..0fc21c6 100644 --- a/src/style.css +++ b/src/style.css @@ -395,7 +395,7 @@ a > svg { } *:focus { - outline-width: 4px; + outline-width: 3px; outline-color: var(--color-button); outline-style: solid; outline-offset: 1px; @@ -1015,6 +1015,9 @@ body > #demo-frame { .modal--settings > .modal__content { width: 850px; } + .modal--command-palette > .modal__content { + width: 600px; + } } .pledge-modal .modal__content, @@ -1679,7 +1682,7 @@ body:not(.is-app) .show-when-app { .help-text { font-size: 0.9em; - color: rgba(255, 255, 255, 0.65); + color: var(--color-text-dark-1); margin: 5px 0; } @@ -1906,6 +1909,8 @@ while the theme CSS file is loading */ list-style: none; } .command-palette__option-row { + display: flex; + justify-content: space-between; padding: 4px 5px; width: 100%; text-align: left; @@ -1919,7 +1924,7 @@ while the theme CSS file is loading */ .command-palette__option-subtitle { color: var(--color-text-dark-1); margin-left: 10px; - font-size: 0.8em; + font-size: 0.875em; } .preview-dimension {