-
Notifications
You must be signed in to change notification settings - Fork 94
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/114/tables #2235
Feature/114/tables #2235
Conversation
max-nextcloud
commented
Mar 14, 2022
•
edited
Loading
edited
- Resolves: Add Markdown table support #114
- Target version: master
This is still very basic... obviously a bunch of things are still missing:
I'm not sure how to design the ui. Currently i am thinking a single table button that creates a table and if the table is active clicking this button will open a submenu rather than toggling off the table. The submenu would then contain the buttons to add / remove columns / rows etc. |
1b07ff8
to
4beea0b
Compare
Quick early design feedback form the spontaneous design co-working:
|
3b1b2f5
to
6e969d5
Compare
Enter already creates a new row almost everywhere in the table.
|
9b9bd53
to
0ad82d9
Compare
This comment was marked as outdated.
This comment was marked as outdated.
0211ad1
to
2254f0c
Compare
What's missing to get this ready to merge:
Further tweaks that would be nice to have but could be fixed separately
Moved to a separate issue #2267 :
|
3fa26b0
to
3c8f7b2
Compare
I think this is good (enough) to go. I'd be curious what you think. update: that was before i noticed all cypress tests are failing 😭 |
3c8f7b2
to
563c5d7
Compare
Looks like the test failures are not related to this branch... they also happen on master. |
Wow, looks super nice 🤩 I only gave it a quick try and it looks really great! Some glitches I experienced so far:
@max-nextcloud created #2266 to track this. |
Each node is responsible for rendering its markdown content. This splits the responsibility and simplifies the `toMarkdown` functions a lot. At the same time it makes it harder to beautify the entire table because every cell only knows about itself - not about the rest of the column. To work around this we can introduce padding attributes for TableCell and TableHeader. These need to be updated when the content of the table changes. They will also allow us to preserve the original padding from a markdown file. Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Vinicius Reis <vinicius.reis@nextcloud.com>
Also make sure that table rows are rendered on one line each. Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Prosemirrors `goToNextCell` command checks for a node with tableRole `row`. Without this the command fails. Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Prosemirror expects colspan, rowspan and the like to calculate the table layout. Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Only create a new row when we have reached the end of the table. Signed-off-by: Max <max@nextcloud.com>
https://materialdesignicons.com/icon/table Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
There is enough space already due to the size of the actions button. Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
little bit of padding on the top of the text so it is in the middle of the cell on single line cells. Use icons that are better destinguishable for delete commands. Signed-off-by: Max <max@nextcloud.com>
no idea why but it seems to be undefined. Reported upstread here: cypress-io/github-action#524 Signed-off-by: Max <max@nextcloud.com>
Hide it in table settings so it is harder to hit by accident. Undo still works - but still - it is quite a destructive action. Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Vinicius Reis <vinicius.reis@nextcloud.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Signed-off-by: Max <max@nextcloud.com>
6f173c3
to
52c36ba
Compare