Skip to content

Commit 05f697c

Browse files
committed
update tooltip max length to 2048
1 parent c30b885 commit 05f697c

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

docs/resources/app.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ resource "coder_app" "vim" {
7272
- `order` (Number) The order determines the position of app in the UI presentation. The lowest order is shown first and apps with equal order are sorted by name (ascending order).
7373
- `share` (String) Determines the level which the application is shared at. Valid levels are `"owner"` (default), `"authenticated"` and `"public"`. Level `"owner"` disables sharing on the app, so only the workspace owner can access it. Level `"authenticated"` shares the app with all authenticated users. Level `"public"` shares it with any user, including unauthenticated users. Permitted application sharing levels can be configured site-wide via a flag on `coder server` (Enterprise only).
7474
- `subdomain` (Boolean) Determines whether the app will be accessed via it's own subdomain or whether it will be accessed via a path on Coder. If wildcards have not been setup by the administrator then apps with `subdomain` set to `true` will not be accessible. Defaults to `false`.
75-
- `tooltip` (String) String with markdown support to display over the app icon in a workspace dashboard.
75+
- `tooltip` (String) Markdown text that is displayed when hovering over workspace apps.
7676
- `url` (String) An external url if `external=true` or a URL to be proxied to from inside the workspace. This should be of the form `http://localhost:PORT[/SUBPATH]`. Either `command` or `url` may be specified, but not both.
7777

7878
### Read-Only

provider/app.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var (
2727
const (
2828
appDisplayNameMaxLength = 64 // database column limit
2929
appGroupNameMaxLength = 64
30-
appTooltipMaxLength = 512
30+
appTooltipMaxLength = 2048
3131
)
3232

3333
func appResource() *schema.Resource {
@@ -276,7 +276,7 @@ func appResource() *schema.Resource {
276276
},
277277
"tooltip": {
278278
Type: schema.TypeString,
279-
Description: "String with markdown support to display over the app icon in a workspace dashboard.",
279+
Description: "Markdown text that is displayed when hovering over workspace apps.",
280280
ForceNew: true,
281281
Optional: true,
282282
ValidateDiagFunc: func(val any, c cty.Path) diag.Diagnostics {

provider/app_test.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"fmt"
55
"regexp"
66
"strconv"
7+
"strings"
78
"testing"
89

910
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
@@ -556,13 +557,8 @@ func TestApp(t *testing.T) {
556557
"#install-coder-desktop) to use this button.",
557558
},
558559
{
559-
name: "TooltipTooLong", // > 512 characters
560-
tooltip: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor " +
561-
"incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud " +
562-
"exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor " +
563-
"in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint " +
564-
"occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. " +
565-
"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque.",
560+
name: "TooltipTooLong",
561+
tooltip: strings.Repeat("a", 2049),
566562
expectError: regexp.MustCompile("tooltip is too long"),
567563
},
568564
}

0 commit comments

Comments
 (0)