Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

The colors of the icons from the status bar should be in contrast with the status bar background color #12955

Merged
merged 2 commits into from
Oct 20, 2022

Conversation

iorgamgabriel
Copy link
Contributor

@iorgamgabriel iorgamgabriel commented Oct 17, 2022

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1795650

Pull Request checklist

  • Quality: This PR builds and passes detekt/ktlint checks (A pre-push hook is recommended)
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry or does not need one
  • Accessibility: The code in this PR follows accessibility best practices or does not include any user facing features

After merge

  • Milestone: Make sure issues closed by this pull request are added to the milestone of the version currently in development.
  • Breaking Changes: If this is a breaking change, please push a draft PR on Reference Browser to address the breaking issues.

Fixes #1795650
Fixes #1795650
Fixes #1795650
Fixes #1795650
Fixes #1795650
Fixes #1795650
Fixes #1795650
Fixes #1795650
Fixes #1795650
Fixes #1795650
Fixes #1795650

@Amejia481
Copy link
Contributor

👋🏽
@iorgamgabriel could you add some details about how this PR connect with #12894? I don't have the context around it. Thanks in advance!

@Amejia481
Copy link
Contributor

Amejia481 commented Oct 17, 2022

Should we also add tests to WindowTest?

@iorgamgabriel
Copy link
Contributor Author

@Amejia481 it's not connected to #12894

@Amejia481
Copy link
Contributor

Thanks for the clarification, I think we will need to connect the issue # and update the commit description with it :)

@iorgamgabriel
Copy link
Contributor Author

@Amejia481 I can't write unittests for this, because
fun Window.getWindowInsetsController(): WindowInsetsControllerCompat it is an extension function and I can't mock it.

@Amejia481
Copy link
Contributor

@Amejia481 I can't write unittests for this, because fun Window.getWindowInsetsController(): WindowInsetsControllerCompat it is an extension function and I can't mock it.

We could write tests to verify the expected behaviour, as we could read the value of getWindowInsetsController().isAppearanceLightStatusBars to verify if it has the correct one after calling setStatusBarTheme.

@Amejia481
Copy link
Contributor

Related ticket mozilla-mobile/focus-android#7860 (comment)

@Amejia481
Copy link
Contributor

@mcarare could take a look as you have context around the previous change? :)

@iorgamgabriel iorgamgabriel force-pushed the 1795650 branch 2 times, most recently from c47253d to f29d17f Compare October 18, 2022 08:44
@mozilla-mobile mozilla-mobile deleted a comment from mergify bot Oct 18, 2022
@iorgamgabriel
Copy link
Contributor Author

getWindowInsetsController().isAppearanceLightStatusBars always returns false does't matter if I send Black or White , I think it is a problem with Robolectric . I made some gui tests for this . @Amejia481

@mergify
Copy link
Contributor

mergify bot commented Oct 18, 2022

This pull request has conflicts when rebasing. Could you fix it @iorgamgabriel? 🙏

Copy link
Contributor

@Amejia481 Amejia481 left a comment

Choose a reason for hiding this comment

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

For adding a new UI/Instrumentation tests we need add an entry to the kind.yml file, after it is added you could give it a try by calling bors try :)

@iorgamgabriel iorgamgabriel force-pushed the 1795650 branch 2 times, most recently from 17341f4 to e4ccfed Compare October 19, 2022 11:05
@iorgamgabriel
Copy link
Contributor Author

bors try

bors bot pushed a commit that referenced this pull request Oct 19, 2022
@bors
Copy link

bors bot commented Oct 19, 2022

try

Build failed:

@iorgamgabriel
Copy link
Contributor Author

bors try

bors bot pushed a commit that referenced this pull request Oct 19, 2022
@bors
Copy link

bors bot commented Oct 19, 2022

try

Build succeeded:

@iorgamgabriel
Copy link
Contributor Author

The tests are failed because they run on API Level 21 and
/**
* Checks if the foreground of the status bar is set to light.
*


* This method always returns false on API < 23.
*
* @return true if the foreground is light
* @see #setAppearanceLightStatusBars(boolean)
*/
public boolean isAppearanceLightStatusBars() {
return mImpl.isAppearanceLightStatusBars();
}

@iorgamgabriel iorgamgabriel force-pushed the 1795650 branch 2 times, most recently from 45124d8 to ac0ed22 Compare October 19, 2022 13:36
@Amejia481
Copy link
Contributor

bors try

bors bot pushed a commit that referenced this pull request Oct 19, 2022
@bors
Copy link

bors bot commented Oct 19, 2022

try

Build succeeded:

… contrast with the status bar background color.
@iorgamgabriel
Copy link
Contributor Author

bors try

bors bot pushed a commit that referenced this pull request Oct 19, 2022
@bors
Copy link

bors bot commented Oct 19, 2022

try

Build succeeded:

Copy link
Contributor

@Amejia481 Amejia481 left a comment

Choose a reason for hiding this comment

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

Great job 🎖️ !

@Amejia481 Amejia481 removed the 🕵️‍♀️ needs review PRs that need to be reviewed label Oct 20, 2022
@iorgamgabriel iorgamgabriel added the 🛬 needs landing PRs that are ready to land label Oct 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🛬 needs landing PRs that are ready to land
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants