Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLDR-17658 Improve Dashboard performance and UI; work in progress #3752

Merged
merged 5 commits into from
May 29, 2024

Conversation

btangmu
Copy link
Member

@btangmu btangmu commented May 24, 2024

-For now, change only the front end, except for enabling Abstain for TC

-Abstain for TC is hidden (unchecked) by default

-Combine notifications in certain categories so that there is not more than one per page

-For now, apply this to only the Abstained category (not Missing); easy to change which categories are affected

-Add unit test

-Try to fix delayed visibility of checkbox click; alternatives and debugging for catCheckmarkChanged

-Remove delay from a-spin pending solution to delayed visibility of checkbox click

-Add Vue version to the About page; bugs may depend on Vue version

CLDR-17658

  • This PR completes the ticket.

ALLOW_MANY_COMMITS=true

-For now, change only the front end

-Combine notifications in certain categories so that there is not more than one per page

-For now, apply this to both Missing and Abstained categories; easy to change which categories are affected

-Try to fix delayed visibility of checkbox click; alternatives and debugging for catCheckmarkChanged

-Remove delay from a-spin pending solution to delayed visibility of checkbox click

-Add Vue version to the About page; bugs may depend on Vue version
@btangmu btangmu self-assigned this May 24, 2024
-For now, change only the front end

-Combine notifications in certain categories so that there is not more than one per page

-For now, apply this to both Missing and Abstained categories; easy to change which categories are affected

-Try to fix delayed visibility of checkbox click; alternatives and debugging for catCheckmarkChanged

-Remove delay from a-spin pending solution to delayed visibility of checkbox click

-Add Vue version to the About page; bugs may depend on Vue version
@macchiati
Copy link
Member

I pushed to staging to try it out. Good progress!

  • MUCH more responsive when there are many abstained!
  • Logged in as a TC, I still don't see Abstained label (minor, but we wanted to fix this now that TCs wouldn't be overwhelmed by Abstained items)
  • When I voted on an item, the Abstained dashboard row disappeared. But there were still Abstaineds on that page, and the Dashboard row it wasn't replaced by another Abstained dashboard row on that page, even after closing and opening the dashboard. [I'm guessing that that is a WIP. We were thinking of having a Dashboard row with just Section-Page that always goes to the first Abstained on the Page, but it is simpler to always just replace the one voted on by the next in the page (keeping the details of header and code, that would be fine.]

-For now, change only the front end, except for enabling Abstain for TC

-Abstain for TC is hidden (unchecked) by default

-Combine notifications in certain categories so that there is not more than one per page

-For now, apply this to both Missing and Abstained categories; easy to change which categories are affected

-Try to fix delayed visibility of checkbox click; alternatives and debugging for catCheckmarkChanged

-Remove delay from a-spin pending solution to delayed visibility of checkbox click

-Add Vue version to the About page; bugs may depend on Vue version
-For now, change only the front end, except for enabling Abstain for TC

-Abstain for TC is hidden (unchecked) by default

-Combine notifications in certain categories so that there is not more than one per page

-For now, apply this to both Missing and Abstained categories; easy to change which categories are affected

-Try to fix delayed visibility of checkbox click; alternatives and debugging for catCheckmarkChanged

-Remove delay from a-spin pending solution to delayed visibility of checkbox click

-Add Vue version to the About page; bugs may depend on Vue version
-For now, change only the front end, except for enabling Abstain for TC

-Abstain for TC is hidden (unchecked) by default

-Combine notifications in certain categories so that there is not more than one per page

-For now, apply this to both Missing and Abstained categories; easy to change which categories are affected

-Add unit test

-Try to fix delayed visibility of checkbox click; alternatives and debugging for catCheckmarkChanged

-Remove delay from a-spin pending solution to delayed visibility of checkbox click

-Add Vue version to the About page; bugs may depend on Vue version
@btangmu
Copy link
Member Author

btangmu commented May 28, 2024

As discussed in infra meeting, I'm making this ready for review in spite of remaining problems. The dashboard doesn't update properly after voting. A work-around may be to refresh the dashboard frequently using the "↻" button.

@btangmu btangmu requested review from srl295 and macchiati May 28, 2024 19:41
Comment on lines +93 to +94
// Use the FIRST item in the array as the representative,
// with its comment indicating the size of the array
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be able to sort by section+code (if it's currently unsorted?) to get the lowest code. which should correspond to the 'highest' (visually) item. For future

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there's a ticket already: https://unicode-org.atlassian.net/browse/CLDR-15648

In the meantime, the complete (all-path) dashboard json response is sorted, however, after voting on a path, there's a miniature dash response for that path alone, and then the front end doesn't always know where to insert it...

<tr>
<td class="aboutKey">Vue version</td>
<td>
<span class="aboutValue">{{ vueVersion }}</span>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wonder if there's a way to get antdv versions

@@ -75,7 +75,8 @@
</header>
<section id="DashboardScroller" class="sidebyside-scrollable">
<template v-if="updatingVisibility">
<a-spin delay="1000" size="large" />
<!-- for unknown reason, the a-spin fails to appear on current Chrome/Firefox if any :delay is specified here -->
<a-spin size="large" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still couldn't repro this. but, the logistics of this update are pretty odd..

Comment on lines +378 to +389
// setTimeout is intended to solve a weakness in the Vue implementation: if the number of
// notifications is large, the checkbox in the header can take a second or even a minute
// to change its visible state in response to the user's click, during which time
// the user may click again thinking the first click wasn't recognized. Postponing
// the DOM update of thousands of rows ensures that the header checkbox updates
// the DOM update of thousands of rows should help ensure that the header checkbox updates
// without delay.
this.updatingVisibility = true;
setTimeout(
() => this.updateVisibility(event.target.checked, category),
0
// Also the booleans catCheckboxIsUnchecked and catIsHidden are distinct in order for
// the checkbox itself to update immediately even if the rows for the corresponding
// category may take a long time to update.
// Unfortunately, neither of these mechanisms seems guaranteed to prevent a very very
// long delay between the time the user clicks the checkbox and the time that the checkbox
// changes its state.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't say it's a weakness in Vue itself but a weakness in our usage of the order of 10k DOM objects.

Comment on lines -242 to -244
if (UserRegistry.userIsTC(user)) {
choiceSet.remove(NotificationCategory.abstained);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@macchiati macchiati merged commit 8f99ed9 into unicode-org:main May 29, 2024
11 checks passed
@macchiati
Copy link
Member

Just got back to this; merging since Steven reviewed

// is temporarily removed then added back, and in this case it may belong
// at the start of the array, not the end.
// Reference: https://unicode-org.atlassian.net/browse/CLDR-17658
if (this.updatingPath) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: this.updatingPath is always false here, because here "this" = dashData (as intended), but below when this.updatingPath is set to true, "this" = cldrDash

@@ -334,6 +452,7 @@ function convertData(json) {
* containing notifications for a single path (old format)
*/
function updatePath(dashData, json) {
this.updatingPath = true;
Copy link
Member Author

@btangmu btangmu May 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug here: "this" = cldrDash NOT dashData

It should be dashData.updatingPath, though it still might not work right; still work in progress

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FIxing that bug still doesn't make update work right; still working on it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: the "this" bug was fixed in #3777

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants