Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search and commands #1696

Open
4 of 9 tasks
kof opened this issue May 31, 2023 · 0 comments
Open
4 of 9 tasks

Search and commands #1696

kof opened this issue May 31, 2023 · 0 comments
Assignees
Labels
prio:1 The most important thing to work on type:feat Features and enhancements

Comments

@kof
Copy link
Member

kof commented May 31, 2023

Design

https://www.figma.com/file/xCBegXEWxROLqA1Y31z2Xo/%F0%9F%93%96-Webstudio-Design-Docs?type=design&node-id=9234-12138&mode=view

There is a whole bunch of things we need to make easier for the user, automate certain popular tasks:

  • truncation: want to apply ellipsis to a text, it takes 3+ CSS properties, people don't know how to do
  • conversion to a different component: convert Div to Section for example
  • wrapping and applying styles: turn a youtube iframe into a background video, it will require wrapping, setting styles on both
  • adding instances to a component: radix tabs component needs trigger and content instances added + value prop when we need another tab
  • delete an instance from context menu
  • hotkeys can be all implemented via commands

To achieve all of this, we came up with a concept of "commands":

  1. command is a function that takes WsEmbedTemplate that contains tree and styles and returns a new WsEmbedTemplate
  2. we need a function that calls the command function and applies the changes, this very function can also be used by GPT cc @ggurgone
  3. commands can be declared by components: e.g. Heading component can expose a command that allows to convert it to h1, h2, h3 etc from context menu on canvas
  4. commands can be declared by plugins
  5. global search dialog (cmd+e, cmd+k in wf) could show a tab with commands where we can list global commands e.g. truncate as well as component specific commands

image

Docs in Figma: https://www.figma.com/file/xCBegXEWxROLqA1Y31z2Xo/%F0%9F%93%96-Webstudio-Design-Docs?type=design&node-id=9234-12138&mode=design

Screenshot 2023-12-12 at 9 53 17 AM

Component in Figma: https://www.figma.com/file/sfCE7iLS0k25qCxiifQNLE/%F0%9F%93%9A-Webstudio-Library?type=design&node-id=6979%3A6437&mode=design&t=c7CneEgQdJubU6AE-1

Examples for commands

  1. Truncate text
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  1. Line clamping https://x.com/getwebstudio/status/1811524195677020582
  display: -webkit-box
  webkit-box-orient: vertical
  -webkit-line-clamp: <# of lines>
  overflow: hidden

Launch tasks

  • option+down doesn't work when you are in shortcuts category
  • wrap in box
  • wrap in link
@kof kof added the prio:1 The most important thing to work on label May 31, 2023
@kof kof added this to Postponed May 31, 2023
@kof kof added the type:feat Features and enhancements label May 31, 2023
@kof kof added this to 🚀 Roadmap Jan 14, 2024
@kof kof moved this to ⏱️ 2024 in 🚀 Roadmap Jan 14, 2024
@kof kof changed the title Commands Commands and search bar Jan 14, 2024
@kof kof changed the title Commands and search bar Search and commands Jan 14, 2024
@kof kof mentioned this issue Feb 14, 2024
@kof kof moved this from ⏱️ 2024 to 💥 Next in 🚀 Roadmap May 25, 2024
@kof kof moved this from 💥 Next to ⏱️ 2024 in 🚀 Roadmap May 29, 2024
@TrySound TrySound moved this from ⏱️ 2024 to 🌐 Released in 🚀 Roadmap Jul 19, 2024
@TrySound TrySound moved this from 🌐 Released to 🏗️ In Progress in 🚀 Roadmap Jul 19, 2024
@TrySound TrySound moved this from 🏗️ In Progress to 💥 Next in 🚀 Roadmap Jul 19, 2024
@TrySound TrySound moved this from 💥 Next to ⏱️ 2024 in 🚀 Roadmap Jul 19, 2024
TrySound added a commit that referenced this issue Nov 4, 2024
Ref #1696

Press cmd+k or ctrl+k and see yourself. Or just watch the video.
TrySound added a commit that referenced this issue Nov 5, 2024
Ref #1696

Press cmd+k or ctrl+k and see yourself. Or just watch the video.
TrySound added a commit that referenced this issue Nov 9, 2024
Ref #1696

Press cmd+k or ctrl+k and see yourself. Or just watch the video.
TrySound added a commit that referenced this issue Nov 9, 2024
TrySound added a commit that referenced this issue Nov 9, 2024
Ref #1696

Switch to match sorter for more control over results.
Now it will try to match best token in the list of each option.
TrySound added a commit that referenced this issue Nov 9, 2024
Ref #1696

Switch to match sorter for more control over results. Now it will try to
match best token in the list of each option.
TrySound added a commit that referenced this issue Nov 12, 2024
Ref #1696

Here adding new idea into command search.
User searches for an object and can navigate actions over this object.
In case of pages user can open page or open pangel settings panel.
TrySound added a commit that referenced this issue Nov 15, 2024
Ref #1696

Here adding new idea into command search.
User searches for an object and can navigate actions over this object.
In case of pages user can open page or open pangel settings panel.
TrySound added a commit that referenced this issue Nov 15, 2024
Ref #1696

Here adding new idea into command search.
User searches for an object and can navigate actions over this object.
In case of pages user can open page or open pangel settings panel.
TrySound added a commit that referenced this issue Nov 16, 2024
Ref #1696

Here adding new idea into command search.
User searches for an object and can navigate actions over this object.
In case of pages user can open page or open pangel settings panel.

https://github.com/user-attachments/assets/a5d6c039-ba6b-4dbb-b0b4-bb9f1782dd20
TrySound added a commit that referenced this issue Nov 17, 2024
Ref #1696

Added most of our shortcuts to command panel.
TrySound added a commit that referenced this issue Nov 29, 2024
Ref #1696

Added most of our shortcuts to command panel.
TrySound added a commit that referenced this issue Nov 29, 2024
Ref #1696

Added most of our shortcuts to command panel.

<img width="482" alt="Screenshot 2024-11-17 at 17 28 55"
src="https://github.com/user-attachments/assets/347f877f-43e5-4ab7-9061-a1728d5c9df8">
@kof kof assigned TrySound and unassigned kof Dec 13, 2024
TrySound added a commit that referenced this issue Dec 15, 2024
Ref #1696 #4356 #3981

Added following new commands

- wrap in box
- wrap in link
- unwrap

All three follow constraints and prevent unwanted wrapping and
unwrapping for example wrap in link will not wrap a text with link
or list with list item cannot be unwrapped.
TrySound added a commit that referenced this issue Dec 16, 2024
Ref #1696
#4356
#3981

Added following new commands

- wrap in box
- wrap in link
- unwrap

All three follow constraints and prevent unwanted wrapping and
unwrapping for example wrap in link will not wrap a text with link or
list with list item cannot be unwrapped.

<img width="420" alt="image"
src="https://github.com/user-attachments/assets/698168e1-d583-43e1-b6f7-bd0185cad7df"
/>
@TrySound TrySound moved this from 🏗️ In Progress to 🌐 Released in 🚀 Roadmap Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio:1 The most important thing to work on type:feat Features and enhancements
Projects
Status: 🌐 Released
Status: No status
Development

No branches or pull requests

3 participants