-
Notifications
You must be signed in to change notification settings - Fork 21
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
Expose status_info
in the UI
#332
Expose status_info
in the UI
#332
Conversation
This shouldn't be merged before the companion PR lands on the server side. |
@steff456 I still need to figure out why playwright fails, but is this cool overall? UPD: playwright might be just a flaky test, resolved here: #328. |
@nkaretnikov can you please add a screenshot before the change? In that way it is clearer what's the difference in the UI |
@steff456 #332 (comment) Added before/after. |
cb66efa
to
5408bba
Compare
This now shows an error message in the UI when the environment name is too long for a DB field (longer than 255 characters).
setError({ | ||
message: data.message, | ||
message: e?.data?.message ?? createLabel(undefined, "error"), |
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.
This used to fail because data
was undefined
.
A repro: try to create an environment with 256 a
chars as the env name: 'a' * 256
. This causes a SQL error on the server because the field is only 255 chars long. With this change, the UI now shows an error message.
I'm not adding a "before" screenshot because before it was just showing nothing - same page you have when you click Create. You could also see an uncaught exception in the dev browser console (that's usually opened by pressing f12).
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.
What are the possible error messages that will be displayed here?
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.
e?.data?.message
corresponds to what used to be here before. I think message
is not actually used by the said route, but I would keep it just in case, in case it's changed later. The route on the server is:
api_post_specification
...
return {"status": "ok", "data": {"build_id": build_id}}
Unlike some other routes, it doesn't include the message
field.
The new message is always a generic error message shown on the screenshot above. This is what we do elsewhere as well, so it's consistent.
@steff456 PTAL. Tests now pass, not planning to make more changes. Do not merge this yet. The companion server PR (conda-incubator/conda-store#653) is not reviewed yet. I'll merge this myself when that one is merged. |
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.
I just left a minor comment related to the code. I think this PR first needs approval from @smeragoel to check the design first. This is the first element that will show actual error messages in the UI, so it is important to have a design system for them and also check if we want to have the raw error message displayed.
setError({ | ||
message: data.message, | ||
message: e?.data?.message ?? createLabel(undefined, "error"), |
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.
What are the possible error messages that will be displayed here?
|
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.
No major design changes, approved from my side!
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.
LGTM! Thanks @nkaretnikov
Before we merge, waiting until the companion PR on the server side is approved. |
Companion PR for conda-incubator/conda-store#653