Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: make default support links respect --docs-url#14176

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

Conversation

bcpeinhardt
Copy link
Contributor

The default support links previously included a link to Coder's hosted docs, but did not respect the--docs-url deployment value. This meant that on the User Dropdown on the site, there was a link to docs that didn't respect the user's set--docs-url (which is not exactly a bug, but definitely confusing).

This PR updates the default support links to respect the--docs-url deployment value. If the value is not set, it will use the hosted coder docs url as before.

@alwaysmeticulousalwaysmeticulous
Copy link

alwaysmeticulousbot commentedAug 5, 2024
edited
Loading

✅ Meticulous spotted zero visual differences across 1324 screens tested:view results.

Expected differences?Click here. Last updated for commit a756f3a. This comment will update as new commits are pushed.

@bcpeinhardtbcpeinhardt changed the titleMake default support links respect --docs-urlfix: make default support links respect --docs-urlAug 5, 2024
@bcpeinhardtbcpeinhardtenabled auto-merge (squash)August 7, 2024 17:42
{
func DefaultSupportLinks(docsURL string) []codersdk.LinkConfig {
if docsURL == "" {
docsURL = "https://coder.com/docs/{CODER_VERSION}"
Copy link
Member

Choose a reason for hiding this comment

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

You could usebuildinfo.Version() instead so the frontend doesn't have to replace this.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Yeah I was taking a "do as the Romans do" approach and doing it the way the build info was done, but I agree with your comment below that we have this info on the backend so we might as well do it here.
Let me ping someone for context on why it's set up this way before falling into the classic "refactor and then realize why they did it the original way" trap and get back to you haha.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Looks like we can just have the backend do this :)
https://codercom.slack.com/archives/CJURPL8DN/p1723126779529959

defaultSupportLinks := []codersdk.LinkConfig{
{
Name: "Report a bug",
Target: "https://github.com/coder/coder/issues/new?labels=needs+grooming&body={CODER_BUILD_INFO}",
Copy link
Member

Choose a reason for hiding this comment

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

I know you didn't introduce this, but I think we should be doing this replacement on the backend, not the frontend. We already should have this info anyways.

@bcpeinhardt
Copy link
ContributorAuthor

@kylecarbs do you mind re-reviewing when you get a chance?

Copy link
Member

@kylecarbskylecarbs left a comment

Choose a reason for hiding this comment

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

Nice and clean!

@bcpeinhardtbcpeinhardt merged commit76722a7 intomainAug 12, 2024
30 of 32 checks passed
@bcpeinhardtbcpeinhardt deleted the bcpeinhardt/respect_docs_url_within_default_appearance_config branchAugust 12, 2024 21:01
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsAug 12, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@matifalimatifalimatifali left review comments

@kylecarbskylecarbskylecarbs approved these changes

Assignees

@bcpeinhardtbcpeinhardt

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@bcpeinhardt@kylecarbs@matifali

[8]ページ先頭

©2009-2025 Movatter.jp