Skip to content

feat: update command palette design#514

Merged
cguedes merged 15 commits into
mainfrom
439-update-command-palette-design
Sep 11, 2023
Merged

feat: update command palette design#514
cguedes merged 15 commits into
mainfrom
439-update-command-palette-design

Conversation

@sehyod

@sehyod sehyod commented Sep 7, 2023

Copy link
Copy Markdown
Collaborator

This implements the new design for the command palette.
This hides actions depending on the context. The test file has been updated to reflect this change and make it easier to grow the component by adding new actions

Screenshot 2023-09-07 at 12 07 46

Closes #439

@sehyod sehyod added the design needed The task needs design label Sep 7, 2023
@codecov

codecov Bot commented Sep 7, 2023

Copy link
Copy Markdown

Codecov Report

Merging #514 (37c8910) into main (091bf69) will increase coverage by 0.12%.
The diff coverage is 90.96%.

@@            Coverage Diff             @@
##             main     #514      +/-   ##
==========================================
+ Coverage   81.65%   81.78%   +0.12%     
==========================================
  Files         213      216       +3     
  Lines       12098    12084      -14     
  Branches     1179     1197      +18     
==========================================
+ Hits         9879     9883       +4     
+ Misses       2205     2187      -18     
  Partials       14       14              
Files Changed Coverage Δ
src/application/commands/CommandPaletteConfigs.tsx 100.00% <ø> (ø)
src/application/listeners/projectEventListeners.ts 46.80% <0.00%> (-1.37%) ⬇️
src/application/sidebar/LeftSidePanelWrapper.tsx 0.00% <0.00%> (ø)
src/application/sidebar/RightSidePanelWrapper.tsx 0.00% <0.00%> (ø)
src/AppStartup.tsx 91.78% <50.00%> (-1.18%) ⬇️
...rc/features/textEditor/components/TipTapEditor.tsx 87.06% <62.50%> (-1.82%) ⬇️
src/application/commands/CommandPalette.tsx 100.00% <100.00%> (+7.10%) ⬆️
.../application/commands/hooks/useActionsCommands.tsx 100.00% <100.00%> (ø)
src/application/commands/hooks/useAiCommands.tsx 100.00% <100.00%> (ø)
src/application/commands/hooks/useFileCommands.tsx 100.00% <100.00%> (ø)
... and 6 more

... and 4 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

📢 Have feedback on the report? Share it here.

@sehyod sehyod removed the design needed The task needs design label Sep 7, 2023
@cguedes

cguedes commented Sep 7, 2023

Copy link
Copy Markdown
Collaborator

@sehyod I think we should add h-6 w-6 p-[0.25rem] to this rule to make sure the icons and text are aligned. Please confirm if this is the correct way to implement this.

.command-palette .info_wrapper > svg {
   @apply h-6 w-6 fill-btn-ico-modal-item-default p-[0.25rem];
}
Before After
image image

EDIT: I think that the root cause for this is that the size (box model) for icons from react-icons and the SVGs (we can use alongside with icons) "don't match the css rules".

@sehyod

sehyod commented Sep 7, 2023

Copy link
Copy Markdown
Collaborator Author

Yes, this works. I did not update it because I thought we would use custom icons soon, but the design team confrimed we should use the icons from react-icons, so I will update the CSS rules

EDIT: Actually I don't think we need the padding, the height and width are enough. The custom icons have a size of 24x24px so we can use the same for react-icons for consistency

@sehyod sehyod marked this pull request as ready for review September 8, 2023 16:11
@sehyod sehyod requested a review from cguedes September 8, 2023 16:13
@cguedes cguedes merged commit 39baccd into main Sep 11, 2023
@cguedes cguedes deleted the 439-update-command-palette-design branch September 11, 2023 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Design for command palette

2 participants