Fix saving datagrid columns.

Review Request #13611 — Created March 4, 2024 and discarded

Information

Djblets
release-5.x

Reviewers

When we first implemented the datagrids, it was the case that assigning
a list value into a TextField would serialize it as a comma-separated
list of the values in the list. This is no longer the case, and setting
the datagrid columns would end up saving as a list repr, which wasn't
parsable when loading the value back out.

This change fixes it so we explicitly join the datagrid columns when
saving them back to the profile, and adds some unit tests to make sure
that saving the columns and sort order work correctly.

  • Ran unit tests.
  • Enabled, disabled, and moved some columns around and saw that it got
    properly saved to the profile.
Summary ID
Fix saving datagrid columns.
When we first implemented the datagrids, it was the case that assigning a list value into a TextField would serialize it as a comma-separated list of the values in the list. This is no longer the case, and setting the datagrid columns would end up saving as a list repr, which wasn't parsable when loading the value back out. This change fixes it so we explicitly join the datagrid columns when saving them back to the profile, and adds some unit tests to make sure that saving the columns and sort order work correctly. Testing Done: - Ran unit tests. - Enabled, disabled, and moved some columns around and saw that it got properly saved to the profile.
4752b2b98f43f7faecb9c79678aff2ec900b9c79
Description From Last Updated

'typing.Optional' imported but unused Column: 1 Error code: F401

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Discarded

Loading...