Fix incorrect Navigation Bar Appearance in Reader Detail screen#20363
Merged
Conversation
Contributor
|
| App Name | ||
| Configuration | Release-Alpha | |
| Build Number | pr20363-78b9db9 | |
| Version | 22.0 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | 78b9db9 | |
| App Center Build | jetpack-installable-builds #4291 |
Contributor
|
| App Name | ||
| Configuration | Release-Alpha | |
| Build Number | pr20363-78b9db9 | |
| Version | 22.0 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | 78b9db9 | |
| App Center Build | WPiOS - One-Offs #5266 |
Contributor
|
I'm about to start the 22.0 code freeze. This PR is not ready to land into |
salimbraksa
commented
Mar 20, 2023
| return navigationBar?.tintColor | ||
| } | ||
| set(newValue) { | ||
| // Ideally, we should be setting the navigationItem's tint color, but for some reason that didn't work. |
salimbraksa
commented
Mar 20, 2023
| /// Flag indicating whether the navigation bar appearance needs restoration when the view disappears. Default is `false`. | ||
| /// | ||
| /// Flag changes to `true` when this view changes the navigation bar tint color. In other words, when the `navBarTintColor` setter is called. | ||
| private var navigationBarAppearanceNeedsRestoration = false |
salimbraksa
commented
Mar 20, 2023
| /// The original navigation bar tint color. | ||
| /// | ||
| /// This property is used to restore the navigation bar tint color to its original value. | ||
| private var previousNavBarTintColor: UIColor? |
salimbraksa
commented
Mar 20, 2023
| navigationItem.scrollEdgeAppearance = appearance | ||
| if #available(iOS 15.0, *) { | ||
| navigationItem.compactScrollEdgeAppearance = appearance | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Setting the navigationItem's appearance ( instead of navigationBar ) is the most important change in the PR.
4543fed to
83c68db
Compare
…ppear white in posts with featured image
83c68db to
78b9db9
Compare
Generated by 🚫 dangerJS |
alpavanoglu
reviewed
Mar 21, 2023
Comment on lines
+167
to
+169
| guard let self = self else { | ||
| return | ||
| } |
Contributor
There was a problem hiding this comment.
Tidbit:
Now we can do
guard let self else {
return
}|
|
||
| public func deviceDidRotate() { | ||
| guard !useCompatibilityMode else { | ||
| public func load(completion: @escaping () -> Void) { |
Contributor
There was a problem hiding this comment.
This function handles a bit too much of action here. But no rush for fixing it since we need it in the hotfix
This was referenced Apr 6, 2023
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #20362
Description
This PR resolves a regression bug caused in this PR:
The aforementioned PR changed the Reader's navigation bar appearance from transparent to opaque. The new navigation bar appearance is inherited by all view controllers that get pushed to the same navigation controller. But one view controller should keep the transparent navigation bar appearance. And that is the
ReaderDetailViewController.This PR resolves that issue by refactoring the navigation bar appearance logic in
ReaderDetailViewController. So instead of settingnavigationBar.standardAppearance, I usednavigationItem.standardAppearanceinstead.Notes
I recommend to review each commit individually and in this order:
Screenshots
Test Instructions
Regression Notes
Potential unintended areas of impact
None.
What I did to test those areas of impact (or what existing automated tests I relied on)
None.
What automated tests I added (or what prevented me from doing so)
None.
PR submission checklist:
RELEASE-NOTES.txtif necessary.