-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
Make TS TableRecord interface contain the record response instead of extending it #906
Comments
@seancolsen The solution mentioned sounds good to me. We may also want to restructure the TableRecord interface to better suit our new grouping model. |
@pavish I decided not to get into this today because I didn't want to add more complexity than necessary to the range grouping PR. We can take up this refactoring later. |
@seancolsen That's fine. I was specifying the structure changes based on the new grouping model as a potential refactor we can do when this issue is picked up, we don't have to prioritize this right away. |
Problem
Here we have the following code:
That means that for one table cell, I might have an object like this:
This design leaves our internal front-end state data intermingled with the user data from postgres. What if I have a column named
__state
?Example bug
Go to "New Table" > "Import Data".
Set "Import From" to "Clipboard".
Paste the following:
Click "Continue".
Click "Finish Import".
When the table loads, observe "done" printed for every row in the table.
Expect to see "done", "error", "loading", and "idle" values in the rows respectively.
There's all sorts of other strange behavior when a column shares a name with one of our internal fields.
Solution
Instead of
TableRecord
extendingTableRecordInResponse
, I thinkTableRecord
should containTableRecordInResponse
as follows:This design also eliminates the need for the double underscores.
Notes
I'm marking this "draft" until we get an okay from @pavish
The text was updated successfully, but these errors were encountered: