Closed tmeasday closed 1 year ago
If you try to accept changes but you cannot (the build is out of date, or you don't have the right permission, for instance), we currently don't show UI for the error (we just log it to the browser console).
@tmeasday we could do something like this:
addNotification({
id: "chromatic/errorAccepting",
link: "/visual-tests/error",
content: {
headline: "Failed to accept changes",
subHeadline: err.message,
},
icon: {
name: "cross",
color: "red",
},
});
We can define custom page/routes with:
addons.add(PAGE_ID, {
type: types.experimental_PAGE,
url: "/visual-tests",
title: "Visual Tests",
render: () => <div>HELLO</div>,
});
We could use this to display detailed looking error messages/logs from the addon.
I'm not sure if we can format the error better but this is a lot better than nothing.
📦 Published PR as canary version:
0.0.64--canary.84.199e4d8.0
:sparkles: Test out this PR locally via: ```bash npm install @chromaui/addon-visual-tests@0.0.64--canary.84.199e4d8.0 # or yarn add @chromaui/addon-visual-tests@0.0.64--canary.84.199e4d8.0 ```