Comment serialization cleanup part 3: Move serializedFields to base.

Review Request #13657 — Created March 21, 2024 and submitted — Latest diff uploaded

Information

Review Board
release-7.x

Reviewers

This is step 3 of the comment serialization cleanup. The way that diff
comments are serialized/deserialized is very different from the way that
file attachment comments are handled. For file attachment comments (and
screenshot comments), we automatically pull out several keys from the
first comment in each block's serialized comment array using the block
model's serializedFields list.

Diff comments currently use a very different format, and are
deserialized differently. A later change will update the diff comments
to use the same serialization style as attachment/screenshot comments.
This change prepares for that by moving the serializedFields list down
from FileAttachmentCommentBlock into AbstractCommentBlock.

Ran js-tests.

Diff Revision 2

This is not the most recent revision of the diff. The latest diff is revision 3. See what's changed.

orig
1
2
3

Commits

First Last Summary ID Author
Comment serialization cleanup part 3: Move serializedFields to base.
This is step 3 of the comment serialization cleanup. The way that diff comments are serialized/deserialized is very different from the way that file attachment comments are handled. For file attachment comments (and screenshot comments), we automatically pull out several keys from the first comment in each block's serialized comment array using the block model's `serializedFields` list. Diff comments currently use a very different format, and are deserialized differently. A later change will update the diff comments to use the same serialization style as attachment/screenshot comments. This change prepares for that by moving the `serializedFields` list down from `FileAttachmentCommentBlock` into `AbstractCommentBlock`. Testing Done: Ran js-tests.
543c250d3db817c04d846fd92a3aeeecda7f6baf David Trowbridge
reviewboard/static/rb/js/reviews/models/abstractCommentBlockModel.ts
reviewboard/static/rb/js/reviews/models/fileAttachmentCommentBlockModel.ts
Loading...