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-17560 Overall Errors #3743

Merged
merged 5 commits into from
May 24, 2024
Merged

Conversation

srl295
Copy link
Member

@srl295 srl295 commented May 22, 2024

CLDR-17560

  • This PR completes the ticket.

  • add new CldrError and OverallErrors components

  • add new REST endpoint for whole-locale-errors

  • remove Report for supplemental data (whole locale errors) and references thereto

  • remove link from info panel to supplemental chart

  • add whole-locale widget to General Info

ALLOW_MANY_COMMITS=true

@srl295 srl295 requested review from macchiati and btangmu May 22, 2024 23:00
@srl295 srl295 self-assigned this May 22, 2024
- add new CldrError and OverallErrors components
- add new REST endpoint for whole-locale-errors
- remove Report for supplemental data (whole locale errors) and references thereto
- remove link from info panel to supplemental chart
- add whole-locale widget to General Info
@srl295 srl295 force-pushed the cldr-17560/overall-errors branch from 4299f78 to 279ce0f Compare May 22, 2024 23:04
@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • tools/cldr-apps/src/main/java/org/unicode/cldr/web/api/VoteAPI.java is different
  • tools/cldr-apps/src/main/java/org/unicode/cldr/web/api/VoteAPIHelper.java is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

@srl295
Copy link
Member Author

srl295 commented May 22, 2024

No output if there's no issue.

Otherwise:

image

@srl295
Copy link
Member Author

srl295 commented May 22, 2024

this is up on staging as of this writing

btangmu
btangmu previously approved these changes May 23, 2024
Copy link
Member

@btangmu btangmu left a comment

Choose a reason for hiding this comment

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

looks good aside from some minor quibbles

@@ -788,11 +788,6 @@ function testsToHtml(tests) {

newHtml += "</p>\n";
}
if (hadEntireLocale) {
Copy link
Member

Choose a reason for hiding this comment

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

this makes hadEntireLocale unused (dead code), so it should be removed above

Copy link
Member Author

Choose a reason for hiding this comment

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

true.


<script>
// import * as cldrLoad from "../esm/cldrLoad.mjs";
// import * as cldrStatus from "../esm/cldrStatus.mjs";
Copy link
Member

Choose a reason for hiding this comment

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

commented-out code should be removed

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch,thanks

tools/cldr-apps/js/src/esm/cldrDash.mjs Outdated Show resolved Hide resolved
tools/cldr-apps/js/package.json Outdated Show resolved Hide resolved
subtypeString() {
return this.status.subtype
.split(/(?=[A-Z])/)
.map((s) => s)
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand, what is the need for .map((s) => s)? Wouldn't the code do the same if that were removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

this was originally a lowercasing function. There's no titlecase in JS.

status: {
type: Object,
// any additional classes
default: "",
Copy link
Member

Choose a reason for hiding this comment

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

should message, subtype and subtypeUrl be declared here? It looks like they're filled in from json from the back end. If that fails for any reason, the front end will throw cryptic errors like undefined subtype... I know we already have a lot of js code that makes this kind of implicit assumption. Still, objects with clearly defined and documented properties would be more ideal. I think status corresponds to back-end CheckCLDR.CheckStatus, and subtype corresponds to CheckCLDR.CheckStatus.Subtype. Comments could help...

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think it will type check here.

},
props: {
status: {
type: Object,
Copy link
Member

Choose a reason for hiding this comment

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

is type an object, or a string? On the back end it's an enum, but in the json it looks very much like a string such as "Warning" -- or am I just totally confused?

Copy link
Member Author

@srl295 srl295 May 23, 2024

Choose a reason for hiding this comment

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

It's an object. In fact it's a serialized CheckStatusSummary.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think we're talking about the same thing... status itself is an object, yes (I wrongly guessed CheckCLDR.CheckStatus but you say CheckStatusSummary and I believe you).

I was referring to status.type. On the back end that's CheckCLDR.CheckStatus.Type, which is an enum, and on the front end it's not an Object, it's a String. So, I think type: Object is wrong, it should be type: String

Copy link
Member Author

Choose a reason for hiding this comment

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

oh, type: here is part of Vue, it's not status.type. See https://vuejs.org/guide/components/props.html compare to:

propE: { 
    type: Number:
    default: 100,
},

Copy link
Member Author

Choose a reason for hiding this comment

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

I could have written:

props: {
    status: Object
}

@srl295
Copy link
Member Author

srl295 commented May 23, 2024

do we want to merge changes to https://unicode-org.atlassian.net/browse/CLDR-17664 before merging this?

@srl295 srl295 marked this pull request as draft May 23, 2024 20:51
@srl295
Copy link
Member Author

srl295 commented May 23, 2024

@btangmu i'm going to make this one draft because it's waiting on some further UI review

@srl295 srl295 requested a review from btangmu May 24, 2024 20:20
@srl295 srl295 marked this pull request as ready for review May 24, 2024 20:21
@srl295 srl295 merged commit c5140cf into unicode-org:main May 24, 2024
11 checks passed
@srl295 srl295 deleted the cldr-17560/overall-errors branch May 24, 2024 20:44
srl295 added a commit that referenced this pull request Jun 3, 2024
- in #3743,  ReportId.supplemental was retired, but it occurs in some user rows
- skip over invalid rows
@srl295 srl295 mentioned this pull request Jun 3, 2024
1 task
srl295 added a commit that referenced this pull request Jun 3, 2024
- in #3743,  ReportId.supplemental was retired, but it occurs in some user rows
- skip over invalid rows
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