novel icon indicating copy to clipboard operation
novel copied to clipboard

feature - Added table format with a dedicated table-menu

Open ashrafchowdury opened this issue 1 year ago • 6 comments

Description

Added Table format with a dedicated table menu (closes #17)

The table doesn't show placeholder text for simplicity, and the table menu constantly tracks the table's location by calling a function.

Added Features

  • Table format
  • Table menu
  • Adding & deleting Column
  • Adding & deleting Row
  • Delete table

Preview

https://github.com/steven-tey/novel/assets/87828904/d47a14f7-6032-4187-9f25-b55c8e47e541

ashrafchowdury avatar Jun 25 '23 13:06 ashrafchowdury

@ashrafchowdury is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Jun 25 '23 13:06 vercel[bot]

New and updated dependency changes detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives[^1] Size Publisher
@tiptap/extension-table-row 🆕 2.0.3 None +0 8.65 kB _bdbch
@tiptap/extension-table-cell 🆕 2.0.3 None +0 13.5 kB _bdbch
@tiptap/extension-table-header 🆕 2.0.3 None +0 13.6 kB _bdbch
@tiptap/extension-table 🆕 2.0.3 None +0 126 kB _bdbch
[^1]: https://docs.socket.dev

socket-security[bot] avatar Jun 25 '23 13:06 socket-security[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
novel ❌ Failed (Inspect) Jun 27, 2023 4:45am

vercel[bot] avatar Jun 25 '23 21:06 vercel[bot]

Hey @ashrafchowdury! Great work on this PR! Was testing this out and found a few bugs:

  1. Clicking on the menu bar doesn't work sometimes.
  2. CMD+A inside a cell doesn't select the contents in the cell.
  3. Slash command shouldn't work in a cell. Nor should the NodeSelector dropdown.

Here's a screen recording of some of the bugs:

CleanShot.2023-06-25.at.16.14.06.mp4 Some potential points of improvement:

  1. I'm worried that the current Table Hover menu might not be clear enough for users. Maybe a "hover button to add new columns/rows" approach similar to Notion's might be better: CleanShot 2023-06-25 at 16 19 58
  2. Ability to resize the columns
  3. Ability to rearrange the columns
  4. Ability to toggle header column/row on and off: CleanShot 2023-06-25 at 16 18 56
  • Honestly speaking, I'm using Windows 11 and here dose not seen any types of issues which you listed out. I think there is an issue between Mac & windows.

  • The hover button to add new columns/rows" approach are bit complex feature, but I can work on it in further future for now I think the menu is perfect.

ashrafchowdury avatar Jun 27 '23 02:06 ashrafchowdury

I wanted to add other types of icons for removing columns & rows but lucide icons library doesn't have enough icons.

ashrafchowdury avatar Jun 27 '23 02:06 ashrafchowdury

The hover button to add new columns/rows" approach are bit complex feature, but I can work on it in further future for now I think the menu is perfect.

Agreed!

However, these issues are still present and I don't think we can merge this until they're fixed:

  1. Once I create a table, there is no way for me to exit it and create a new line.
  2. Slash command shouldn't work in a cell. Nor should the NodeSelector dropdown.
  3. CMD+A inside a cell doesn't select the contents in the cell.

steven-tey avatar Jun 27 '23 04:06 steven-tey

@ashrafchowdury, are you still working on this? If not, it would be great to get a short feedback, so I can consider handing it over to one of my devs to complete.

mmailaender avatar Aug 21 '23 18:08 mmailaender

@ashrafchowdury, are you still working on this? If not, it would be great to get a short feedback, so I can consider handing it over to one of my devs to complete.

I'm not working on it currently, you can freely do what you want.

ashrafchowdury avatar Aug 24 '23 04:08 ashrafchowdury

This is amazing! Would be great if this can get through, having table support, will make a great fit for the novel-vscode for editing table markdown in vs code.

BennyKok avatar Sep 05 '23 16:09 BennyKok

+1 - Would be awesome to get table support

ghoshsanjoy78 avatar Sep 08 '23 15:09 ghoshsanjoy78

I'm expecting to finish this PR in 3 to 4 weeks because we're unfortunately currently in a crunch phase 😉. We have already made the adjustments in our project, but our codebase differs - so we need a calm moment to finish this. If someone can't wait that long, feel free to finish it faster.

mmailaender avatar Sep 13 '23 07:09 mmailaender

Is there a confirmed release date for table support? @mmailaender @steven-tey

nepaul avatar Sep 24 '23 17:09 nepaul

@nepaul, my last post about the timeline is still valid. :) Although I need an answer from @steven-tey in this discussion about theming support, because our novel version is deeply integrated with theming support. So, depending on @steven-tey decision if he also wants theming support in Novel or not, our next steps will be easier or not. With theming support: We can create a pull request for table almost as is. (Low effort) Without theming support: We need to replace our theming support with Novels base theme. (More effort)

mmailaender avatar Sep 24 '23 18:09 mmailaender

Hey, @steven-tey when this table support can get in?

Gyurmatag avatar Oct 27 '23 23:10 Gyurmatag