Skip to content

[dashboard] add notice for stable back and change latest desc #9293

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 1 commit into from
Apr 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/dashboard/src/start/StartPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export function StartPage(props: StartPageProps) {
{props.children}
{props.showLatestIdeWarning && (
<Alert type="warning" className="mt-4 w-96">
You are using the latest release (unstable) for the editor.{" "}
This workspace is configured with the latest release (unstable) for the editor.{" "}
<a className="gp-link" target="_blank" href={gitpodHostUrl.asPreferences().toString()}>
Change Preferences
</a>
Expand Down
16 changes: 15 additions & 1 deletion components/dashboard/src/start/StartWorkspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { watchHeadlessLogs } from "../components/PrebuildLogs";
import { getGitpodService, gitpodHostUrl } from "../service/service";
import { StartPage, StartPhase, StartWorkspaceError } from "./StartPage";
import ConnectToSSHModal from "../workspaces/ConnectToSSHModal";
import Alert from "../components/Alert";
const sessionId = v4();

const WorkspaceLogs = React.lazy(() => import("../components/WorkspaceLogs"));
Expand Down Expand Up @@ -391,6 +392,7 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
let title = undefined;
let statusMessage = !!error ? undefined : <p className="text-base text-gray-400">Preparing workspace …</p>;
const contextURL = ContextURL.getNormalizedURL(this.state.workspace)?.toString();
const useLatest = !!this.state.workspaceInstance?.configuration?.ideConfig?.useLatest;

switch (this.state?.workspaceInstance?.status.phase) {
// unknown indicates an issue within the system in that it cannot determine the actual phase of
Expand Down Expand Up @@ -524,6 +526,19 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
{openLinkLabel}
</button>
</div>
{!useLatest && (
<Alert type="info" className="mt-4 w-96">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: Go w-96! Loving this width size.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought: This is out of the scope of this PR but in the future we could probably introduce better breakpoints in general within the dashboard so that a) components like this expand with the container width and b) do not need to use a fixed width attribute.

However, that's minor for now and the effort/impact of doing this sounds low, but probably something to consider when we pick up #4050 for improving the responsive layout of the dashboard. Cc @jankeromnes as we've talked about this a couple of times.

You can change the default editor for opening workspaces in{" "}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought: This alert could become obsolete or less useful so we could remove it in the future if the actions were clearer like in #6910 or more flexiible as seen in the design exploration mentioned in #8783 (comment). Re-posting the design exploration for visibility. Feedback is always welcome!

dropdown

<a
className="gp-link"
target="_blank"
href={gitpodHostUrl.asPreferences().toString()}
>
user preferences
</a>
.
</Alert>
)}
{this.state.isSSHModalVisible === true && this.state.ownerToken && (
<ConnectToSSHModal
workspaceId={this.props.workspaceId}
Expand Down Expand Up @@ -626,7 +641,6 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
);
break;
}
const useLatest = !!this.state.workspaceInstance?.configuration?.ideConfig?.useLatest;
return (
<StartPage phase={phase} error={error} title={title} showLatestIdeWarning={useLatest}>
{statusMessage}
Expand Down