chore: improve the setup experience with various fixes (#8130)

* Move updatecheck logs to debug mode

This was causing logs to be emitted immediately after
initial setup, which seemed odd for the user.

* Fix setup page text to say "Create" instead of "Setup" account

* Improve copy on the empty workspaces page

- This view can be seen after the user creates their first workspace, so saying first is bad.
- It should describe what a workspace is, so I modified the description.
- The create from template button wasn't helpful!

* Improve the copy for the empty templates view

- This didn't describe what a template actually is.
- The title had the same problem as workspaces, where first makes no sense.

* Improve text consistency on the Create Template page

* Fix "View activity" displaying for non-Enterprise users

This was causing an exception to be thrown.

* Improve messaging of empty groups view

* Appropriately capitalize Workspace and Template

* Improve Docker template taglines

* Fix types
This commit is contained in:
Kyle Carberry
2023-06-21 18:23:59 -05:00
committed by GitHub
parent a28d422c35
commit 2a492b7008
31 changed files with 84 additions and 79 deletions

View File

@ -145,10 +145,10 @@ func (c *Checker) start() {
diff := time.Until(r.Checked.Add(c.opts.Interval))
if diff > 0 {
c.log.Info(c.ctx, "time until next update check", slog.F("duration", diff))
c.log.Debug(c.ctx, "time until next update check", slog.F("duration", diff))
t.Reset(diff)
} else {
c.log.Info(c.ctx, "time until next update check", slog.F("duration", c.opts.Interval))
c.log.Debug(c.ctx, "time until next update check", slog.F("duration", c.opts.Interval))
}
for {
@ -164,7 +164,7 @@ func (c *Checker) start() {
c.notifyIfNewer(r, rr)
r = rr
}
c.log.Info(c.ctx, "time until next update check", slog.F("duration", c.opts.Interval))
c.log.Debug(c.ctx, "time until next update check", slog.F("duration", c.opts.Interval))
t.Reset(c.opts.Interval)
case <-c.ctx.Done():
return
@ -176,7 +176,7 @@ func (c *Checker) update() (r Result, err error) {
ctx, cancel := context.WithTimeout(c.ctx, c.opts.UpdateTimeout)
defer cancel()
c.log.Info(c.ctx, "checking for update")
c.log.Debug(c.ctx, "checking for update")
req, err := http.NewRequestWithContext(ctx, http.MethodGet, c.opts.URL, nil)
if err != nil {
return r, xerrors.Errorf("new request: %w", err)
@ -203,7 +203,7 @@ func (c *Checker) update() (r Result, err error) {
Version: rr.GetTagName(),
URL: rr.GetHTMLURL(),
}
c.log.Info(ctx, "update check result", slog.F("latest_version", r.Version))
c.log.Debug(ctx, "update check result", slog.F("latest_version", r.Version))
b, err := json.Marshal(r)
if err != nil {