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

For #5694 & #6054: Allows users to change toolbar position #6608

Merged
merged 4 commits into from Nov 26, 2019

Conversation

@sblatz
Copy link
Contributor

sblatz commented Nov 14, 2019


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
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not
  • Accessibility: The code in this PR follows accessibility best practices or does not include any user facing features

After merge

  • Milestone: Make sure issues finished by this pull request are added to the milestone of the version currently in development.

To download an APK when reviewing a PR:

  1. click on Show All Checks,
  2. click Details next to "Taskcluster (pull_request)" after it appears and then finishes with a green checkmark,
  3. click on the "Fenix - assemble" task, then click "Run Artifacts".
  4. the APK links should be on the left side of the screen, named for each CPU architecture
@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Nov 15, 2019

Codecov Report

Merging #6608 into master will decrease coverage by 0.09%.
The diff coverage is 6.17%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master    #6608     +/-   ##
===========================================
- Coverage     17.33%   17.24%   -0.1%     
- Complexity      390      391      +1     
===========================================
  Files           280      281      +1     
  Lines         11173    11274    +101     
  Branches       1567     1592     +25     
===========================================
+ Hits           1937     1944      +7     
- Misses         9082     9175     +93     
- Partials        154      155      +1
Impacted Files Coverage Δ Complexity Δ
...lla/fenix/customtabs/ExternalAppBrowserFragment.kt 0% <ø> (ø) 0 <0> (ø) ⬇️
...mozilla/fenix/browser/BrowserToolbarTopBehavior.kt 0% <0%> (ø) 0 <0> (ø) ⬇️
...ava/org/mozilla/fenix/settings/SettingsFragment.kt 0% <0%> (ø) 0 <0> (ø) ⬇️
...lla/fenix/components/toolbar/BrowserToolbarView.kt 0% <0%> (ø) 0 <0> (ø) ⬇️
...va/org/mozilla/fenix/search/toolbar/ToolbarView.kt 0% <0%> (ø) 0 <0> (ø) ⬇️
...a/org/mozilla/fenix/browser/BaseBrowserFragment.kt 0% <0%> (ø) 0 <0> (ø) ⬇️
...lla/fenix/components/toolbar/DefaultToolbarMenu.kt 0% <0%> (ø) 0 <0> (ø) ⬇️
...va/org/mozilla/fenix/components/metrics/Metrics.kt 20.41% <0%> (-0.18%) 0 <0> (ø)
.../java/org/mozilla/fenix/browser/BrowserFragment.kt 0% <0%> (ø) 0 <0> (ø) ⬇️
.../mozilla/fenix/settings/ToolbarSettingsFragment.kt 0% <0%> (ø) 0 <0> (?)
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7e8f079...5b24b8f. Read the comment docs.

@sblatz sblatz force-pushed the sblatz:top-nav-bar-dynamic branch 2 times, most recently from d1ea29e to 8f7c4d3 Nov 15, 2019
@sblatz sblatz force-pushed the sblatz:top-nav-bar-dynamic branch 3 times, most recently from 1e00e65 to 82d19c5 Nov 15, 2019
@sblatz sblatz marked this pull request as ready for review Nov 15, 2019
@sblatz sblatz force-pushed the sblatz:top-nav-bar-dynamic branch 3 times, most recently from d02a2c7 to 1fbc3c7 Nov 15, 2019
@sblatz sblatz changed the title WIP: Top nav bar dynamic (another solution) For #5694 & #6054: Adds user choice for toolbar position Nov 15, 2019
@sblatz sblatz requested a review from boek Nov 15, 2019
@sblatz sblatz changed the title For #5694 & #6054: Adds user choice for toolbar position For #5694 & #6054: Allows users to change toolbar position Nov 15, 2019
@sblatz

This comment has been minimized.

Copy link
Contributor Author

sblatz commented Nov 15, 2019

Request for data collection review form

All questions are mandatory. You must receive review from a data steward peer on your responses to these questions before shipping new data collection.

  1. What questions will you answer with this data?
  • How often users choose a top toolbar.
  • How many users are currently using top vs bottom toolbar (core metric ping)
  1. Why does Mozilla need to answer these questions? Are there benefits for users? Do we need this information to address product or business requirements?
  • If more than 20% of users choose top nav bar (without surfacing this option during onboarding) then we will investigate (through user research or otherwise) whether we need to consider changing the default.
  1. What alternative methods did you consider to answer these questions? Why were they not sufficient?
  • N/A (These are baseline metrics)
  1. Can current instrumentation answer these questions?
  • No, this is a new feature and there is no telemetry surrounding which selection users make for their toolbar position.
  1. List all proposed measurements and indicate the category of data collection for each measurement, using the Firefox data collection categories on the found on the Mozilla wiki.
  • All data is Category 2.
  1. How long will this data be collected?
  • Until 03/01/2020
  1. What populations will you measure?
  • All release, beta, and nightly users with telemetry enabled.
  1. Please provide a general description of how you will analyze this data.
  • Glean / Amplitude
  1. Where do you intend to share the results of your analysis?
  • Only on Glean, Amplitude and with mobile teams.
