-
Notifications
You must be signed in to change notification settings - Fork 3
Specify uri from data in pos-rich-link #136
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
base: main
Are you sure you want to change the base?
Conversation
relations: () => [], | ||
}); | ||
await page.waitForChanges(); | ||
expect(page.root?.shadowRoot?.textContent).toEqual('No matching link found'); |
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.
- Similar to
pos-list
, my reasoning is that the dashboard creator will want in-situ feedback on what is broken. - I did think about throwing an error, but the user would have no way of knowing where the error is.
- The situation is a little different to
pos-list
because the error is caused by data and therefore might be experienced by the dashboard user as well. Ideas are welcome on other ways of elegantly handling the case where no or two many links are found.
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.
Fine for now. We need a general concept for error handling. What comes to my mind is to have a) some error icon in the effected component that shows a summary as tooltip and b) have a global error log with more detais. Ideally one could click on the icon to jump to the error in the detailed log. All this would be a whole new task of course. What you could do is throw a pod-os:error
event addtional, so that global handler can catch it. As you said it may as well be a data (runtime) error and not a build time error.
75868d5
to
2780956
Compare
relations: () => [], | ||
}); | ||
await page.waitForChanges(); | ||
expect(page.root?.shadowRoot?.textContent).toEqual('No matching link found'); |
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.
Fine for now. We need a general concept for error handling. What comes to my mind is to have a) some error icon in the effected component that shows a summary as tooltip and b) have a global error log with more detais. Ideally one could click on the icon to jump to the error in the detailed log. All this would be a whole new task of course. What you could do is throw a pod-os:error
event addtional, so that global handler can catch it. As you said it may as well be a data (runtime) error and not a build time error.
Closes #130
Also closes #132 with new storybook docs
uri
is missing, the component emits an event to receive the active resource.uri
is missing and no resource is received (yet), nothing is displayedrel
is present, then the corresponding link is followed and the resulting resource is displayedrev
is present, then the corresponding link is followed and the resulting resource is displayedpod-os:error
eventspos-list
)pos-resource
Keep a Changelog