Skip to content

[Dashboard] Start ws for recently used repos #3539

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
Mar 23, 2021

Conversation

svenefftinge
Copy link
Member

This PR adds the possibility to start fresh workspaces for recently used repositories from the dashboard.

fixes #3534

@svenefftinge svenefftinge requested a review from gtsiolis March 22, 2021 20:32
@svenefftinge svenefftinge force-pushed the sefftinge/dashboard-start-project-3534 branch from 085fdac to 17e546a Compare March 22, 2021 20:33
@svenefftinge
Copy link
Member Author

svenefftinge commented Mar 22, 2021

/werft run

👍 started the job as gitpod-build-sefftinge-dashboard-start-project-3534.3

@svenefftinge
Copy link
Member Author

svenefftinge commented Mar 23, 2021

/werft run

👍 started the job as gitpod-build-sefftinge-dashboard-start-project-3534.4

@gtsiolis
Copy link
Contributor

gtsiolis commented Mar 23, 2021

Looking at this now! 👀

@gtsiolis
Copy link
Contributor

gtsiolis commented Mar 23, 2021

/werft run

👍 started the job as gitpod-build-sefftinge-dashboard-start-project-3534.5

@svenefftinge
Copy link
Member Author

svenefftinge commented Mar 23, 2021

/werft run

👍 started the job as gitpod-build-sefftinge-dashboard-start-project-3534.6

Copy link
Contributor

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

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

Looks great! Added some comments, let me know if anyone feels suboptimal so we can discuss is separate follow up issues. 🏓

@@ -131,30 +135,56 @@ export class Workspaces extends React.Component<WorkspacesProps, WorkspacesState
<div className="px-6 py-3 flex justify-between space-x-2 text-sm text-gray-400 border-t border-gray-200 h-96">
<div className="flex flex-col items-center w-96 m-auto">
<h3 className="text-center pb-3">No Active Workspaces</h3>
<div className="text-center pb-6 text-gray-500">Prefix a git repository URL with gitpod.io/# or open a workspace template. <a className="text-gray-400 underline underline-thickness-thin underline-offset-small hover:text-gray-600" href="https://www.gitpod.io/docs/getting-started/">Learn how to get started</a></div>
<button onClick={toggleTemplateModal} className="font-medium">Select Template</button>
<div className="text-center pb-6 text-gray-500">Prefix any git repository URL with gitpod.io/# or start a workspace for a recently used project. <a className="text-gray-400 underline underline-thickness-thin underline-offset-small hover:text-gray-600" href="https://www.gitpod.io/docs/getting-started/">Learn how to get started</a></div>
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 still missing a reference to the examples but let's leave the prefix action lead here and improve this in a later iteration.

<h3 className="pb-2">Start Workspace</h3>
{/* separator */}
<div className="border-t mt-2 -mx-6 px-6 pt-2">
<div className="flex mt-4">
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: Remove unessasary padding.

Suggested change
<div className="flex mt-4">
<div className="flex">

function Tab(p: { name: Mode, selection: Mode, setSelection: (selection: Mode) => any }) {
const selectedTab = 'border-gray-800 text-gray-800';
const inactiveTab = 'border-none text-gray-400';
return <div onClick={() => p.setSelection(p.name)} className={"cursor-pointer py-2 px-4 border-b-4 " + (p.selection === p.name ? selectedTab : inactiveTab)}>{p.name}</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

issue: Nooooo! There's no border-b-6 but only border-b-4 and border-b-8. That's fine but 6 is being used in so many places (radius, spacing, etc). Let's leave this as border-b-4 for now and customize in the later iteration. 😇

@@ -131,30 +135,56 @@ export class Workspaces extends React.Component<WorkspacesProps, WorkspacesState
<div className="px-6 py-3 flex justify-between space-x-2 text-sm text-gray-400 border-t border-gray-200 h-96">
<div className="flex flex-col items-center w-96 m-auto">
<h3 className="text-center pb-3">No Active Workspaces</h3>
<div className="text-center pb-6 text-gray-500">Prefix a git repository URL with gitpod.io/# or open a workspace template. <a className="text-gray-400 underline underline-thickness-thin underline-offset-small hover:text-gray-600" href="https://www.gitpod.io/docs/getting-started/">Learn how to get started</a></div>
<button onClick={toggleTemplateModal} className="font-medium">Select Template</button>
<div className="text-center pb-6 text-gray-500">Prefix any git repository URL with gitpod.io/# or start a workspace for a recently used project. <a className="text-gray-400 underline underline-thickness-thin underline-offset-small hover:text-gray-600" href="https://www.gitpod.io/docs/getting-started/">Learn how to get started</a></div>
Copy link
Contributor

Choose a reason for hiding this comment

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

thought: While having more descriptive help links is absolutely fine, let's change this to Learn more which is commonly used across the product for now, to have a better balance in how text renders and avoid breaking this link into multiple lines.

Suggested change
<div className="text-center pb-6 text-gray-500">Prefix any git repository URL with gitpod.io/# or start a workspace for a recently used project. <a className="text-gray-400 underline underline-thickness-thin underline-offset-small hover:text-gray-600" href="https://www.gitpod.io/docs/getting-started/">Learn how to get started</a></div>
<div className="text-center pb-6 text-gray-500">Prefix any git repository URL with gitpod.io/# or start a workspace for a recently used project. <a className="text-gray-400 underline underline-thickness-thin underline-offset-small hover:text-gray-600" href="https://www.gitpod.io/docs/getting-started/">Learn more</a></div>

{list.length > 0 ? list :
(selection === 'Recent' ?
<div className="flex flex-col pt-12 items-center px-2">
<h3 className="mb-2">No Recent Projects</h3>
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Empty state headings should not use as dark text as the page heading.

Suggested change
<h3 className="mb-2">No Recent Projects</h3>
<h3 className="mb-2 text-gray-500">No Recent Projects</h3>

{list.length > 0 ?
<p className="mt-1 mb-2 text-base">
{selection === 'Recent' ?
'Create a new workspace using the default branch.' :
Copy link
Contributor

Choose a reason for hiding this comment

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

issue: Removing the frequency reference makes it unclear what pops up in this list when it's populated with items. It's also fine as is. Your call. 📞

Suggested change
'Create a new workspace using the default branch.' :
'Create a new workspace using the default branch for frequently used projects.' :

Copy link
Member Author

Choose a reason for hiding this comment

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

The tab is called 'Recent' I think that's good enough and would like to avoid diluting the important information that you are starting from the default branch with additional wording.

Copy link
Contributor

Choose a reason for hiding this comment

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

DEAL

<p className="mt-1 mb-2 text-base">
{selection === 'Recent' ?
'Create a new workspace using the default branch.' :
'Select an example to start a new workspace.'}
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: Sounds good. Adding an alternartive according to the specs. Feel free to leave as is. Your call. 📞

Suggested change
'Select an example to start a new workspace.'}
'Create a new workspace using one of the example projects below.'}

@@ -85,6 +85,10 @@ export class Workspaces extends React.Component<WorkspacesProps, WorkspacesState
onClick: () => { if (wsModel) wsModel.limit = 200; }
}]} />
</div>
{wsModel && this.state?.workspaces.length > 0 ?
<button onClick={toggleStartWSModal} className="ml-2 font-medium">Start Workspace</button>
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Same as with the button on the empty state.

Suggested change
<button onClick={toggleStartWSModal} className="ml-2 font-medium">Start Workspace</button>
<button onClick={toggleStartWSModal} className="ml-2 font-medium">New Workspace</button>

<div className="text-center pb-6 text-gray-500">Prefix a git repository URL with gitpod.io/# or open a workspace template. <a className="text-gray-400 underline underline-thickness-thin underline-offset-small hover:text-gray-600" href="https://www.gitpod.io/docs/getting-started/">Learn how to get started</a></div>
<button onClick={toggleTemplateModal} className="font-medium">Select Template</button>
<div className="text-center pb-6 text-gray-500">Prefix any git repository URL with gitpod.io/# or start a workspace for a recently used project. <a className="text-gray-400 underline underline-thickness-thin underline-offset-small hover:text-gray-600" href="https://www.gitpod.io/docs/getting-started/">Learn how to get started</a></div>
<button onClick={toggleStartWSModal} className="font-medium">Start Workspace</button>
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Using a similar voice and tone as the rest of the product sounds good. WDYT?

Suggested change
<button onClick={toggleStartWSModal} className="font-medium">Start Workspace</button>
<button onClick={toggleStartWSModal} className="font-medium">New Workspace</button>

@@ -85,6 +85,10 @@ export class Workspaces extends React.Component<WorkspacesProps, WorkspacesState
onClick: () => { if (wsModel) wsModel.limit = 200; }
}]} />
</div>
{wsModel && this.state?.workspaces.length > 0 ?
Copy link
Contributor

Choose a reason for hiding this comment

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

praise: Thanks for hiding this when the list is empty! 🎖️

@svenefftinge svenefftinge force-pushed the sefftinge/dashboard-start-project-3534 branch from 17e546a to 1dbb932 Compare March 23, 2021 15:58
@svenefftinge svenefftinge force-pushed the sefftinge/dashboard-start-project-3534 branch from 1dbb932 to 61f0165 Compare March 23, 2021 15:59
@svenefftinge
Copy link
Member Author

svenefftinge commented Mar 23, 2021

/werft run

👍 started the job as gitpod-build-sefftinge-dashboard-start-project-3534.9

@svenefftinge svenefftinge merged commit 376ea27 into main Mar 23, 2021
@svenefftinge svenefftinge deleted the sefftinge/dashboard-start-project-3534 branch March 23, 2021 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Dashboard] Start Project
2 participants