appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
34.63k stars 3.74k forks source link

[Feature] Inline Editing of Table widget #4183

Closed somangshu closed 2 years ago

somangshu commented 3 years ago

Summary

As a user, I should be able to configure a table widget to have editable rows. When the configuration is enabled from the property pane, an action will be available against each row, onClick, a form should open with all visible row fields which can be edited. The query/api call to ingest changes from the form should be available in the table widget property pane. This form will always open up as form modal.

Motivation

This is an easy implementation/workaround of a data grid that can come in handy to community users

Nikhil-Nandagopal commented 3 years ago

@somangshu this will require #1724 because the number of columns are variable. Another simple way of doing this is to create a column with an edit icon and clicking it turns the row of the table into all input boxes. The user can then configure an onUpdate action handler. Basically make the single row inline editable with a save button and just ask the user to configure the save action

somangshu commented 3 years ago

@Nikhil-Nandagopal While I feel tempted by the latter idea which could be quick to implement, But I think for a long term and scalable solution the initial thought is better, If we develop this in tandem with #1724, we will cover more use cases. Ex: how you mentioned input widget for each row key, We could also decide the widget based on the datatype, like a dropdown for array object.

nidhi-nair commented 3 years ago

Another user had a use case for this that required them to manually build a form/button to edit the table. Since the button they configured worked on a single column, the rest of the columns got cleared on update. In our solve for this, we should make sure our implementation makes it easier for users to update differentially if possible.

Nikhil-Nandagopal commented 3 years ago

@somangshu I think there are usecases for both. The JSON form is different while a user has explicitly asked for this inline edit here #5400 Ant design has this component https://ant.design/components/table/#header

areyabhishek commented 3 years ago

Got a request from one more user on Discord. Their table connects to multiple queries and they want inline edit+update.

Does react table support inline edits?

somangshu commented 3 years ago

Ant design specifically does allow the inline editing in the table widget, We will have to triage this an understand the implementation here.

@riodeuno any inputs here?

Nikhil-Nandagopal commented 3 years ago

Got One more feature request for this

riodeuno commented 3 years ago

Feature Note

Additional details

samg666 commented 3 years ago

@somangshu this will require #1724 because the number of columns are variable. Another simple way of doing this is to create a column with an edit icon and clicking it turns the row of the table into all input boxes. The user can then configure an onUpdate action handler. Basically make the single row inline editable with a save button and just ask the user to configure the save action

*create a column with an edit icon and clicking it turns the row of the table into all input boxes @Nikhil-Nandagopal can you share an example how to click and turns the row of the table to input boxes, then click to save the change?

somangshu commented 3 years ago

@ggs331 check this out, This is from ant.design, But we will be following a somewhat similar UX.

areyabhishek commented 3 years ago

Can a column allow editing from a drop-down or file picker instead of an input field?

somangshu commented 3 years ago

When we have #1724, This will be pretty straight forward. For now, I suggest we implement only input fields.

areyabhishek commented 3 years ago

Will we do inline editing or will we open a modal to edit the table data?

areyabhishek commented 3 years ago

Check out this project: https://github.com/nocodb/nocodb their focus is on providing users with an airtable like table to edit their databases.

somangshu commented 3 years ago

We are providing inline editing experience for now. Check this example out. The enhancement to this will be joining it with the Json Form Widget to edit is a full fledged functional form.

What you are seeing ☝️ is better implemented with a DataGrid. Using a table for something like this might be very hard to maintain and could also cause performance degrade

areyabhishek commented 3 years ago

Got it. Will inline editing work for compact, tall rows versions of the table as well?

Schnurres commented 3 years ago

Would love Inline Editing in the table widget. Would be really helpful and make it possible to build much smoother CRUD Apps. Maybe even add a delete and + symbol in the bar with the search text and pagination too. Then you could delete rows from there and when + button is pressed a new row appears and can be added. Then you could build really compact and clean CRUD components.

riodeuno commented 3 years ago

@Schnurres A feature to add new entries and delete entries is a neat idea. As you mentioned, we can have CRUD operations in one place.

@somangshu I was wondering if we should push these features out in phases, starting with the editing experience, then adding and deleting. Shall we convert this into an epic from a feature?

@areyabhishek The UX in compact modes is a good question. I would suggest the following UX. When the table is being edited, the row heights are maintained. As the rows allow for single line of text, we can allow the editable rows to simply overflow the text as in a single line input elements. @momcilo-appsmith Any suggestions here?

Feature Note update:

We will need a new entry in the property pane for onRowInsert and onRowDelete action triggers, along with the onRowUpdate trigger we will have for the rows which are edited.

momcilo-appsmith commented 3 years ago

@riodeuno I am not sure I understand the experience you are suggesting.

somangshu commented 3 years ago

From an ongoing discussion:

Schnurres commented 3 years ago

@somangshu this sounds awesome. Can't wait for these improvements to go live. This will improve Appsmith so much. The dropdown feature would be so good and really improve the inline editing function even further, Really like these ideas.

somangshu commented 3 years ago

@Schnurres thanks for the feedback, this helps us validate we are in the right direction. Kindly let us know if there is anything we might be missing.

riodeuno commented 3 years ago

@somangshu

Let's make decisions regarding the details based on designs of the UX.

dilippitchika commented 2 years ago

https://www.notion.so/appsmith/Table-V2-feature-design-13383d0ebe914555902d404b05d634d1

softwarebloat commented 2 years ago

hello! any update on this feature? :D

momcilo-appsmith commented 2 years ago

Hey @softwarebloat this feature has been designed and is currently under development. @sbalaji1192 and @somangshu can tell you more about when it will be launched.

You can check the design here (this file will contain future designs in development too, not just inline editing): https://www.figma.com/file/JEalu7g3jDLzWWnKsfE6mB/Table-Improvements-2022?node-id=2%3A1

manikumarnune123 commented 2 years ago

@Nikhil-Nandagopal We have incorporated the (tabulator ) component inside Appsmith. Below is a sample Tabulator

Nikhil-Nandagopal commented 2 years ago

@manikumarnune123 that's pretty cool! We'd love to see a PR on how you did that

billyrudi commented 2 years ago

Tabulator is a good component. i have suggested it some months ago..

mdmozibur commented 2 years ago

Any update on this or any timeline for this?

sbalaji1192 commented 2 years ago

Hey @mdmozibur, we're in the final phase of the development. We don't have a hard timeline yet. but we're targeting to release this before EOM.

mbilliodeaux commented 2 years ago

I would love to try this out even as a test user

dilippitchika commented 2 years ago

Hey @mbilliodeaux thanks for helping us out. I would like to get your feedback on this on a call, would you be willing to book a slot which works for you using this link - https://calendly.com/dilip_pitchika/30min