getodk/central-frontend

Render links for XLSForm error URLs

Opened this issue · 0 comments

Now that we have resolved #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

It's not easy to take the same approach here as we did for #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().