Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions docs/src/content/docs/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Changed
- Update the documentation page for Wails v3 Asset Server by @ndianabasi
- **BREAKING**: Remove package-level dialog functions (`application.InfoDialog()`, `application.QuestionDialog()`, etc.). Use the `app.Dialog` manager instead: `app.Dialog.Info()`, `app.Dialog.Question()`, `app.Dialog.Warning()`, `app.Dialog.Error()`, `app.Dialog.OpenFile()`, `app.Dialog.SaveFile()`
- Update dialogs documentation to match actual API: use `app.Dialog.*`, `AddButton()` with callbacks (not `SetButtons()`), `SetDefaultButton(*Button)` (not string), `AddFilter()` (not `SetFilters()`), `SetFilename()` (not `SetDefaultFilename()`), and `app.Dialog.OpenFile().CanChooseDirectories(true)` for folder selection
- Update dialogs documentation to match actual API: use `app.Dialog.*`, `Buttons(...)`, `Show() error` (non-blocking), `Result() (string, error)` (blocking), `AddFilter()`, `SetFilename()`, and `app.Dialog.OpenFile().CanChooseDirectories(true)` for folder selection
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# Find files that might contain MessageDialog definition
fd -e go -x grep -l "MessageDialog" {} \;

Repository: wailsapp/wails

Length of output: 784


🏁 Script executed:

# Search for MessageDialog Show method definition with context
rg -n -B2 -A5 'func.*MessageDialog.*Show' --type=go

Repository: wailsapp/wails

Length of output: 613


🏁 Script executed:

# Search for MessageDialog Result method definition with context
rg -n -B2 -A5 'func.*MessageDialog.*Result' --type=go

Repository: wailsapp/wails

Length of output: 429


🏁 Script executed:

# Alternative: Search for type MessageDialog definition
rg -n -B2 -A10 'type MessageDialog' --type=go

Repository: wailsapp/wails

Length of output: 2979


🏁 Script executed:

# Search for Result method in MessageDialog
rg -n -B2 -A5 'func.*MessageDialog.*Result' --type=go

Repository: wailsapp/wails

Length of output: 429


🏁 Script executed:

# Look at the full Show method and context in dialogs.go
sed -n '110,130p' ./v3/pkg/application/dialogs.go

Repository: wailsapp/wails

Length of output: 767


🏁 Script executed:

# Check what InvokeSyncWithResultAndError does to understand if Show() is blocking
rg -n -B2 -A10 'InvokeSyncWithResultAndError' --type=go | head -50

Repository: wailsapp/wails

Length of output: 2930


Fix dialog API documentation — multiple inaccuracies found.

The changelog documents an incorrect API. The actual MessageDialog.Show() implementation:

  • Returns (string, error) — not just error
  • Is blocking — the code comment explicitly states "This method blocks until the user clicks a button" and uses InvokeSyncWithResultAndError(...wg.Wait()...) to enforce synchronous execution
  • Is a single method — there is no separate Result() method on MessageDialog in v3

Update the changelog to accurately reflect: Show() (string, error) (blocking) and remove the non-existent Result() method from the documentation.

🤖 Prompt for AI Agents
In docs/src/content/docs/changelog.mdx around line 103, the changelog entry
incorrectly describes the MessageDialog API; change the documentation to state
that MessageDialog.Show() is a blocking call that returns (string, error) and
remove any mention of a non-existent Result() method — update the line to
reflect Show() (string, error) (blocking) and remove references to Result() or a
non-blocking Show() signature.


