Skip to content

revise recent projects flow to be less confusing #464

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

Merged
merged 11 commits into from
Aug 19, 2024
Prev Previous commit
Next Next commit
re-add wrapping to description label
  • Loading branch information
bcpeinhardt committed Aug 16, 2024
commit cc07facc8e84d27bcfd4d4e7674fe4a6e141fbe8
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,14 @@ class CoderGatewayRecentWorkspaceConnectionsView(private val setContentCallback:
val workspaceWithAgent = deployment?.items?.firstOrNull { it.workspace.name == workspaceName }
val status =
if (deploymentError != null) {
Triple(UIUtil.getBalloonErrorIcon(), UIUtil.getErrorForeground(), deploymentError)
Pair(UIUtil.getErrorForeground(), deploymentError)
} else if (workspaceWithAgent != null) {
Triple(
workspaceWithAgent.status.icon,
Pair(
workspaceWithAgent.status.statusColor(),
workspaceWithAgent.status.description,
)
} else {
Triple(AnimatedIcon.Default.INSTANCE, UIUtil.getContextHelpForeground(), "Querying workspace status...")
Pair(UIUtil.getContextHelpForeground(), "Querying workspace status...")
}
val gap =
if (top) {
Expand Down Expand Up @@ -210,7 +209,9 @@ class CoderGatewayRecentWorkspaceConnectionsView(private val setContentCallback:
if (inLoadingState) {
icon(AnimatedIcon.Default())
}
label(workspaceWithAgent?.status?.description.orEmpty())
label("<html><body style='width:350px;'>" + status.second + "</html>").applyToComponent {
foreground = status.first
}
}

row {
Expand Down
Loading