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

Bugfix FXIOS-8309 [v122.1] System theme resetting bug #18429

Merged
merged 3 commits into from
Jan 29, 2024

Conversation

adudenamedruby
Copy link
Contributor

📜 Tickets

Jira ticket
Github issue

💡 Description

the migration was resetting the system theme.

Also, I started removing a bit more legacy theme stuff. Just a bit.

📝 Checklist

You have to check all boxes before merging

  • Filled in the above information (tickets numbers and description of your work)
  • Updated the PR name to follow our PR naming guidelines
  • Wrote unit tests and/or ensured the tests suite is passing
  • When working on UI, I checked and implemented accessibility (minimum Dynamic Text and VoiceOver)
  • If needed I updated documentation / comments for complex code and public methods

Copy link
Contributor

@lmarceau lmarceau left a comment

Choose a reason for hiding this comment

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

Will this PR conflicts with the legacy removal PR?

@adudenamedruby
Copy link
Contributor Author

It won't, because that legacy one was based off this. So this needs to be merged first, then that. :)

@adudenamedruby
Copy link
Contributor Author

adudenamedruby commented Jan 29, 2024

@Mergifyio backport release/v122 release/v123

Copy link
Contributor

mergify bot commented Jan 29, 2024

backport release/v122 release/v123

✅ Backports have been created

@mobiletest-ci-bot
Copy link

Messages
📖 Project coverage: 33.66%
📖 Edited 7 files
📖 Created 0 files

Client.app: Coverage: 32.32

File Coverage
LegacyThemeManager.swift 51.85%
ThemeMiddleware.swift 88.24%
TelemetryWrapper.swift 70.31%
ThemeSetting.swift 0.0% ⚠️

CredentialProvider.appex: Coverage: 22.09

File Coverage
LegacyThemeManager.swift 51.85%

Generated by 🚫 Danger Swift against e041268

Copy link
Contributor

@cyndichin cyndichin left a comment

Choose a reason for hiding this comment

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

thanks for the update! looks a lot cleaner as well 🔥
one comment for double checking, not a blocker.

legacyThemeManager.current = isLightTheme ? LegacyNormalTheme() : LegacyDarkTheme()
themeManager.changeCurrentTheme(isLightTheme ? .light : .dark)
themeManager.changeCurrentTheme(newTheme)
Copy link
Contributor

Choose a reason for hiding this comment

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

logic changed here in which we don't default to dark theme, are we okay with this update?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, this should default to whatever's called, really, as opposed to having a random default. It's cleaner this way and the logic is easier to follow, imo.

@adudenamedruby
Copy link
Contributor Author

BR is green

@adudenamedruby adudenamedruby merged commit 43e00b7 into mozilla-mobile:main Jan 29, 2024
3 of 4 checks passed
@adudenamedruby adudenamedruby deleted the rgb/8309_themeBugs branch January 29, 2024 16:31
mergify bot pushed a commit that referenced this pull request Jan 29, 2024
* fix issue

* improvements because they're nice

* fix mock

(cherry picked from commit 43e00b7)

# Conflicts:
#	firefox-ios/Client/Frontend/Settings/ThemeSettings/ThemeMiddleware.swift
mergify bot pushed a commit that referenced this pull request Jan 29, 2024
* fix issue

* improvements because they're nice

* fix mock

(cherry picked from commit 43e00b7)

# Conflicts:
#	BrowserKit/Sources/Common/Theming/DefaultThemeManager.swift
#	Client/Frontend/Settings/Main/General/ThemeSetting.swift
#	Client/Frontend/Settings/ThemeSettings/ThemeMiddleware.swift
#	Client/Frontend/Theme/LegacyThemeManager/LegacyThemeManager.swift
#	Client/Telemetry/TelemetryWrapper.swift
adudenamedruby added a commit that referenced this pull request Jan 29, 2024
… (#18456)

* Bugfix FXIOS-8309 [v122.1] System theme resetting bug (#18429)

* fix issue

* improvements because they're nice

* fix mock

(cherry picked from commit 43e00b7)

# Conflicts:
#	firefox-ios/Client/Frontend/Settings/ThemeSettings/ThemeMiddleware.swift

* Update ThemeMiddleware.swift

---------

Co-authored-by: roux g. buciu <[email protected]>
jjSDET pushed a commit to jjSDET/firefox-ios that referenced this pull request Feb 1, 2024
…#18429)

* fix issue

* improvements because they're nice

* fix mock
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.

4 participants