## Fixed
- Fix crash on macOS when toggling window visibility via Hide()/Show() with ApplicationShouldTerminateAfterLastWindowClosed enabled (#4389) by @leaanthony
Expand Down Expand Up @@ -254,30 +254,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## v3.0.0-alpha.29 - 2025-09-25

## Added
- macOS: Shows native window controls in the menu bar in [#4588](https://github.com/wailsapp/wails/pull/4588) by @nidib
- Add macOS Dock service to hide/show app icon in the dock @popaprozac in [PR](https://github.com/wailsapp/wails/pull/4451)
- macOS: Shows native window controls in the menu bar in [#4588](https://github.com/wailsapp/wails/pull/4588) by @nidib
- Add macOS Dock service to hide/show app icon in the dock @popaprozac in [PR](https://github.com/wailsapp/wails/pull/4451)

## Changed
- macOS: Use `visibleFrame` instead of `frame` for window centering to exclude menu bar and dock areas
- macOS: Use `visibleFrame` instead of `frame` for window centering to exclude menu bar and dock areas

## Fixed
- Fixed redefinition error for liquid glass demo in [#4542](https://github.com/wailsapp/wails/pull/4542) by @Etesam913
- Fixed issue where AssetServer can crash on MacOS in [#4576](https://github.com/wailsapp/wails/pull/4576) by @jghiloni
- Fixed compilation issue when building with NextJs. Fixed in [#4585](https://github.com/wailsapp/wails/pull/4585) by @rev42
- Fixed redefinition error for liquid glass demo in [#4542](https://github.com/wailsapp/wails/pull/4542) by @Etesam913
- Fixed issue where AssetServer can crash on MacOS in [#4576](https://github.com/wailsapp/wails/pull/4576) by @jghiloni
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix operating system name capitalization.

The operating system from Apple should be written as "macOS" (not "MacOS") for consistency with Apple's official branding.

🔎 Proposed fix
-Fixed issue where AssetServer can crash on MacOS in [#4576](https://github.com/wailsapp/...
+Fixed issue where AssetServer can crash on macOS in [#4576](https://github.com/wailsapp/...

Apply the same fix to both occurrences at lines 244 and 258.

Also applies to: 258-258

🧰 Tools
🪛 LanguageTool

[uncategorized] ~244-~244: The operating system from Apple is written “macOS”.
Context: ...ed issue where AssetServer can crash on MacOS in [#4576](https://github.com/wailsapp/...

(MAC_OS)

🤖 Prompt for AI Agents
In docs/src/content/docs/changelog.mdx around lines 244 and 258, the Apple
operating system name is capitalized as "MacOS"; change both occurrences to the
correct "macOS" to match Apple’s official branding and maintain consistency in
the changelog.

- Fixed compilation issue when building with NextJs. Fixed in [#4585](https://github.com/wailsapp/wails/pull/4585) by @rev42
- Fixed pipelines for nightly release in [#4597](https://github.com/wailsapp/wails/pull/4597) by @riadafridishibly

## v3.0.0-alpha.29 - 2025-09-25

## Added
- Add macOS Dock service to hide/show app icon in the dock @popaprozac in [PR](https://github.com/wailsapp/wails/pull/4451)
- Add macOS Dock service to hide/show app icon in the dock @popaprozac in [PR](https://github.com/wailsapp/wails/pull/4451)

## Changed
- macOS: Use `visibleFrame` instead of `frame` for window centering to exclude menu bar and dock areas
- macOS: Use `visibleFrame` instead of `frame` for window centering to exclude menu bar and dock areas

## Fixed
- Fixed redefinition error for liquid glass demo in [#4542](https://github.com/wailsapp/wails/pull/4542) by @Etesam913
- Fixed issue where AssetServer can crash on MacOS in [#4576](https://github.com/wailsapp/wails/pull/4576) by @jghiloni
- Fixed compilation issue when building with NextJs. Fixed in [#4585](https://github.com/wailsapp/wails/pull/4585) by @rev42
- Fixed redefinition error for liquid glass demo in [#4542](https://github.com/wailsapp/wails/pull/4542) by @Etesam913
- Fixed issue where AssetServer can crash on MacOS in [#4576](https://github.com/wailsapp/wails/pull/4576) by @jghiloni
- Fixed compilation issue when building with NextJs. Fixed in [#4585](https://github.com/wailsapp/wails/pull/4585) by @rev42
- Fixed pipelines for nightly release in [#4597](https://github.com/wailsapp/wails/pull/4597) by @riadafridishibly

## v3.0.0-alpha.27 - 2025-09-07
Expand Down
28 changes: 16 additions & 12 deletions docs/src/content/docs/concepts/lifecycle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,17 @@ app := application.New(application.Options{
}

// Prompt the user
result, _ := application.QuestionDialog().
result, _ := app.Dialog.Question().
SetTitle("Unsaved Changes").
SetMessage("You have unsaved changes. Quit anyway?").
AddButton("Quit", "quit").
AddButton("Cancel", "cancel").
Show()
Buttons(
application.Button{Label: "Quit"},
application.Button{Label: "Cancel", IsDefault: true, IsCancel: true},
).
Result()

// Only quit if user clicked "Quit"
return result == "quit"
return result == "Quit"
},
})
```
Expand Down Expand Up @@ -503,19 +505,21 @@ window := app.Window.NewWithOptions(application.WebviewWindowOptions{
window.RegisterHook(events.Common.WindowClosing, func(e *application.WindowEvent) {
if hasUnsavedChanges() {
// Show dialog
result, _ := application.QuestionDialog().
result, _ := app.Dialog.Question().
SetTitle("Unsaved Changes").
SetMessage("Save before closing?").
AddButton("Save", "save").
AddButton("Discard", "discard").
AddButton("Cancel", "cancel").
Show()
Buttons(
application.Button{Label: "Save", IsDefault: true},
application.Button{Label: "Discard"},
application.Button{Label: "Cancel", IsCancel: true},
).
Result()

switch result {
case "save":
case "Save":
saveChanges()
// Allow close
case "cancel":
case "Cancel":
e.Cancel() // Prevent close
}
// "discard" falls through and allows close
Expand Down
52 changes: 29 additions & 23 deletions docs/src/content/docs/features/browser/integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,19 @@ func handleExternalLink(app *application.App, url string) {
dialog := app.Dialog.Question()
dialog.SetTitle("Open External Link")
dialog.SetMessage(fmt.Sprintf("Open %s in your browser?", url))

dialog.AddButton("Open").OnClick(func() {
err := app.Browser.OpenURL(url)
if err != nil {
app.Logger.Error("Failed to open URL", "url", url, "error", err)
}
})

dialog.AddButton("Cancel")
dialog.Show()

dialog.Buttons(
application.Button{Label: "Open"},
application.Button{Label: "Cancel", IsDefault: true, IsCancel: true},
)

result, _ := dialog.Result()
if result == "Open" {
err := app.Browser.OpenURL(url)
if err != nil {
app.Logger.Error("Failed to open URL", "url", url, "error", err)
}
}
}

func isValidURL(url string) bool {
Expand Down Expand Up @@ -443,15 +446,18 @@ func openWithConfirmation(app *application.App, url string) {
dialog := app.Dialog.Question()
dialog.SetTitle("Open External Link")
dialog.SetMessage(fmt.Sprintf("Open %s in your browser?", url))

dialog.AddButton("Open").OnClick(func() {
if err := app.Browser.OpenURL(url); err != nil {
showError(app, "Failed to open URL", err)
}
})

dialog.AddButton("Cancel")
dialog.Show()

dialog.Buttons(
application.Button{Label: "Open"},
application.Button{Label: "Cancel", IsDefault: true, IsCancel: true},
)

result, _ := dialog.Result()
if result == "Open" {
if err := app.Browser.OpenURL(url); err != nil {
showError(app, "Failed to open URL", err)
}
}
}

func generateHTMLReport(app *application.App) {
Expand Down Expand Up @@ -495,10 +501,10 @@ func generateHTMLReport(app *application.App) {
}

func showError(app *application.App, message string, err error) {
app.Dialog.Error().
SetTitle("Error").
SetMessage(fmt.Sprintf("%s: %v", message, err)).
Show()
_ = app.Dialog.Error().
SetTitle("Error").
SetMessage(fmt.Sprintf("%s: %v", message, err)).
Show()
}
```

Expand Down
Loading
Loading