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

[Feature]: support "table" shape #3671

Open
1 task done
xuanswe opened this issue May 1, 2024 · 3 comments
Open
1 task done

[Feature]: support "table" shape #3671

xuanswe opened this issue May 1, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@xuanswe
Copy link

xuanswe commented May 1, 2024

What's the feature?

Currently grid is super useful in many cases. It could be enabled at "Preferences > Show grid."
It would be more useful if we could select an area and convert the grid under this area into an actual shape, which is basically a table.
(Remove the initial complicated idea and replace with a new feature description as below)

While interviewing I need to draw a chessboard to explain how to solve an 8-queens puzzle.
This feature could help me save 1-2 minutes in this specific case.

According to my real-life experiences, I got many similar cases, especially with a dynamic programing problem. A table with cells in arbitrary size is extremely useful.

My proposal is to create a new Table shape, which is similar to the Rectangle shape but with cells inside.
The larger the drag area, the more cells the table has.
The app should have a simple algorithm to increase/decrease the number of cells when the drag area is expanded/shrunk.
After having the table with the number of cells user want, user can easily resize the whole shape to fine tune the size of cells.

Contact Details

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@xuanswe xuanswe added the enhancement New feature or request label May 1, 2024
Copy link

linear bot commented May 1, 2024

@xuanswe xuanswe changed the title [Feature]: convert a grid area to a shape [Feature]: convert a grid area into an actual shape May 1, 2024
@xuanswe
Copy link
Author

xuanswe commented May 2, 2024

I would try to give my proposal on how it could be implemented.

I think this should work similar to how we draw a Rectangle shape.

  1. Select shape Rectangle
  2. Drag the mouse
  3. The start point and the end point form the rectangle

For a Table shape, we can do the same

  1. Select shape Table
  2. Drag the mouse
  3. The start point and the end point form the rectangle area where we can create a table inside this area

image

  1. The rectangle area at step 3 covers a specific grid behind it and can create the table on top of that grid

image

Note that it could work even if the user doesn't enable "Preferences > Show grid."
The app knows about the grid even if it is not shown visually.
The user doesn't need to see the grid because we can show the table shape on the fly, so user knows what is the final shape before release the mouse.

After creating the table shape, the user can easily resize as usual to scale up/down for bigger/smaller cells.

@xuanswe
Copy link
Author

xuanswe commented May 3, 2024

Maybe I over complicated this shape when relating it with the grid system.
An easier way is just having a normal table shape.
By knowing the drag area, we can compute the number of cells per row/col of the table.
User can resize the whole shape, which will resize the cells accordingly.

=> I updated the original title/description with this simplification.

@xuanswe xuanswe changed the title [Feature]: convert a grid area into an actual shape [Feature]: support "table" shape May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant