-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add windows options supports DisablePinchZoom
configuration(#2021)
#3115
Conversation
WalkthroughThe recent updates introduce a new configuration option to disable pinch zoom on Windows and extend the visual backdrop types with a Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ? TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (2)
- v2/internal/frontend/desktop/windows/frontend.go (1 hunks)
- v2/pkg/options/windows/windows.go (1 hunks)
Files skipped from review due to trivial changes (1)
- v2/pkg/options/windows/windows.go
Additional comments: 1
v2/internal/frontend/desktop/windows/frontend.go (1)
- 543-551: Please ensure that the PR checklist is completed. This includes updating the changelog, adhering to the coding style, commenting the code, updating documentation, and ensuring that no new warnings are introduced. It's important to follow the project's contribution guidelines for a consistent and maintainable codebase.
IsPinchZoomSupported
configurati…IsPinchZoomEnabled
configuration(#2021)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (3)
- website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx (1 hunks)
- website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.6.0/reference/runtime/window.mdx (1 hunks)
- website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.7.0/reference/runtime/window.mdx (1 hunks)
Files skipped from review due to trivial changes (1)
- website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx
Additional comments: 2
website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.6.0/reference/runtime/window.mdx (1)
- 105-110: The documentation for
WindowSetSize
andWindowGetSize
appears to be correct and consistent with the rest of the documentation. The addition ofWindowGetSize
is a new section and does not replaceWindowSetSize
. Ensure that the implementation ofWindowGetSize
in the codebase matches this documentation.website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.7.0/reference/runtime/window.mdx (1)
- 105-110: It appears that the documentation for
WindowSetSize
has been retained and a new section forWindowGetSize
has been added. This contradicts the PR overview which mentioned an alteration fromWindowSetSize
toWindowGetSize
. Please confirm if the addition ofWindowGetSize
is intended and thatWindowSetSize
should remain unchanged.
Thanks for this. Please could you invert the logic: IsPinchZoomDisabled to ensure default bahaviour is consistent? Please could you also add an entry to the changelog located at |
IsPinchZoomEnabled
configuration(#2021)DisablePinchZoom
configuration(#2021)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 2
Configuration used: CodeRabbit UI
Files selected for processing (4)
- v2/internal/frontend/desktop/windows/frontend.go (1 hunks)
- v2/pkg/options/windows/windows.go (1 hunks)
- website/docs/reference/options.mdx (2 hunks)
- website/src/pages/changelog.mdx (1 hunks)
Additional comments: 3
v2/internal/frontend/desktop/windows/frontend.go (1)
- 543-549: Using
log.Fatal
to handle errors when setting Chromium settings is appropriate, as failing to apply these settings could result in the application being in an inconsistent state. However, ensure that this level of error handling is consistent with the rest of the application's error strategy.v2/pkg/options/windows/windows.go (1)
- 68-75: The addition of the
DisablePinchZoom
field to theOptions
struct is consistent with the PR's objective to control pinch zoom functionality on Windows. Ensure that all related documentation, including the changelog, is updated to reflect this new feature and that the PR checklist is completed.website/docs/reference/options.mdx (1)
- 578-579: The
BackdropType
enum has been extended with a new valueTabbed
. Please ensure that the documentation is updated to reflect this new value.
website/src/pages/changelog.mdx
Outdated
### Added | ||
|
||
- Added windows options supports `DisablePinchZoom` configuration. Added by @tuuzed in [PR](https://github.com/wailsapp/wails/pull/3115) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There appears to be a discrepancy between the feature name mentioned in the summary (IsPinchZoomEnabled
) and the one in the changelog (DisablePinchZoom
). Please verify that the changelog entry matches the actual implementation in the codebase and update it accordingly to ensure consistency.
if err != nil { | ||
log.Fatal(err) | ||
} | ||
err = settings.PutIsPinchZoomEnabled(!opts.DisablePinchZoom) | ||
if err != nil { | ||
log.Fatal(err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation of the IsPinchZoomEnabled
feature uses a negation of opts.DisablePinchZoom
to set the value. This logic assumes that the DisablePinchZoom
field exists and is a boolean. Ensure that the DisablePinchZoom
field is properly documented, and its default value aligns with the intended functionality of IsPinchZoomEnabled
. Additionally, consider handling the potential absence of opts
or opts.DisablePinchZoom
to avoid a nil pointer dereference.
All right, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- website/src/pages/changelog.mdx (1 hunks)
Files skipped from review due to trivial changes (1)
- website/src/pages/changelog.mdx
Add windows options supports
IsPinchZoomEnabled
configuration(#2021)Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
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
.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:
website/src/pages/changelog.mdx
with details of this PRSummary by CodeRabbit
New Features
wails doctor
utility.Documentation
DisablePinchZoom
option.BackdropType
enum documentation with a newTabbed
value description.WindowSetSize
.Bug Fixes
WindowSetSize
toWindowGetSize
.