-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add last known good rendering of card in error state to stack item #1834
Add last known good rendering of card in error state to stack item #1834
Conversation
Host Test Results 1 files ±0 1 suites ±0 19m 59s ⏱️ +36s Results for commit af119a7. ± Comparison against base commit 9d3f8f8. This pull request removes 2 and adds 4 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
…olated-card-rendering-for-stack-items-in-an
packages/host/app/components/operator-mode/interact-submode.gts
Outdated
Show resolved
Hide resolved
@@ -46,6 +46,9 @@ export class StackBackgroundsResource extends Resource<Args> { | |||
} | |||
let bottomMostStackItem = stack[0]; | |||
await bottomMostStackItem.ready; | |||
if (bottomMostStackItem.cardError) { | |||
return undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it impossible to know what realm an error doc is from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I’ll look into it. Presumably some realm is returning the error response. Perhaps it’s a header? If so we’ll have to refactor how the stack item calculates the realm, as right now I does so from a running card.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it makes sense for the error doc to carry the realm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in 64e950c
…olated-card-rendering-for-stack-items-in-an
Co-authored-by: Luke Melia <luke@lukemelia.com>
…instrumented error responses)
This PR adds the last known good rendering of a card in an error state for a stack item. In the case there is no last known good HTML, we'll show a generic message.
Note that this does not yet support live updates into and out of an error state. that will come in a subsequent PR.
This is the view for a card without a last known good state: