Modernize RB.DiffFragmentQueue and RB.DataUtils.
Review Request #14098 — Created Aug. 9, 2024 and updated — Latest diff uploaded
This change converts the old
RB.DiffFragmentQueueView
to TypeScript,
along with the DataUtils methods which it uses. This involves several
pieces:
- Changed the queue to not inherit from a Backbone view. This doesn't
actually do any view things, it's purely an orchestration class. - Renamed it to
DiffFragmentQueue
and moved into a utils/ directory. - Updated the
DataUtils
methods to return promises for their results,
and marked the callback function parameters as deprecated. - Rewrote the fragment loading to use promises and async/await instead
of$.funcQueue
, andfetch
instead of$.ajax
.
- Ran js-tests.
- Opened a review request with a bunch of diff comments and saw all the
diff comment fragments load correctly. - Opened the review dialog with a bunch of pending diff comments and saw
all the diff comment fragments load correctly. - Expanded sections of the diff for the reviews and review dialogs.