Skip to content

v2.0.0 — Secure inputs + customizable menu labels

Choose a tag to compare

@caseymrm caseymrm released this 06 Jun 23:45
· 55 commits to master since this release
701a86d

Three feature PRs landed back-to-back. The big-ticket item is a breaking change to `Alert.Inputs` to support masked password fields.

⚠ Breaking change

`Alert.Inputs` now uses `[]AlertInput` instead of `[]string`:

```go
// Before (v1.x):
menuet.Alert{
MessageText: "Where to?",
Inputs: []string{"Location"},
}

// After (v2.0.0):
menuet.Alert{
MessageText: "Where to?",
Inputs: []menuet.AlertInput{{Placeholder: "Location"}},
}
```

The new capability the change unlocks:

```go
menuet.Alert{
MessageText: "Sign in",
Buttons: []string{"Login", "Cancel"},
Inputs: []menuet.AlertInput{
{Placeholder: "Username"},
{Placeholder: "Password", Type: menuet.InputPassword}, // NSSecureTextField
},
}
```

Also new

  • Customizable Start at Login / Quit labels (#26). Set `Application.StartAtLoginLabel` / `Application.QuitLabel` to override the default text — useful for localization or alternate phrasings ("Launch on Startup", "Exit", etc.). Default is unchanged.
  • Wider alert inputs (#28). 200px → 300px for more comfortable typing.

Attribution

All three feature PRs cherry-picked with author credit from @dbeliakov's fork:

  • `66fbad1` — secure inputs (#27)
  • `93c527d` + `264c4b6` — customizable labels (#26)
  • `4ef1578` — wider inputs (#28)

Plus 3 new unit tests pinning the cgo-boundary JSON contract for `InputType` so a future iota reorder can't silently swap which input gets masked.