Skip to content

Add element to display Javascript errors#68

Open
EtienneDesticourt wants to merge 1 commit intomapbox:masterfrom
EtienneDesticourt:error_handling
Open

Add element to display Javascript errors#68
EtienneDesticourt wants to merge 1 commit intomapbox:masterfrom
EtienneDesticourt:error_handling

Conversation

@EtienneDesticourt
Copy link
Contributor

@EtienneDesticourt EtienneDesticourt commented Mar 12, 2018

Hiya,

As we discussed in the TokenError PR I've implemented a modal element to display Javascript errors in the style of python errors. I'll add another commit to clean up the code & remove whitespace, opening the PR now so we can discuss the next steps.

It looks like this:
modal_error

@ryanbaumann

Perhaps the user could dismiss the modal error, or choose to ignore all future errors if the user checks a box?

Sounds complicated, is it really worth it? The simplest way to do it would be to add a verbose parameter to MapViz, otherwise I'll see if we can register a JS variable in the Jupyter scope since the JS of the cell is regenerated every time it's run.

Also, we probably only want to show some errors from the map here - not all errors. For example, the map could throw a warning when requesting an invalid tile from a valid tileset.

How would you go about distinguishing the errors that need to be displayed as errors, or warnings, or not all? Do they have distinct characteristics (specific word in error message, etc...) in the mapbox.js library?

@astrojuanlu
Copy link

Unfortunately this conflicts now, but it would be great to have! Also #62

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments