ui/ux improvement
This commit is contained in:
@@ -85,8 +85,19 @@ export class ErrorBoundary extends Component<Props, State> {
|
||||
{isStale ? 'This page was updated while you were working' : `Something on ${area} failed to render`}
|
||||
</h2>
|
||||
<p style={{ margin: '0 0 16px', fontSize: 14, lineHeight: 1.6, color: '#5C4747' }}>
|
||||
{/*
|
||||
In DEVELOPMENT nothing was deployed, and saying so sends a developer
|
||||
looking for a release that never happened. The same failure has a
|
||||
different cause here: the dev server restarted, or Vite re-optimised
|
||||
its dependencies after a config change, and either invalidates the
|
||||
module URLs this tab is holding. Same fix, different sentence —
|
||||
`import.meta.env.DEV` is compiled out of the production bundle, so
|
||||
this costs a deployed console nothing.
|
||||
*/}
|
||||
{isStale
|
||||
? 'A new version of the console was deployed, so the file this tab was about to load no longer exists. Nothing is wrong with your data — reloading picks up the current version.'
|
||||
? import.meta.env.DEV
|
||||
? 'The dev server restarted or re-optimised its dependencies, so the module URL this tab was holding no longer resolves. Nothing is wrong with your code — reloading picks up the current module graph.'
|
||||
: 'A new version of the console was deployed, so the file this tab was about to load no longer exists. Nothing is wrong with your data — reloading picks up the current version.'
|
||||
: 'The rest of the console is fine — this is one screen, not the whole app. The message below is what broke, and the full stack is in the browser console.'}
|
||||
</p>
|
||||
<pre
|
||||
@@ -109,7 +120,10 @@ export class ErrorBoundary extends Component<Props, State> {
|
||||
onClick={isStale ? this.reload : this.reset}
|
||||
style={{
|
||||
padding: '9px 18px',
|
||||
borderRadius: 999,
|
||||
/* The same corner as every other control on the console. A stadium
|
||||
here made the one button a person sees on a broken screen the one
|
||||
button shaped unlike the rest of the product. */
|
||||
borderRadius: 'var(--card-radius-sm, 10px)',
|
||||
border: '1px solid #D9C0C0',
|
||||
background: '#FFFFFF',
|
||||
fontSize: 14,
|
||||
|
||||
Reference in New Issue
Block a user