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

iD validator warnings about EDTF syntax errors are too verbose #715

Open
1ec5 opened this issue Mar 17, 2024 · 0 comments
Open

iD validator warnings about EDTF syntax errors are too verbose #715

1ec5 opened this issue Mar 17, 2024 · 0 comments
Assignees
Labels
bug Something isn't working dates good first issue Good for newcomers ID ux

Comments

@1ec5
Copy link
Member

1ec5 commented Mar 17, 2024

The EDTF syntax validation warning added in OpenHistoricalMap/iD#187 displays the full error message provided by EDTF.js, which in turn comes from Peggy, the parser generator library. This message can be helpful for diagnosing the error in this syntax, but sometimes the error gets way too long and complex to be useful. Moreover, Peggy considers it to be preformatted text, but we’re showing it as formatted text, so all the newlines and whitespace are getting collapsed. For example, this epic novel appears when typing a backslash instead of a slash for interval notation:

Syntax error at line 1 column 1

There are a couple things we could do here:

  • Collapse the detailed error message by default.
  • Format it as preformatted text, though this will cause it to take up even more screen real estate.
  • If EDTF.js provides the error in a more structured form, try to formulate our own error message, which would enable us to translate it too.
  • Just omit this detail. If the column number is difficult to act upon, the warning message could include the current malformed value with the offending character highlighted, sort of like how the validator warning about outdated tags shows an inline diff.

Originally reported by Hidoo in OSM World Discord.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dates good first issue Good for newcomers ID ux
Projects
Status: Todo - Known Path
Development

No branches or pull requests

2 participants