-
Notifications
You must be signed in to change notification settings - Fork 382
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
Conversation
-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
-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
I pushed to staging to try it out. Good progress!
|
-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
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. |
// Use the FIRST item in the array as the representative, | ||
// with its comment indicating the size of the array |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice.
There was a problem hiding this comment.
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" /> |
There was a problem hiding this comment.
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..
// 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. |
There was a problem hiding this comment.
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.
if (UserRegistry.userIsTC(user)) { | ||
choiceSet.remove(NotificationCategory.abstained); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
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) { |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
-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
ALLOW_MANY_COMMITS=true