- Notifications
You must be signed in to change notification settings - Fork927
feat: add a page to showcase the local installation script#16122
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
11 commits Select commitHold shift + click to select a range
430f807
feat: bundle a local version of install.sh, add CLI install page
aslilacd7da927
Merge branch 'main' into lilac/local-cli-install
aslilac6a0d1cb
yaaay
aslilacc64a2ef
fix some tests
aslilacedd2cf3
🧹
aslilace1b4674
hmm
aslilac85c6b17
sure
aslilac1a6b15b
boooook
aslilac2f9c32c
Merge branch 'main' into lilac/local-cli-install
aslilacb35e877
Merge branch 'main' into lilac/local-cli-install-page
aslilac95e8458
tweak design
aslilacFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
2 changes: 1 addition & 1 deletionsite/src/components/CodeExample/CodeExample.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -65,7 +65,7 @@ export const CodeExample: FC<CodeExampleProps> = ({ | ||
</span> | ||
</> | ||
) : ( | ||
code | ||
)} | ||
</code> | ||
9 changes: 8 additions & 1 deletionsite/src/modules/dashboard/Navbar/UserDropdown/UserDropdownContent.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletionssite/src/pages/CliInstallPage/CliInstallPage.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import type { FC } from "react"; | ||
import { Helmet } from "react-helmet-async"; | ||
import { pageTitle } from "utils/page"; | ||
import { CliInstallPageView } from "./CliInstallPageView"; | ||
export const CliInstallPage: FC = () => { | ||
return ( | ||
<> | ||
<Helmet> | ||
<title>{pageTitle("Install the Coder CLI")}</title> | ||
</Helmet> | ||
<CliInstallPageView /> | ||
</> | ||
); | ||
}; | ||
export default CliInstallPage; |
14 changes: 14 additions & 0 deletionssite/src/pages/CliInstallPage/CliInstallPageView.stories.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
import { CliInstallPageView } from "./CliInstallPageView"; | ||
const meta: Meta<typeof CliInstallPageView> = { | ||
title: "pages/CliInstallPage", | ||
component: CliInstallPageView, | ||
}; | ||
export default meta; | ||
type Story = StoryObj<typeof CliInstallPageView>; | ||
const Example: Story = {}; | ||
export { Example as CliInstallPage }; |
78 changes: 78 additions & 0 deletionssite/src/pages/CliInstallPage/CliInstallPageView.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import type { Interpolation, Theme } from "@emotion/react"; | ||
import { CodeExample } from "components/CodeExample/CodeExample"; | ||
import { Welcome } from "components/Welcome/Welcome"; | ||
import type { FC } from "react"; | ||
import { Link as RouterLink } from "react-router-dom"; | ||
export const CliInstallPageView: FC = () => { | ||
const origin = location.origin; | ||
return ( | ||
<div css={styles.container}> | ||
<Welcome>Install the Coder CLI</Welcome> | ||
<p css={styles.instructions}> | ||
Copy the command below and{" "} | ||
<strong css={{ display: "block" }}>paste it in your terminal.</strong> | ||
</p> | ||
<CodeExample | ||
css={{ maxWidth: "100%" }} | ||
data-chromatic="ignore" | ||
code={`curl -fsSL ${origin}/install.sh | sh`} | ||
secret={false} | ||
/> | ||
<div css={{ paddingTop: 16 }}> | ||
<RouterLink to="/workspaces" css={styles.backLink}> | ||
Go to workspaces | ||
</RouterLink> | ||
</div> | ||
<div css={styles.copyright}> | ||
{"\u00a9"} {new Date().getFullYear()} Coder Technologies, Inc. | ||
</div> | ||
</div> | ||
); | ||
}; | ||
const styles = { | ||
container: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. @aslilac why not use Tailwind here? | ||
flex: 1, | ||
height: "-webkit-fill-available", | ||
display: "flex", | ||
flexDirection: "column", | ||
justifyContent: "center", | ||
alignItems: "center", | ||
width: 480, | ||
margin: "auto", | ||
}, | ||
instructions: (theme) => ({ | ||
fontSize: 16, | ||
color: theme.palette.text.secondary, | ||
paddingBottom: 8, | ||
textAlign: "center", | ||
lineHeight: 1.4, | ||
}), | ||
backLink: (theme) => ({ | ||
display: "block", | ||
textAlign: "center", | ||
color: theme.palette.text.primary, | ||
textDecoration: "underline", | ||
textUnderlineOffset: 3, | ||
textDecorationColor: "hsla(0deg, 0%, 100%, 0.7)", | ||
paddingTop: 16, | ||
paddingBottom: 16, | ||
"&:hover": { | ||
textDecoration: "none", | ||
}, | ||
}), | ||
copyright: (theme) => ({ | ||
fontSize: 12, | ||
color: theme.palette.text.secondary, | ||
marginTop: 24, | ||
}), | ||
} satisfies Record<string, Interpolation<Theme>>; |
16 changes: 10 additions & 6 deletionssite/src/router.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.