Are we planning to eventually support reordering table columns? #803
-
|
Observations:
I see that in the short term users won't be able to reorder table columns. Is that just a consequence of our task prioritization? Or is part of our long-term product vision? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 10 replies
-
|
Personally, I'd like to see us aim to eventually allow users to reorder table columns without creating a view. For the implementation, I would lean towards storing a |
Beta Was this translation helpful? Give feedback.
-
This does not hold true. Column index changes whenever a column is added/removed (It also changes for all columns after the added/removed column). I remember having a detailed discussion around this with @kgodey and @mathemancer, inorder to have an id for column, which is a combination of name and index. I'm not able to find that discussion (maybe it was in an issue). Edit: To answer the question, Yes, we should eventually be able to reorder columns directly on the tables/views in my point of view. We can store the column order related information in our database, similar to the approach you've mentioned in #803 (comment). I remember talking about this and I assumed we have just de-prioritized this for now, and everyone is in agreement. Edit: I think ordering, resizing, hiding/showing columns etc., should be stored at the user level, for each mathesar user, and we shouldn't require creating views for them. |
Beta Was this translation helpful? Give feedback.
-
|
Generally, we're trying to steer users towards the purpose of tables as only for storage / source of truth of the data and views being the main way they see data presented and work with it day-to-day. Reordering columns is a presentational thing, and as such, I think it belongs in views. I think it might help the user get the concept better if we guide them towards making a view if they want to save presentational aspects of a table. Since views and tables look so similar, I'm worried that the user won't understand the difference between them very easily. Note that this is only if they want their reordering to be persistent. If they just want to reorder/hide/show columns on tables temporarily, I think we should support that on the frontend. |
Beta Was this translation helpful? Give feedback.
-
|
A few notes that didn't fit into a reply to others' comments:
I do see @pavish's point, however, about some display options being stored by the front end (or service layer), and that extending this to column order might seem reasonable to many users. I think we should make it clear (if we go that direction) that such a representation isn't an actual |
Beta Was this translation helpful? Give feedback.
-
|
Just as an added clarification to my points, I do not think these display options should be persisted/configured at the columns API. It's best if the columns API returns all columns and does not support ordering and hiding/showing, staying true to the db. I would prefer these operations (column order, resizing, hide/show) to be strictly treated as display properties and should not affect how the API itself works. I am suggesting a completely different user specific API which stores user specific settings (@silentninja gave an example of theme). These configurations are best placed there, and would only reflect on the UI. If specifying user specific settings is not in scope of the initial release, we can store it on the localstorage for now. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for contributing to the discussion so far, everyone. I've done a bunch more thinking and I stand by my original answer - I don't think it makes sense to support reordering in tables at the database level. I wrote up a document about the purpose of views on the wiki here: https://wiki.mathesar.org/en/product/concepts/views, which will hopefully help clarify my thinking around it. There were also some good points raised in the discussion above that I'll respond to individually:
I think the most important thing we need to steer the user towards is that Views represent the concept of tables/spreadsheets that they associate with other tools.
This is a good point and I don't think we should rely on table order in that case either; I've left feedback in mathesar-foundation/mathesar-wiki#12 accordingly.
A new view will be created only if you want to save the changes to that table permanently in the database, which the user should not need to do. In the example in the Views wiki page, there is no need for the user to look at the
This is why I think we should have some sort of flow that lets users know while they're browsing a table that if they want to sreorder the columns, they can create a View. I'm open to considering user-specific ordering of table columns in the future, but I don't think we need it for our alpha release. I'd rather put our design efforts into trying to steer users towards Views and see how far we can go with that. |
Beta Was this translation helpful? Give feedback.
Thanks for contributing to the discussion so far, everyone. I've done a bunch more thinking and I stand by my original answer - I don't think it makes sense to support reordering in tables at the database level.
I wrote up a document about the purpose of views on the wiki here: https://wiki.mathesar.org/en/product/concepts/views, which will hopefully help clarify my thinking around it. There were also some good points raised in the discussion above that I'll respond to individually: