-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[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
Conversation
085fdac
to
17e546a
Compare
/werft run 👍 started the job as gitpod-build-sefftinge-dashboard-start-project-3534.3 |
/werft run 👍 started the job as gitpod-build-sefftinge-dashboard-start-project-3534.4 |
Looking at this now! 👀 |
/werft run 👍 started the job as gitpod-build-sefftinge-dashboard-start-project-3534.5 |
/werft run 👍 started the job as gitpod-build-sefftinge-dashboard-start-project-3534.6 |
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.
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> |
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.
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"> |
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.
nitpick: Remove unessasary padding.
<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> |
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: 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> |
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.
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.
<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> |
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: Empty state headings should not use as dark text as the page heading.
<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.' : |
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: 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. 📞
'Create a new workspace using the default branch.' : | |
'Create a new workspace using the default branch for frequently used projects.' : |
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.
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.
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.
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.'} |
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.
nitpick: Sounds good. Adding an alternartive according to the specs. Feel free to leave as is. Your call. 📞
'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> |
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: Same as with the button on the empty state.
<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> |
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: Using a similar voice and tone as the rest of the product sounds good. WDYT?
<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 ? |
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 hiding this when the list is empty! 🎖️
17e546a
to
1dbb932
Compare
1dbb932
to
61f0165
Compare
/werft run 👍 started the job as gitpod-build-sefftinge-dashboard-start-project-3534.9 |
This PR adds the possibility to start fresh workspaces for recently used repositories from the dashboard.
fixes #3534