-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: get build status and trigger builds #3529
feat: get build status and trigger builds #3529
Conversation
You can access the deployment of this PR at https://renku-ci-ui-3529.dev.renku.ch |
075a755
to
ed5b564
Compare
cda43c4
to
6fa806d
Compare
6fa806d
to
042c2e9
Compare
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.
Nice addition!
And the code is already great! I dropped a couple of suggestions/questions inline, only minor details.
{isLoading ? ( | ||
<span> | ||
<Loader className="me-1" inline size={16} /> | ||
Loading build status... | ||
</span> | ||
) : error || !builds ? ( | ||
<div> | ||
<p className="mb-0">Error: could not load build status</p> | ||
{error && <RtkOrNotebooksError error={error} dismissible={false} />} | ||
</div> | ||
) : lastBuild == null ? ( | ||
<span className="fst-italic"> | ||
This session environment does not have a build yet. | ||
</span> | ||
) : ( | ||
<div className="d-block"> | ||
<label className={cx("text-nowrap", "mb-0", "me-2")}> | ||
Last build status: | ||
</label> | ||
<span> | ||
<BuildStatusBadge status={lastBuild.status} /> | ||
</span> | ||
</div> | ||
)} |
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.
Question: would it make sense to keep the "label + span" pattern to have more consistency? E.G. always <label>Last build</label>
and then "loading" | "no builds yet" | badge.
Of course, it doesn't apply in the case of an 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.
I am not sure I feel a need for consistency here. For example, we can have this:
This does not look out-of-place to me.
Also, on another note, <label>
outside of a <form>
should be forbidden. <label>
is an HTML element made to label form inputs and not other things. In this case the <dl>
element would be the most fitting (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl).
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'd say consistent is usually better than non-consistent. The content might be easier to parse for users.
However, on the offcanvas, we don't have consistency in other places so this isn't a blocker. Feel free to merge it as-is if you think it's good enough.
Tearing down the temporary RenkuLab deplyoment for this PR. |
PR stack:
Update the UI for session environments created from code repositories.
/deploy #notest renku=build/session-env-builders renku-data-services=kpack-resources renku-notebooks=leafty/shipwright-buildrun-cache extra-values=dataService.imageBuilders.enabled=true,dataService.imageBuilders.pushSecretName=flora-docker-secret,dataService.imageBuilders.buildRunRetentionAfterFailedSeconds=86400,dataService.imageBuilders.outputImagePrefix=harbor.dev.renku.ch/flora-dev/