Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

For #8312 - Show Top Sites in a ViewPager #14116

Merged
merged 1 commit into from
Aug 24, 2020

Conversation

gabrielluong
Copy link
Member

@gabrielluong gabrielluong commented Aug 24, 2020

Fixes #8312

Pull Request checklist

  • 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. In addition, it includes a screenshot of a successful accessibility scan to ensure no new defects are added to the product.

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

@gabrielluong
Copy link
Member Author

This follows the approach that is used in Firefox Lite mozilla-mobile/FirefoxLite@7d7be8e. The Top site layout is as follow:
HomeFragment RecyclerView -> ViewPager2 (displays the individual pages) -> RecyclerView (4 column grid) -> TopSiteItems

The PagerIndicator is reused from https://github.com/mozilla-tw/FirefoxLite/blob/32ddedf67826e13ae0c6dd3591117f5020daebd4/app/src/main/java/org/mozilla/rocket/home/topsites/ui/PagerIndicator.kt.

We removed the dependency on google_flexbox since that is no longer used.

The proper layout of the items and grid will be done in #13765.

@codecov-commenter
Copy link

codecov-commenter commented Aug 24, 2020

Codecov Report

Merging #14116 into master will decrease coverage by 0.10%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #14116      +/-   ##
============================================
- Coverage     29.78%   29.67%   -0.11%     
+ Complexity     1135     1133       -2     
============================================
  Files           437      440       +3     
  Lines         17565    17616      +51     
  Branches       2280     2289       +9     
============================================
- Hits           5231     5227       -4     
- Misses        11950    12004      +54     
- Partials        384      385       +1     
Impacted Files Coverage Δ Complexity Δ
...fenix/home/sessioncontrol/SessionControlAdapter.kt 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...la/fenix/home/sessioncontrol/SessionControlView.kt 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...ssioncontrol/viewholders/TopSitePagerViewHolder.kt 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...me/sessioncontrol/viewholders/TopSiteViewHolder.kt 100.00% <ø> (ø) 2.00 <0.00> (ø)
...sioncontrol/viewholders/topsites/PagerIndicator.kt 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...ntrol/viewholders/topsites/TopSitesPagerAdapter.kt 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...in/java/org/mozilla/fenix/settings/SupportUtils.kt 70.00% <0.00%> (-4.00%) 11.00% <0.00%> (-2.00%)

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 433a20d...09fc3a4. Read the comment docs.

Copy link
Contributor

@ekager ekager left a comment

Choose a reason for hiding this comment

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

r+ w nits

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] There is no limit of how many top-sites you can add
3 participants