Skip to content
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

Structured Table keys inconsistent #4598

Open
NiklasBr opened this issue Jul 2, 2019 · 4 comments

Comments

Projects
None yet
3 participants
@NiklasBr
Copy link
Contributor

commented Jul 2, 2019

Bug Report

Expected behavior

Consistent naming of row and column keys

Actual behavior

Keys start with the number "1" and then get the key "name". Is this expected behaviour? I don't know because the documentation does not mention what I should expect and there are no comments in the code either which could help...

Steps to reproduce

  1. Create an object class
  2. Add the Data Component: Structured: Structured Table
  3. Add a few rows and columns:

Skärmbild (62)

@brusch

This comment has been minimized.

Copy link
Member

commented Jul 10, 2019

Maybe we should just add a new row and put the focus into the key cell of the newly added row.
What do you think @NiklasBr @dvesh3

@NiklasBr

This comment has been minimized.

Copy link
Contributor Author

commented Jul 10, 2019

I don’t think that is a good solution @brusch

I would much rather have the automatic naming be consistent, not mixed like it is today: “1, name, name, …’

My preference to solve this:
Either use a number series “1, 2, 3, …”
Or use “name, name, name, …”

When that’s is done, also adding focus to the field would probably be a nice improvement.

@dvesh3

This comment has been minimized.

Copy link
Contributor

commented Jul 15, 2019

IMO, it should be consistent as other data types. so adding option to "Select" data type adds an empty row with focus. Also, I don't see a point here to keep dummy values as most of the time you end up replacing them. @NiklasBr do you have a use-case for automatic naming?

For UI improvement: I would like to move delete icon next to row, just as in select data type. currently, you have to click on row edit column and then click delete button.
image

@NiklasBr

This comment has been minimized.

Copy link
Contributor Author

commented Jul 15, 2019

@dvesh3 I pretty much agree. And your improvement idea seems good.

Personally I think using the as similar logic as possible to #4243 would make a lot of sense, both by possibly reusing code and making the user experience consistent.

While we are discussing improvements, renaming the UI columns to "Display name" and "Value" would be clearer than "Key" and "Label" (like for Select options).

I don't have a "perfect" use-case for automatic naming, other than to make it generally consistent and predictable. I personally would have settled for numeric values (1, 2, 3, ...) when I needed to create a Structured Table recently because I only had a need for the value to be human-readable and did not need to specify the machine-readable part, having it created automatically would have been nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.