Fix a regression in loading/storing datagrid column settings.

Review Request #13502 — Created Jan. 11, 2024 and submitted

Information

Djblets
release-3.x

Reviewers

The work done to add typing to datagrids regressed the storage of
datagrid columns. We were converting a comma-separated string of column
names to a list of strings for processing, but then later comparing that
to the stored comma-separated string.

This provided a mismatch and caused us to override the stored setting
with a serialized version of that list. However, that was a Python
representation of a list of strings, and not a CSV. On next load, that
was considered invalid, and we'd fall back on the datagrid's defaults.

The regression was never released, but encountered on
https://reviews.reviewboard.org.

This change fixes this, retaining colnames as a CSV and instead using
a separate variable for the normalized list for processing. It also
fixes a typo in the typed profile_columns_field name, and adds unit
tests.

Unit tests pass.

Manually tested column customization and sorting, verifying that my
changes persisted.

Summary ID
Fix a regression in loading/storing datagrid column settings.
The work done to add typing to datagrids regressed the storage of datagrid columns. We were converting a comma-separated string of column names to a list of strings for processing, but then later comparing that to the stored comma-separated string. This provided a mismatch and caused us to override the stored setting with a serialized version of that list. However, that was a Python representation of a list of strings, and not a CSV. On next load, that was considered invalid, and we'd fall back on the datagrid's defaults. The regression was never released, but encountered on https://reviews.reviewboard.org. This change fixes this, retaining `colnames` as a CSV and instead using a separate variable for the normalized list for processing. It also fixes a typo in the typed `profile_columns_field` name, and adds unit tests.
ae550017c337a627e5d1549ae3b464d2937c346d
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.x (5e2fecd)
Loading...