Closed mattrosno closed 2 years ago
Hey team! Please add your planning poker estimate with ZenHub @aubrey-oneal @kingtraceyj
Notes from dev + design discussion:
Convert each category 2 and 3 error into an inline notification with a corrective action. Potentially linking out to an FAQ or help document with common errors and how to resolve them. Where appropriate (and concise), add a related code snippet below the inline notification showing the problematic MDX.
We will strive towards two separate experiences: dev mode and prod mode. In dev mode, all errors will be presented to the user. In prod mode, we will revisit this and decide what makes sense to show on the live website for still-malformed MDX.
For non-recoverable full-page errors, the concept is the same. Show an inline notification at the top of the page with some details about what happened, potentially with a related code snippet if one is available from the output of the MDX parser.
@jdharvey-ibm and @alisonjoseph do you mind sharing some screenshots of a few examples? maybe one of an inline error and then one of a full page error?
@francinelucca may be able to help out with the error texts. At the moment, I don't think we have any UI demonstrating the errors, but we can definitely get you some of the error text we'd expect to get emitted for each type of error.
sample error text would be great!
will gather info and update here by EOD
@kingtraceyj errors:
Component used that is not recognized by the platform (regardless of whether or not it has a corresponding import)
An import (or export) statement being used (we don't allow any) This doesn't show an error but is a security concern that we shouldn't allow
A usage of an imported value someplace in the mdx
Inline styles that are strings instead of objects
Inclusion of HTML comments
General Markdown parsing errors
General JSX parsing errors
When there are remote MDX errors, how do we handle those in the page? For example:
Joe's Notes
Possible Errors
Options
Consolidated error categories for design consideration