Skip to content

Conversation

@rxliuli
Copy link

@rxliuli rxliuli commented Oct 7, 2025

Description

The .SetFilters method does not exist in the example code.

image

Fixes # (issue)

Type of change

Please select the option that is relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration using wails doctor.

  • Windows
  • macOS
  • Linux

If you checked Linux, please specify the distro and version.

Test Configuration

Please paste the output of wails doctor. If you are unable to run this command, please describe your environment in as much detail as possible.

Checklist:

  • I have updated website/src/pages/changelog.mdx with details of this PR
  • My code follows the general coding style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Summary by CodeRabbit

  • Refactor
    • Updated file open/save dialog APIs to use options-based calls, allowing configuration of titles, filters, and default filename in a single payload. Replaces previous direct methods.
  • Documentation
    • Revised dialogs guide with new examples illustrating options construction and usage for single/multiple selection and save flows.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 7, 2025

Walkthrough

Updated dialogs documentation to replace direct OpenFile/SaveFile calls with OpenFileWithOptions/SaveFileWithOptions using options structs for title, filters, and filename configuration. Examples now construct options objects before invoking dialogs. Public API notes indicate new methods and types for options-based dialog calls.

Changes

Cohort / File(s) Summary
Docs: Dialog options API update
docs/src/content/docs/learn/dialogs.mdx
Rewrote examples to use OpenFileWithOptions(*application.OpenFileDialogOptions) and SaveFileWithOptions(*application.SaveFileDialogOptions), moving filter/title/filename into options structs; noted public API method and type additions/renames.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant App
  participant Dialog
  participant OS as OS File Picker

  User->>App: Trigger open/save action
  App->>App: Build Options {Title, Filters[, Filename]}
  App->>Dialog: OpenFileWithOptions(options)\nSaveFileWithOptions(options)
  Dialog->>OS: Show picker with configured options
  OS-->>Dialog: Selection/Path or Cancel
  Dialog-->>App: Result (files/path) or error
  App-->>User: Proceed or show message
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

Documentation, v3-alpha, size:S

Suggested reviewers

  • leaanthony

Poem

Little paws tap-tap at the keys,
I bundled filters, titles—such ease!
Options packed, dialogs neat,
Open, Save—a tidy feat.
With structs aligned and pathways clear,
Hippity-hop, new APIs appear! 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description follows the general structure of the template but omits several required elements: the issue reference in the “Fixes #” field is blank, no motivation or context is provided, dependencies are not listed, no type of change option is selected, test configuration and wails doctor output are missing, and the contributor checklist is left entirely unchecked, so it does not conform to the repository’s PR template. Please complete all template sections by referencing the related issue number in “Fixes #”, adding motivation and context for the change, listing any dependencies, selecting the appropriate type of change, providing the testing steps and wails doctor output, and filling out the contributor checklist, including updating the changelog as required.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly identifies that the pull request corrects sample code errors in the File Dialogs documentation and concisely reflects the main purpose of the changeset without extraneous details.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the Documentation Improvements or additions to documentation label Oct 7, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 7, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant