getodk / getodk/central

Render links for XLSForm error URLs

Open
#775 0 comments 0 reactions 0 assignees View on GitHub
frontend
Dominant language
JavaScript
Stars
226
Forks
235
Avg merge
2d 22h
Merged PRs (30d)
19

Description

Now that we have resolved getodk/central-frontend#687, Frontend will render a link for an XLSForm warning ending with "Learn more: [some URL]". It would be great if we could do the same thing for an XLSForm error. For example:

![Screenshot](https://user-images.githubusercontent.com/5970131/214920769-3546e41e-7cc0-4837-a245-ede80015fb9d.png)

It's not easy to take the same approach here as we did for getodk/central-frontend#687 because right now, the `FormNew` component doesn't itself render the error. Instead, `this.request()` in `FormNew` shows the alert by using the `alert` object in the container, which causes the `Alert` component in the `Modal` component to be shown. The only role that `FormNew` plays is extracting the error message from the `details` property of the Problem response and prefixing it with the string "The XLSForm could not be converted:". It does that using the `problemToAlert` option passed to `this.request()`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.