-
Notifications
You must be signed in to change notification settings - Fork 21
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
base: main
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
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. |
a68d8e3
to
ae17ca0
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
d7f58ac
to
110a7b7
Compare
4471239
to
6501024
Compare
0adbdc8
to
44e3745
Compare
0ac0602
to
6fe5ae4
Compare
eae0c48
to
6fd1a08
Compare
I don't think the failing Cypress tests are related, they are also failing on main it seems. Unsure what caused it 😔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it in Collectives and faced some issues:
-
In document editors with limited width (670px per default in Text and Collectives) the styling looks a bit off when scrolling completely to the right. See screenshot below.
-
I'm able to edit the table in place, but when I reload the page afterwards, my changes are gone. Both changed to existing columns and added new columns. I see a
PUT
request to the tables app when saving changes in the widget, but for some reason it's not persisted. -
In read-only mode I'm still able to edit the table in place, this is unexpected. Maybe it's better to display the non-interactive version there?
I don't know the code base well enough to fully understand each line of code change, but changes look sensible to me.
@mejo- Thanks for bringing these up. A lot of the styling issues were present before I even started; I tried to fix some up as best I could, but there are definitely still some present. I will look at it some more |
50128be
to
5a5bc4c
Compare
I made some styling changes which I think make the widget look better than before. Specifically, I made the following changes:
The other things that you mentioned were not reproducible on my end. I tried the following:
Maybe it would be worth it to expand the tests a bit to check for the read-only permissions or something? Also, I rebased onto main and resolved a small merge conflict. |
5a5bc4c
to
f518b72
Compare
Pushed a small backend commit to ensure that the rich text fields are properly rendered, otherwise 👍 |
There was a problem hiding this 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 |
---|
![]() |
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>
c813449
to
d124ed1
Compare
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
anddata.js
and styling of theCreateRow.vue
andEditRow.vue
components (mostly from withinContentReferenceWidget.vue
so as to not alter the original components elsewhere).