Skip to content

#1057 expose ZoomFactor get/set and add the respective windows only options - #1463

Merged
leaanthony merged 9 commits into
wailsapp:masterfrom
pierrejoye:master
Oct 13, 2022
Merged

leaanthony merged 9 commits into
wailsapp:masterfrom
pierrejoye:master

Conversation

@pierrejoye

Copy link
Copy Markdown
Contributor

As discussed in the ticket. Here is a 1st version.

Do we have tests in general? I can add the relevant ones if any needed here (while not sure how to test the underlying COM APIs calls :)

@leaanthony

Copy link
Copy Markdown
Member

Thanks for this! Tests are super hard and time consuming, but if you'd like to get the ball rolling I'm open to that! What did you have in mind?

@leaanthony leaanthony left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks or doing this. It's looking good! Just a couple of comments/questions. The only thing that would be good to add is the docs to the options.mdx file in the website directory 👍

Comment thread v2/cmd/wails/internal/commands/generate/template/base/main.tmpl.go
Comment thread v2/internal/frontend/desktop/windows/frontend.go Outdated
Comment thread v2/internal/frontend/desktop/windows/frontend.go Outdated
@pierrejoye

Copy link
Copy Markdown
Contributor Author

Thanks for this! Tests are super hard and time consuming, but if you'd like to get the ball rolling I'm open to that! What did you have in mind?

The easy part are the wails specific parts, generations etc. As they are almost all self contained. Unit tests for each functions are relatively straightforward for most. If not, we may need to refactor some to allow easy testing of each specific function (ie. if a function does too many things, can be splitted in separate ones without changing the public APIs).

For the integration tests (all OSes system APIs, be webviews or other), kind of tricky. Maybe writing fake functions for the C APIs. For COM, not sure, writing a fake COM sounds cumbersome. I need to think about that part :)

@pierrejoye

Copy link
Copy Markdown
Contributor Author

Thanks for the great feedback and suggestion :) I will see which part I can add tests in the next couple of days.



if opts := f.frontendOptions.Windows; opts != nil {
if opts.ZoomFactor > 0.0 {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should this be opts.ZoomFactor > 0.0 && opts.ZoomFactor != 1.0 to ignore when the default value is set?

@leaanthony

Copy link
Copy Markdown
Member

Any updates on this @pierrejoye? I wouldn't want this blocked because of trying to work out the hard problem of testing 👍 Let me know how we can move it forward 👍

@stale

stale Bot commented Aug 13, 2022

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the wontfix label Aug 13, 2022
@leaanthony

Copy link
Copy Markdown
Member

@pierrejoye any news on this?

@stale stale Bot removed the wontfix label Aug 13, 2022
@stale

stale Bot commented Sep 21, 2022

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the wontfix label Sep 21, 2022
@leaanthony leaanthony added WIP The issue is currently under development and removed wontfix labels Sep 21, 2022
@leaanthony leaanthony added this to the v2.2.0 milestone Sep 21, 2022
@pierrejoye

pierrejoye commented Oct 11, 2022 via email

Copy link
Copy Markdown
Contributor Author

@leaanthony

Copy link
Copy Markdown
Member

Hey there 👋 We'll look at this soon 👍

# Conflicts:
#	website/docs/reference/options.mdx

@stffabi stffabi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍 , thanks for this.

@leaanthony
leaanthony merged commit f4adff1 into wailsapp:master Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WIP The issue is currently under development

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants