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

Commite53bc24

Browse files
author
Rafael Rodriguez
authored
feat: add tooltip field to workspace app that renders as markdown (#19651)
In this pull request we're adding an optional `tooltip` field. The`tooltip` field is a string field (with markdown support) that will beused to display tooltips on hover over app buttons in a workspacedashboard.Tooltip screenshot<img width="816" height="275" alt="Screenshot 2025-08-29 at 4 11 56 PM"src="https://github.com/user-attachments/assets/52c736a1-f632-465b-89a0-35ca99bd367b"/>Tooltip videohttps://github.com/user-attachments/assets/21806337-accc-4acf-b8c6-450c031d98f1Issue:#18431Related provider PR:coder/terraform-provider-coder#435### Changes- Added migration to add `tooltip` column to `workspace_apps` table- Updated queries to get/set the new `tooltip` column- Updated frontend to render tooltip as markdown (primary tool tip takesprecedence over template tooltip)### Testing- Added storybook test for `Applink` markdown rendering
1 parent4cd0ada commite53bc24

File tree

29 files changed

+495
-388
lines changed

29 files changed

+495
-388
lines changed

‎cli/testdata/coder_provisioner_list_--output_json.golden‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"last_seen_at": "====[timestamp]=====",
88
"name": "test-daemon",
99
"version": "v0.0.0-devel",
10-
"api_version": "1.9",
10+
"api_version": "1.10",
1111
"provisioners": [
1212
"echo"
1313
],

‎coderd/agentapi/subagent.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ func (a *SubAgentAPI) CreateSubAgent(ctx context.Context, req *agentproto.Create
205205
Valid:app.GetGroup()!="",
206206
String:app.GetGroup(),
207207
},
208+
Tooltip:"",// tooltips are not currently supported in subagent workspaces, default to empty string
208209
})
209210
iferr!=nil {
210211
returnxerrors.Errorf("insert workspace app: %w",err)

‎coderd/apidoc/docs.go‎

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/apidoc/swagger.json‎

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/database/db2sdk/db2sdk.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ func Apps(dbApps []database.WorkspaceApp, statuses []database.WorkspaceAppStatus
582582
Group:dbApp.DisplayGroup.String,
583583
Hidden:dbApp.Hidden,
584584
OpenIn:codersdk.WorkspaceAppOpenIn(dbApp.OpenIn),
585+
Tooltip:dbApp.Tooltip,
585586
Statuses:WorkspaceAppStatuses(statuses),
586587
})
587588
}

‎coderd/database/dbgen/dbgen.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,7 @@ func WorkspaceApp(t testing.TB, db database.Store, orig database.WorkspaceApp) d
866866
DisplayGroup:orig.DisplayGroup,
867867
Hidden:orig.Hidden,
868868
OpenIn:takeFirst(orig.OpenIn,database.WorkspaceAppOpenInSlimWindow),
869+
Tooltip:takeFirst(orig.Tooltip,testutil.GetRandomName(t)),
869870
})
870871
require.NoError(t,err,"insert app")
871872
returnresource

‎coderd/database/dump.sql‎

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTERTABLE workspace_apps
2+
DROP COLUMN IF EXISTS tooltip;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
ALTERTABLE workspace_apps
2+
ADD COLUMN IF NOT EXISTS tooltipVARCHAR(2048)NOT NULL DEFAULT'';
3+
4+
COMMENT ON COLUMN workspace_apps.tooltip IS'Markdown text that is displayed when hovering over workspace apps.';

‎coderd/database/models.go‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp