Skip to content

Introduce slash tools #37297

Closed
brave/brave-core
#24273
@aguscruiz

Description

Description:

We want to give users the ability to select quick actions with their prompts, similar to right-click actions, but from Leo's sidepanel WebUI.

This needs to function well on mobile and possibly have the following UX nuances:

  • Users should be able to remove the action type label from the input box.
  • Pressing backspace on an empty input box with an action type selected should remove it.
  • Typing "/" should open the tools menu and allow users to filter.

Input box

  • The send/microphone button is moved below the text input portion. This allows for better arrangement for the slash command icon and any future buttons we add in the future, like attachments.
  • The padding around the whole input box is removed, so we can save some space there. Also, border radius only impacts the top of the input. The idea is to make it seem more integrated to the keyboard.

Tools menu

  • On iPad, the tools menu has a 377 max-height, this is a tentative height but the main goal is to show a menu item being cut off, so the user has a hint that the content area is scrollable.
  • On iPad landscape mode, I think the tools menu should go full height like on the designs for iPhone
  • On iPhone the menu goes full height (minus the margin / input box / keyboard) so users can view it better. To hide the menu, they have to click the [/] icon again.

Design system
https://www.figma.com/file/MNwi0uwXNhkAbPiJ86G4vm/%E2%9C%A8-Leo?type=design&node-id=1506%3A8040&mode=design&t=8gXTvsbx8ZIUXpoy-1

Flows
https://www.figma.com/file/m0Gdbf0wtqyfEFGm32VLLc/Leo?type=design&node-id=1628%3A68090&mode=design&t=kvje2RSmalam6pOM-1

Duplicate issue for desktop/android
#37294

Before / after
image

Metadata

Type

No type

Projects

  • Status

    Done

Relationships

None yet

Development

No branches or pull requests

Issue actions