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

feat: edit/create rows from tables interactive content widget #952

Merged
merged 11 commits into from
Jun 27, 2024

Conversation

elzody
Copy link
Contributor

@elzody elzody commented Mar 25, 2024

Issue(s)

Fixes #879

Overview

If a user has the ability to create/edit rows on a table/view, the user can also do so from the interactive table widget. The same "create row" button is used, as well as the "edit row" action button when hovering over a row. I made some edits to other components to better support this feature, such as dynamic importing of store.js and data.js and styling of the CreateRow.vue and EditRow.vue components (mostly from within ContentReferenceWidget.vue so as to not alter the original components elsewhere).

@elzody elzody added enhancement New feature or request 3. to review Waiting for reviews labels Mar 25, 2024
@juliushaertl

This comment was marked as resolved.

@enjeck

This comment was marked as outdated.

juliushaertl

This comment was marked as resolved.

@juliushaertl
Copy link
Member

juliushaertl commented Mar 28, 2024

Might be a dumb question, but what is the "interactive content widget"? Is that what pops up when I use the smartpicker?
I ask because I have no idea how to view what this PR changes 😅

When you open the smart picker and insert a table you will first see a custom picker element which is unrelated to the PR but just for understanding. The widgets then define the rendering of a preview for a link inserted through the smart picker or manually. We already have those widgets for a while but now make them more interactive by adding the ability to create/edit rows directly from the link preview widget. Hope that makes it a bit clearer :)

In short, to test it use the smart picker to insert a table link with content preview in a text document and toggle the preview on.

@elzody elzody force-pushed the feat/widget-create-edit-rows branch from a68d8e3 to ae17ca0 Compare April 5, 2024 19:23

This comment was marked as off-topic.

@elzody elzody force-pushed the feat/widget-create-edit-rows branch 2 times, most recently from d7f58ac to 110a7b7 Compare April 10, 2024 19:48
max-nextcloud

This comment was marked as resolved.

@max-nextcloud max-nextcloud self-assigned this Apr 23, 2024
webpack.config.js Outdated Show resolved Hide resolved
@elzody elzody force-pushed the feat/widget-create-edit-rows branch from 4471239 to 6501024 Compare May 8, 2024 15:26
@elzody elzody force-pushed the feat/widget-create-edit-rows branch 3 times, most recently from 0adbdc8 to 44e3745 Compare May 28, 2024 18:31
mejo-

This comment was marked as resolved.

@elzody

This comment was marked as resolved.

@elzody elzody force-pushed the feat/widget-create-edit-rows branch from 50128be to 5a5bc4c Compare June 6, 2024 18:39
@elzody

This comment was marked as resolved.

@elzody elzody requested a review from mejo- June 6, 2024 18:49
@elzody elzody self-assigned this Jun 7, 2024
@juliushaertl
Copy link
Member

Pushed a small backend commit to ensure that the rich text fields are properly rendered, otherwise 👍

Copy link
Member

@mejo- mejo- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @elzody.

The CSS/style fixes look great, much better now 👌

Regarding the problems with editing from Collectives, it's still the same:

  • Editing is possible in edit mode, and it alters the table. When I open the table in the Tables app afterwards, the changes are visible. But for some reason, after reloading the collectives page, the old state of the table before the change is displayed.
  • Editing in view mode is still possible. When switching to view mode in Collectives, all the buttons to edit the table in place are still there, and when editing the table the changes are pushed to the server.

I recorded a screencast to make more clear what I mean:

Screencast
recording1

@elzody elzody force-pushed the feat/widget-create-edit-rows branch from c813449 to d124ed1 Compare June 24, 2024 19:22
@juliushaertl
Copy link
Member

Editing in view mode is still possible. When switching to view mode in Collectives, all the buttons to edit the table in place are still there, and when editing the table the changes are pushed to the server.

I'd not consider this one a blocker for now. We also have this behaviour in other interactive widgets and it would require larger work to make the context of the widget exposed to the rendering provider.

elzody and others added 11 commits June 27, 2024 12:28
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>

fix: set store in widget

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>

fix: properly access store to create new row

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>

fix: search functionality

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>

fix: row reactivity

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>

feat: add component testing skeleton files

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>

test: start component testing for content reference widget

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>

fix: point package.json scripts to webpack.config.js

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>

fix(test): properly mount component

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>

fix(test): use default options and mix in given mount options

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>

fix(tests): add styles for components

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>

refactor(tests): move richObject to fixture

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>

test: verify table title after mounting component

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>

test: test searching in widget

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>

refactor(tests): organize mount test

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>

fix: resolve pagination issues

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>

fix: change viewport dimensions in cypress config

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>

fix: refine row selector

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>

feat: create and edit rows from tables interactive widget

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>

fix(css): edit row delete & save buttons

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>

fix(css): fullscreen rich text edit

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
@elzody elzody dismissed mejo-’s stale review June 27, 2024 13:01

Changes since review

@elzody elzody merged commit 8443dde into main Jun 27, 2024
62 checks passed
@elzody elzody deleted the feat/widget-create-edit-rows branch June 27, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement New feature or request feedback-requested
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Interactive widget: Create and edit rows
5 participants