`window.ToggleFrameless() api`
Implements the window.ToggleFrameless() api internally it just uses the window.setFrameless toggling it as the opposite of the current value so Developer does not need to card about the current state to swap it
Changes:
- Runtime will need to be updated on dev machines as I reorganized the message processor values to keep the ToggleXXX in the same range
- Regenerated new events
- Updated
messageprocessor_window.go - Updated runtime
window.ts - Updated API example in `v3/examples/
Summary by CodeRabbit
-
New Features
- Added the ability to toggle the window between frameless and normal states via a new API method and UI button in the frameless window example.
-
Documentation
- Updated the changelog to include the new window toggling feature.
-
Style
- Improved code readability with consistent multi-line formatting in several function signatures and calls.
Walkthrough
A new ToggleFrameless() API method has been introduced, allowing windows to toggle between frameless and normal states. This addition required updates across the runtime, event types, changelog, and example assets. Associated event IDs, constants, and exported interfaces were updated, and a new event type and handler were added to support this feature.
Changes
| Files/Paths | Change Summary |
|---|---|
| v3/internal/runtime/desktop/@wailsio/runtime/src/window.ts, .../event_types.ts | Added ToggleFrameless() method to Window class and new event type constant. |
| v3/pkg/application/window.go, .../webview_window.go, .../messageprocessor_window.go | Added ToggleFrameless method to Window interface, implementation, and message processor logic. |
| v3/pkg/events/events.go, .../events.txt, .../events_darwin.h, .../events_linux.h | Added new event ID and constant for WindowToggleFrameless; incremented related event IDs. |
| v3/internal/assetserver/bundledassets/runtime.js | Refactored and reordered runtime code; added ToggleFrameless() to exported Window class. |
| v3/examples/frameless/assets/index.html | Added UI button and JS handler to trigger window.wails.Window.ToggleFrameless(). |
| docs/src/content/docs/changelog.mdx | Documented new ToggleFrameless() API in the changelog. |
| v3/internal/runtime/desktop/@wailsio/runtime/package.json | Bumped package version from 3.0.0-alpha.67 to 3.0.0-alpha.68. |
Sequence Diagram(s)
sequenceDiagram
participant User
participant UI (HTML/JS)
participant Runtime JS (window.ts)
participant Go Backend (window.go/webview_window.go)
participant OS Window
User->>UI (HTML/JS): Click "Toggle Frameless" button
UI (HTML/JS)->>Runtime JS: window.wails.Window.ToggleFrameless()
Runtime JS->>Go Backend: Invoke ToggleFrameless method
Go Backend->>OS Window: Toggle frameless state
OS Window-->>Go Backend: Frameless state toggled
Go Backend-->>Runtime JS: Success/acknowledgement
Runtime JS-->>UI (HTML/JS): (Optional) Update UI or state
Suggested labels
Enhancement, cli, Windows, MacOS, Linux, size:XL
Poem
A rabbit hopped up to the screen,
Saw windows shift from seen to unseenβ
With frameless toggles, click and gleam,
The borders vanish, so pristine!
Code and carrots, side by side,
In alpha sixty-eight we ride.
πβ¨
π Recent review details
Configuration used: .coderabbit.yaml Review profile: CHILL Plan: Pro
π₯ Commits
Reviewing files that changed from the base of the PR and between 9925803d211ae83d8a3a8197077fb8dd25e35090 and c86530df75a1d6b4de91fd39d8c0b15b45703386.
π Files selected for processing (3)
-
docs/src/content/docs/changelog.mdx(1 hunks) -
v3/pkg/application/webview_window.go(5 hunks) -
v3/pkg/events/events.go(5 hunks)
π§ Files skipped from review as they are similar to previous changes (3)
- docs/src/content/docs/changelog.mdx
- v3/pkg/application/webview_window.go
- v3/pkg/events/events.go
β¨ Finishing Touches
- [ ] π Generate Docstrings
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.
πͺ§ Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
-
I pushed a fix in commit <commit_id>, please review it. -
Explain this complex logic. -
Open a follow-up GitHub issue for this discussion.
-
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:-
@coderabbitai explain this code block. -
@coderabbitai modularize this function.
-
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:-
@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase. -
@coderabbitai read src/utils.ts and explain its main purpose. -
@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format. -
@coderabbitai help me debug CodeRabbit configuration file.
-
Support
Need help? Create a ticket on our support page for assistance with any issues or questions.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
-
@coderabbitai pauseto pause the reviews on a PR. -
@coderabbitai resumeto resume the paused reviews. -
@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository. -
@coderabbitai full reviewto do a full review from scratch and review all the files again. -
@coderabbitai summaryto regenerate the summary of the PR. -
@coderabbitai generate docstringsto generate docstrings for this PR. -
@coderabbitai generate sequence diagramto generate a sequence diagram of the changes in this PR. -
@coderabbitai resolveresolve all the CodeRabbit review comments. -
@coderabbitai configurationto show the current CodeRabbit configuration for the repository. -
@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
Quality Gate passed
Issues
14 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.3% Duplication on New Code
