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.64k stars 3.74k forks source link

[Bug]-[266]:Google Sheet column name with a space shows up as an unexpected identifier error when bound #12086

Open ramsaptami opened 2 years ago

ramsaptami commented 2 years ago

Is there an existing issue for this?

Description

Widget binding using a Google Sheet column name that has a space throws an unexpected identifier error. The data is rendered correctly on a table widget which reads spaces on column names but other widgets like list/select do not recognize the space even though autocomplete suggestion contains column names with space.

LOOM DEMO

Steps To Reproduce

  1. Go to app on https://release.app.appsmith.com/applications/62385770e2e3e942f7cdb921/pages/6239785aa1037840b6dc13be/edit
  2. Observe the error displayed on the list widget

OR

  1. Use a Google Sheet which has column names with spaces and generate a CRUD
  2. Use a list widget to try and display this data using autocomplete suggestion and observe the error when a column with spaces is present.

Public Sample App

https://release.app.appsmith.com/applications/62385770e2e3e942f7cdb921/pages/6239785aa1037840b6dc13be/edit

Version

Cloud

rohan-arthur commented 2 years ago

issue with binding the column to list item, moving this to ui builders pod

somangshu commented 2 years ago

@ashit-rath @SatishGandham will need info on what the problem is here and if this should be added to out scope of list widget?

dilippitchika commented 2 years ago

Stats

Stat Values
Reach 100
Effort (months) 0.75
dilippitchika commented 2 years ago

Users successfully binding list widget 400, assuming 25% use Google sheets (Actual data is 15%)

Tooluloope commented 2 years ago

This isn't an issue @dilippitchika @somangshu @ashit-rath This is how the JS binding should be {{currentItem["New Customer"]}} and not like this {{currentItem.New Customer}}

This goes for both List and Select.

We can open a feature request to change the key to New_Customer, making it better as it's used in the table widget and this would be for the whole platform and not widget specific.

Tooluloope commented 2 years ago

Also I suggest this be removed from the List widget Epic

somangshu commented 2 years ago

Agreed to @Tooluloope.

This should be raised as a separate issue for both List and Select widget since it related to multiple places and should extend the logic from table widget for cleaning/sanitising keys cc @dilippitchika

dilippitchika commented 1 year ago

Just looking at this now. But sanitising keys just in the widget might not help, @Tooluloope who has to enable this workflow across the platform?