Skip to content
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

Ignore dynamic type when changing zoom level #3638

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

quanganhdo
Copy link
Member

Task/Issue URL: https://app.asana.com/0/1205591970852438/1208863000782015/f
Tech Design URL:
CC:

Description:

Ignores dynamic type when changing zoom level.

Steps to test this PR:

  1. Play with the new Zoom level setting, with or without customized Dynamic Type
  2. Text size on web pages should exclusively be controlled by the Zoom level setting, and Dynamic Type should only affect non-webview content

Definition of Done (Internal Only):

Copy Testing:

  • Use of correct apostrophes in new copy, ie rather than '

Orientation Testing:

  • Portrait
  • Landscape

Device Testing:

  • iPhone SE (1st Gen)
  • iPhone 8
  • iPhone X
  • iPhone 14 Pro
  • iPad

OS Testing:

  • iOS 15
  • iOS 16
  • iOS 17

Theme Testing:

  • Light theme
  • Dark theme

Internal references:

Software Engineering Expectations
Technical Design Template

@quanganhdo quanganhdo marked this pull request as ready for review November 28, 2024 04:33
@quanganhdo quanganhdo requested a review from samsymons November 28, 2024 04:33
Comment on lines -113 to -114
let dynamicTypeScalePercentage = UIFontMetrics.default.scaledValue(for: 1.0)
let viewScale = CGFloat(level.rawValue) / 100 * dynamicTypeScalePercentage
Copy link
Member Author

Choose a reason for hiding this comment

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

Looking at the original UserScript implementation, we respect dynamic type for certain known sites (only wikipedia I think). There's probably a historical reason for this.

@dus7 dus7 self-requested a review November 28, 2024 11:56
@dus7 dus7 changed the base branch from main to release/7.147.0 November 28, 2024 12:28
@dus7 dus7 force-pushed the anh/fixes/ignore-dynamic-type branch from 04dffd3 to e6e9afa Compare November 28, 2024 12:30
@dus7
Copy link
Contributor

dus7 commented Nov 28, 2024

@quanganhdo, I rebased it on top of release branch.

Copy link
Contributor

@dus7 dus7 left a comment

Choose a reason for hiding this comment

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

Tested both global and per-host setting. Works as expected.

@dus7 dus7 merged commit 9f3a409 into release/7.147.0 Nov 28, 2024
13 checks passed
@dus7 dus7 deleted the anh/fixes/ignore-dynamic-type branch November 28, 2024 13:27
quanganhdo added a commit that referenced this pull request Nov 28, 2024
<!--
Note: This checklist is a reminder of our shared engineering
expectations. Feel free to change it, although assigning a GitHub
reviewer and the items in bold are required.

⚠️ If you're an external contributor, please file an issue first before
working on a PR, as we can't guarantee that we will accept your changes
if they haven't been discussed ahead of time. Thanks!
-->

Task/Issue URL:
https://app.asana.com/0/1205591970852438/1208863000782015/f
Tech Design URL:
CC:

**Description**:

Ignores dynamic type when changing zoom level.

<!--
If at any point it isn't actively being worked on/ready for
review/otherwise moving forward strongly consider closing it (or not
opening it in the first place). If you decide not to close it, use Draft
PR while work is still in progress or use `DO NOT MERGE` label to
clarify the PRs state and comment with more information.
-->

**Steps to test this PR**:
1. Play with the new Zoom level setting, with or without customized
Dynamic Type
2. Text size on web pages should exclusively be controlled by the Zoom
level setting, and Dynamic Type should only affect non-webview content

<!--
Before submitting a PR, please ensure you have tested the combinations
you expect the reviewer to test, then delete configurations you *know*
do not need explicit testing.

Using a simulator where a physical device is unavailable is acceptable.
-->

**Definition of Done (Internal Only)**:

* [ ] Does this PR satisfy our [Definition of
Done](https://app.asana.com/0/1202500774821704/1207634633537039/f)?

**Copy Testing**:

* [ ] Use of correct apostrophes in new copy, ie `’` rather than `'`

**Orientation Testing**:

* [ ] Portrait
* [ ] Landscape

**Device Testing**:

* [ ] iPhone SE (1st Gen)
* [ ] iPhone 8
* [ ] iPhone X
* [ ] iPhone 14 Pro
* [ ] iPad

**OS Testing**:

* [ ] iOS 15
* [ ] iOS 16
* [ ] iOS 17

**Theme Testing**:

* [ ] Light theme
* [ ] Dark theme

---
###### Internal references:
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
samsymons added a commit that referenced this pull request Nov 28, 2024
# By Anh Do
# Via GitHub
* hotfix/7.146.2:
  Release 7.146.2-0 (#3646)
  Ignore dynamic type when changing zoom level (#3638)

# Conflicts:
#	Configuration/Version.xcconfig
#	DuckDuckGo/Settings.bundle/Root.plist
#	fastlane/metadata/default/release_notes.txt
samsymons added a commit that referenced this pull request Nov 29, 2024
…ging-info

* release/7.147.0:
  Release 7.147.0-4 (#3640)
  Ignore dynamic type when changing zoom level (#3638)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants