-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[dashboard] Adjust Prebuild and Project Configurator pages to spec #5474
Conversation
0bcb74f
to
15ec7bf
Compare
/werft run with-clean-slate-deployment 👍 started the job as gitpod-build-jx-fix-prebuild-page.8 |
f2f16d6
to
f68e1ed
Compare
191f19f
to
210fd75
Compare
b629234
to
eaeb191
Compare
eaeb191
to
bf7945e
Compare
bf7945e
to
318b863
Compare
318b863
to
8620c38
Compare
/approve |
8620c38
to
1ffda4b
Compare
…from GitLab/GitHub
…tional for server.triggerPrebuild()
…ver.triggerPrebuild() Also adjust config precedence: - Git-based config > Project DB config > guess config
c6be8a8
to
12afee9
Compare
Looking at this now! 👀 |
Many thanks! 🙏 (Please beware, the PR is currently being re-deployed -- this may cause a brief outage, but shouldn't reset your data or anything you've tested.) |
That's my favorite way of reviewing a PR. 🙈 |
/approve /hold (because of the question on the |
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.
One step closer to shipping Teams & Projects! 3️⃣ 2️⃣ 1️⃣ 🚀
Thanks for adding this @jankeromnes! 🏀
@@ -385,7 +385,7 @@ export default function NewProject() { | |||
|
|||
return (<div className="flex flex-col w-96 mt-24 mx-auto items-center"> | |||
<h1>New Project</h1> | |||
<p className="text-gray-500 text-center text-base">Select a git repository on <strong>{provider}</strong>.</p> | |||
<p className="text-gray-500 text-center text-base">Select a git repository on <strong>{provider}</strong>. (<a className="gp-link cursor-pointer" onClick={() => setShowGitProviders(true)}>change</a>)</p> |
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.
praise: Thanks for making this more visible!
@@ -385,7 +385,7 @@ export default function NewProject() { | |||
|
|||
return (<div className="flex flex-col w-96 mt-24 mx-auto items-center"> | |||
<h1>New Project</h1> | |||
<p className="text-gray-500 text-center text-base">Select a git repository on <strong>{provider}</strong>.</p> | |||
<p className="text-gray-500 text-center text-base">Select a git repository on <strong>{provider}</strong>. (<a className="gp-link cursor-pointer" onClick={() => setShowGitProviders(true)}>change</a>)</p> |
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.
suggestion: I think using just the verb change could go unoticed and confuse some users. Following the discussion in #5120 (comment) and the second iteration of the designs for repository selection in #4948, we could use a more verbose message here or below the repositories list. What do you think?
Approach A | Approach B | Second iteration for repository selection |
---|---|---|
![]() |
![]() |
![]() |
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.
Filed as #5524
@@ -166,23 +164,25 @@ export default function () { | |||
</Suspense> | |||
{isDetecting && <div className="absolute h-full w-full bg-gray-100 dark:bg-gray-700 flex items-center justify-center space-x-2"> | |||
<img className="h-5 w-5 animate-spin" src={isDark ? SpinnerDark : Spinner} /> | |||
<span className="font-semibold text-gray-400">Detecting project type ...</span> | |||
<span className="font-semibold text-gray-400">Detecting project configuration ...</span> |
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.
praise: Thanks for changing this! New message makes more sense for loading an existing project with a git based configuration.
@@ -166,23 +164,25 @@ export default function () { | |||
</Suspense> | |||
{isDetecting && <div className="absolute h-full w-full bg-gray-100 dark:bg-gray-700 flex items-center justify-center space-x-2"> | |||
<img className="h-5 w-5 animate-spin" src={isDark ? SpinnerDark : Spinner} /> | |||
<span className="font-semibold text-gray-400">Detecting project type ...</span> | |||
<span className="font-semibold text-gray-400">Detecting project configuration ...</span> |
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: This is taking noticeably more time sometimes, like 4-5 seconds or more when there's no git based configuration. Expected?
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.
Yes, I think we should look if we can do that ahead of time.
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.
We could also probably optimize the "config inferrer": It currently makes repository requests one by one (e.g. "does a yarn.lock
file exist? Oh... does a cargo.toml
file exist? Oh... etc.)
Fetching the entire repo structure (not necessarily file content or history) in one go, and using that to respond to the "config inferrer"'s queries would already be a huge performance boost.
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.
Now tracked as #5527
</div>; | ||
details = <div className="flex space-x-1 items-center text-gray-400"> | ||
<img className="h-4 w-4 filter-grayscale" src={StatusRunning} /> | ||
<span>{!!props.prebuildInstance?.stoppedTime |
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.
issue: This is currently showing duration as seconds like 5s
but this could look confusing when showing time duration longer than a minute. For example, 306s
. Ideally this could surface time duration for 306s
as like 05:06
as described in the initial specs in #4948 (comment). However, it should be fine to resolve this in a follow up issue. 🏓
5s | 306s |
---|---|
![]() |
![]() |
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.
Filed as #5525
</div>; | ||
} | ||
return <div className="flex flex-col space-y-1 justify-center text-sm font-semibold"> | ||
<div>{status}</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.
praise: Nice! This reminded me of slots in Vue.
</div>; | ||
} | ||
return <div className="flex flex-col space-y-1 justify-center text-sm font-semibold"> | ||
<div>{status}</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: Now that we have proper status updates down here and this component is used as is in the project configurator, wondering if it makes sense to change or remove the status from the header although it could be useful to have the status up there.
If we remove the header instance we'll have to make sure the bottom part of the prebuild output is always visible. Of course, we could leave it as is for now but make sure the designs for both is identical. Alternatively, we could only include the status icon to avoid having duplicated information. What do you think?
BEFORE | AFTER (A) | AFTER (B) |
---|---|---|
![]() |
![]() |
![]() |
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.
Excellent point and proposals! Filed as #5526
@@ -97,12 +95,17 @@ export default function () { | |||
const guessedConfigStringPromise = getGitpodService().server.guessProjectConfiguration(project.id); | |||
const repoConfigString = await getGitpodService().server.fetchProjectRepositoryConfiguration(project.id); | |||
if (repoConfigString) { | |||
// TODO(janx): Link to .gitpod.yml directly instead of just the cloneUrl. | |||
setIsDetecting(false); | |||
setEditorMessage(<EditorMessage type="warning" heading="Configuration already exists in git." message="Run a prebuild or open a new workspace to edit project configuration."/>); |
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.
issue: This is probably out of the scope of these changes but noticed that it takes a while to redirect to the configuration page once you select a team. Is this expected or needed? Cc @AlexTugarev
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.
True, @AlexTugarev noticed a UI freeze, and I did too today. Maybe it's indeed MonacoEditor? (It's loaded lazily in the Configurator, in order not to make the entire dashboard slower)
useEffect(() => { document.title = 'Prebuild — Gitpod' }, []); | ||
|
||
return <> | ||
<Header title={renderTitle()} subtitle={renderSubtitle()} /> | ||
<div className="lg:px-28 px-10 mt-8"> | ||
<div className="h-96 rounded-xl overflow-hidden bg-gray-100 dark:bg-gray-800 flex flex-col"> | ||
<PrebuildLogs workspaceId={prebuild?.info?.buildWorkspaceId}/> | ||
<div className="rounded-xl overflow-hidden bg-gray-100 dark:bg-gray-800 flex flex-col"> |
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.
issue: Could not get any prebuild log output here. Expected? 😭
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.
It took some time the first time I opened it. But I, at last, got logs. I think this is unrelated to this PR.
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.
Yes, sometimes logs don't show up at all ("Error: could not find headless logs for 1234"). Sometimes, they don't show up live, but eventually the entire logs show up after the prebuild is complete.
This morning I also had live logs. It's kind of a shame that this isn't more reliable.
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.
We need to look into it (in a separate PR). Can we merge this? 😁
break; | ||
case 'stopping': // Fall through | ||
case 'stopped': | ||
status = <div className="flex space-x-1 items-center text-green-600"> |
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.
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.
Agreed: The top status is based on the "prebuild" status, while the bottom one is based on the "prebuild workspace instance" status. Normally they should be in sync, but discrepancies can happen during incidents or because of bugs.
LGTM label has been added. Git tree hash: 79a8555afa90a11325b2bb73d460bdaebf992e7a
|
I'd opt to leave it here. I was just using it and didn't have any doubts that it was handy there. It should maybe show what it does (Open workspace on branch |
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.
Such an improvement! 💯 I can feel how all this could be useful 😁
The small nits should be done in small separate PRs. Based on all issues that we assign ourselves before taking them.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AlexTugarev, gtsiolis, jankeromnes, svenefftinge Associated issue: #4423 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Many thanks for the awesome feedback! ❤️ I agree with merging this now, and filing/doing the improvements as follow-ups.
Good point. Like @svenefftinge, I'd prefer keeping it for now, but independently of whether we want to keep it, I believe the link is actually incorrect 😬 (it points to the context URL of the prebuild, which becomes incorrect when you push new commits on top of the branch -- instead, it should probably link to the commit URL instead). /unhold |
It should link to the branch but this needs to be communicated somehow. |
Or, we can still link to the exact (potentially outdated) prebuild by using the commit context URL. But maybe after using it for a bit we'll know more about what's better here. EDIT: Let's move this discussion to this follow-up issue: #5523 |
Aligns the Prebuild & Project Configurator pages with the specs to fix #4423
TODO:
server.triggerPrebuild
to makebranchName
optional (picks the default branch and makes e.g. the Prebuilds page load faster) and return information about the triggered Prebuild (so that we can get the logs after triggering in the Configurator)server.triggerPrebuild
instead of the "manual" prebuild prefix (thus keeping the prebuild/project association)Run Prebuild
button for Git-based configurations in the ConfiguratorRun Prebuild
andNew Workspace
buttons for the Prebuild & Configurator pages, fixes [configuration] Don't suggest/allow starting another prebuild when one is running #5392 and fixes [configurator] Buttons don't do anything #5501Drive-by fixes:
Detecting project type ...
loading screen toDetecting project configuration ...
to be more truthful/uncc