@sblatz sblatz force-pushed the sblatz:top-nav-bar-dynamic branch from 1fbc3c7 to 2abb766 Nov 15, 2019
@sblatz sblatz changed the title For #5694 & #6054: Allows users to change toolbar position For #5694 & #6054: Allows users to change toolbar position RE RUN Nov 15, 2019
@sblatz sblatz changed the title For #5694 & #6054: Allows users to change toolbar position RE RUN For #5694 & #6054: Allows users to change toolbar position Nov 15, 2019
@sblatz sblatz force-pushed the sblatz:top-nav-bar-dynamic branch from 2abb766 to 5f3d632 Nov 15, 2019
@sblatz sblatz changed the title For #5694 & #6054: Allows users to change toolbar position For #5694 & #6054: Allows users to change toolbar position RUN Nov 15, 2019
@sblatz sblatz changed the title For #5694 & #6054: Allows users to change toolbar position RUN For #5694 & #6054: Allows users to change toolbar position Nov 15, 2019
@sblatz sblatz force-pushed the sblatz:top-nav-bar-dynamic branch from 5f3d632 to d27f135 Nov 15, 2019
*/
override fun onDependentViewChanged(parent: CoordinatorLayout, child: View, dependency: View): Boolean {
val engineView = child.findViewInHierarchy { it is EngineView } as EngineView?
engineView?.setVerticalClipping(dependency.height - dependency.translationY.toInt())

This comment has been minimized.

Copy link
@hiikezoe

hiikezoe Nov 20, 2019

This looks pretty odd to me. This setVerticalClipping API ends up calling setFixedBottomOffset in GeckoView, the function does just set a margin for position:fixed elements at bottom of viewport. As far as I can tell, we need at least one new API make the top toolbar dynamic properly, the API would be a function to set an offset of the root viewport (i.e. not only for position:fixed elements).

CCing @pocmo and @snorp.

This comment has been minimized.

Copy link
@pocmo

pocmo Nov 20, 2019

Contributor

Yes, for the top toolbar this should not be called at all. And I think @sblatz decided to not use this behavior implementation for the top toolbar, right? Afaik this was never really used in Fenix.

@sblatz sblatz force-pushed the sblatz:top-nav-bar-dynamic branch from d27f135 to 9ac3e83 Nov 22, 2019
@ekager

This comment has been minimized.

Copy link
Member

ekager commented Nov 22, 2019

Could we make sure we're dealing with the snackbar anchoring correctly in browser fragments?

Maybe add a new function that gets the anchor by checking the status like
if (settings().shouldUseBottomToolbar) (toolbar.view) else null

Copy link
Contributor

Baron-Severin left a comment

I'd like to hear from UX on the home toolbar position, but from an engineering perspective I think this is looking really good. There are a few things that can be cleaned up before we merge though.

@sblatz sblatz force-pushed the sblatz:top-nav-bar-dynamic branch 6 times, most recently from e4a09fc to df2eb66 Nov 25, 2019
@sblatz sblatz force-pushed the sblatz:top-nav-bar-dynamic branch from df2eb66 to 5b24b8f Nov 25, 2019
@sblatz sblatz added the do not land label Nov 25, 2019
@boek

This comment has been minimized.

Copy link
Member

boek commented Nov 26, 2019

Data Review Form (to be filled by Data Stewards)

  1. Is there or will there be documentation that describes the schema for the ultimate data set in a public, complete, and accurate way?
    Yes, metrics.yaml and metrics.md

  2. Is there a control mechanism that allows the user to turn the data collection on and off?
    Yes, under data controls

  3. If the request is for permanent data collection, is there someone who will monitor the data over time?
    Has expiry

  4. Using the category system of data types on the Mozilla wiki, what collection type of data do the requested measurements fall under?
    Type 2

  5. Is the data collection request for default-on or default-off?
    Default on

  6. Does the instrumentation include the addition of any new identifiers (whether anonymous or otherwise; e.g., username, random IDs, etc. See the appendix for more details)?
    No

  7. Is the data collection covered by the existing Firefox privacy notice?
    Yes

  8. Does there need to be a check-in in the future to determine whether to renew the data?
    Will check-in at expiry

  9. Does the data collection use a third-party collection tool?
    No

@boek boek merged commit 769c1e4 into mozilla-mobile:master Nov 26, 2019
12 checks passed
12 checks passed
Decision Task FirefoxCI (pull_request)
Details
build-android-test FirefoxCI (pull_request)
Details
build-debug FirefoxCI (pull_request)
Details
lint-compare-locales FirefoxCI (pull_request)
Details
lint-detekt FirefoxCI (pull_request)
Details
lint-ktlint FirefoxCI (pull_request)
Details
lint-lint FirefoxCI (pull_request)
Details
pr-complete FirefoxCI (pull_request)
Details
signing-android-test FirefoxCI (pull_request)
Details
signing-debug FirefoxCI (pull_request)
Details
test-debug FirefoxCI (pull_request)
Details
ui-test-x86 FirefoxCI (pull_request)
Details
H1l4nd0r added a commit to H1l4nd0r/exavar that referenced this pull request Dec 1, 2019
…e toolbar position (mozilla-mobile#6608)

* For mozilla-mobile#5694 & mozilla-mobile#6054: Adds preference screen for toolbar

* For mozilla-mobile#5694: Adds changing toolbar position functionality

* No issue: Updates telemetry links to actually work lol 😬

* For mozilla-mobile#6054: Adds toolbar position to core ping
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.