Modernize RB.DiffFragmentQueue and RB.DataUtils.
Review Request #14098 — Created Aug. 9, 2024 and updated
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.
Summary | ID |
---|---|
5f643857a42cb67caff1c32bf3e153accd5935d7 |
Description | From | Last Updated | ||
---|---|---|---|---|
Should be , optional. |
|
|||
Should be , optional. These will apply to the others below. Since they're deprecated, we should also add a Deprecated … |
|
|||
Should this just be interface? |
|
|||
For others, we've been putting the optional entries below the required ones. |
|
|||
Should be , optional. |
|
|||
This should use the as T, format, since <T>var is deprecated. |
|
|||
Can be Record<string, QueuedLoad[]>. |
|
|||
Can be Record<string, string>. |
|
|||
I think it'd be nice to define these as interfaces, so the docs can live with them. |
|
|||
Same with this. |
|
|||
Should use the /* ... */ form. |
|
|||
There are no open issues |
- Commits:
-
Summary ID 654e7c8a9b1c9d46baa150b74c3c921f28f98912 2879bbb3c1234176774d34f01d825d7f62a127f2 - Diff:
-
Revision 2 (+2392 -1810)
Checks run (2 succeeded)
- Change Summary:
-
Use promises in other parts of the code that use DataUtils, and add suppressions to unit tests so we don't get warnings on the console when testing legacy methods.
- Commits:
-
Summary ID 2879bbb3c1234176774d34f01d825d7f62a127f2 5f643857a42cb67caff1c32bf3e153accd5935d7 - Diff:
-
Revision 3 (+2470 -1826)