-
Notifications
You must be signed in to change notification settings - Fork 943
feat(site): add numbers to SSHButton content for clarity #15661
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
deansheather
merged 8 commits into
coder:main
from
benwinding:add-numbers-to-ssh-button-content
Dec 12, 2024
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
6335812
Add numbers to SSHButton content for clarity
benwinding e80c9a8
Use HTML `<li>` tags instead of numbering directly
benwinding ed7ba0d
Merge branch 'main' into add-numbers-to-ssh-button-content
matifali abf9abd
Fix helptext prop 🤦♂️
benwinding aca4b49
Declare props interface and destructure props
benwinding 4ba6c1d
use `FC<T>` type from react
benwinding eddefc8
Merge remote-tracking branch 'upstream/main' into add-numbers-to-ssh-…
deansheather 106aea7
Fix formatting
deansheather File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Use HTML
<li>
tags instead of numbering directly
- Loading branch information
commit e80c9a88da9d727f5c9ff0a33f7ebbc2fdd4b5d1
There are no files selected for viewing
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 |
---|---|---|
|
@@ -48,28 +48,18 @@ export const SSHButton: FC<SSHButtonProps> = ({ | |
Run the following commands to connect with SSH: | ||
</HelpTooltipText> | ||
|
||
<Stack spacing={0.5} css={styles.codeExamples}> | ||
<div> | ||
<HelpTooltipText> | ||
<strong css={styles.codeExampleLabel}> | ||
1. Configure SSH hosts on machine: | ||
</strong> | ||
</HelpTooltipText> | ||
<CodeExample secret={false} code="coder config-ssh" /> | ||
</div> | ||
|
||
<div> | ||
<HelpTooltipText> | ||
<strong css={styles.codeExampleLabel}> | ||
2. Connect to the agent: | ||
</strong> | ||
</HelpTooltipText> | ||
<CodeExample | ||
secret={false} | ||
code={`ssh ${sshPrefix}${workspaceName}.${agentName}`} | ||
<ol style={{ margin: 0, padding: 0 }}> | ||
<Stack spacing={0.5} css={styles.codeExamples}> | ||
<SSHStep | ||
helpText="Configure SSH hosts on machine:" | ||
codeExample="coder config-ssh" | ||
/> | ||
<SSHStep | ||
helpText="Connect to the agent:" | ||
codeExample={`ssh ${sshPrefix}${workspaceName}.${agentName}`} | ||
/> | ||
</div> | ||
</Stack> | ||
</Stack> | ||
</ol> | ||
|
||
<HelpTooltipLinksGroup> | ||
<HelpTooltipLink href={docs("/install")}> | ||
|
@@ -92,6 +82,15 @@ export const SSHButton: FC<SSHButtonProps> = ({ | |
); | ||
}; | ||
|
||
const SSHStep = (props: { helpText: string; codeExample: string }) => ( | ||
<li style={{ listStylePosition: "inside" }}> | ||
<HelpTooltipText style={{ display: "inline" }}> | ||
<strong css={styles.codeExampleLabel}>Connect to the agent:</strong> | ||
</HelpTooltipText> | ||
<CodeExample secret={false} code={props.codeExample} /> | ||
</li> | ||
); | ||
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. Thanks for reviewing @aslilac 🙏 Changed to use semantic HTML |
||
|
||
const classNames = { | ||
paper: (css, theme) => css` | ||
padding: 16px 24px 24px; | ||
|
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.