Closed Firecash closed 3 years ago
It seems like renaming works - if after renaming a top site the app is restarted, when viewing again the list of top sites we'll see the updated name. Is just that we are not properly updating the TopSites item on the second page.
And this because here we iterate through all top sites and save the index of the renamed top site And here we'll try to update the item at that index. But a top site shown on the second page would have an index between [8, 15] while we can only show 8 items.
So a quick fix is to just use the remainder of item.first % TOP_SITES_PER_PAGE
instead of the item index when trying to update a top site.
Hi @Firecash ! Thank you for the report! I tested it on the Latest Release 87.0.0-rc.1 and on the latest Nightly 210329 00:12 (GV89). This issue is reproducible. Device used: Motorola Nexus 6 (Android 7.1.1)
I think the same bug exists for Remove
option too.
I would like to take up the fix for this issue.
Can I work on this issue?
Can I work on this issue?
Sure! Thank you!
I think the same bug exists for
Remove
option too. I would like to take up the fix for this issue.
Sorry, I see you wanted to wanted to work on this and announced it earlier. The ticket is yours if you wanted.
Regarding "Remove" I see removing a top site even from the second page of top sites works. Is this not the case for you. If you see an issue with that option please open a new ticket.
Yes, I would like to work on this issue and create a PR.
I am currently using 87.0.0-rc1. I am unable to remove top sites from the second page. I use a OnePlus 7 handset running Android 10. Although, in my local emulator, I am able to remove top sites from the second page without issues. So I guess it has been fixed.
I was able to make the changes and get the top sites renaming working.
But this is bringing up another bug which I believe is hidden currently because renaming and subsequent re-rendering doesn't happen. This happens if page 2 contains less than 5 items in the list. The grid snaps to a single line on rename and it stays that way even for page 1.
Page 2
Page 1
Do you want me to try and fix this issue too?
That is interesting. Seems like to to fully fix the renaming issue we need this part resolved also otherwise we'd be introducing an even bigger bug. We'll probably need a custom ViewPager that remeasures each page after swiping to it.
Measuring each page separately would mean that swiping between top sites pages with different heights (2 rows of topSites and then 1 row) the entire topSites layout would become smaller/bigger and all the other homescreen items "move" in response. Right now having <=4 top sites on the second page still has that page occupying two rows. After the above proposed change the 1st page of top sites would occupy 2 rows and the second page just 1 row.
Asking UX if the top sites layout should have a dynamic height when switching between pages or all pages should have the height of the biggest one. (I think we can "remember" the biggest height and use that in our custom ViewPager even if another page would have a smaller height).
Yeah, I too think this is a much bigger bug than renaming not reflecting immediately. Will wait for input from UX before I proceed on this further.
Can somebody help me to know that what we have to do with this issue. I am not getting any clue how to fix this
@drs12345-SS To fix just the renaming issue we could use this - https://github.com/mozilla-mobile/fenix/issues/18672#issuecomment-809307282
Fixing the rename being visible issue will show another issue and based on the investigations from kanish671 we are waiting for UX to confirm what's the expected behavior:
After knowing that we can use a custom ViewPager which remeasures the pages on each swipe - if deciding to use different pages heights or uses a cached height value - if deciding to use the two rows on each page (even if on the second one there are fewer than 4 top sites displayed).
The UX team has a lot on their plate currently, please wait until we get a response.
When people have more than 8 top sites the layout should stay consistent – so all pages have the height of the biggest one. Thanks!
@kanish671 I think we now have all the needed details about how the feature should function. Do you plan to work on this? Need any help?
Hi @Mugurell Yes, now we have the details. I would need help in understanding what components would need modification. I would like to try fixing this.
actually i am new to it but i want to contribute in mozilla so can you please guide me about the bug that what actually it is? .
On Thu, Apr 8, 2021 at 11:20 PM Anish Krishnaswamy @.***> wrote:
Hi @Mugurell https://github.com/Mugurell Yes, now we have the details. I would need help in understanding what components would need modification. I would like to try fixing this.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mozilla-mobile/fenix/issues/18672#issuecomment-816019230, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATRPCAMGZJ5IX6OP7D7KL5DTHXUETANCNFSM4Z55OGYA .
@drs12345-SS I am actually working on this and contributing to fix the bug myself. The original bug was that renaming of top sites in page 2 did not reflect immediately. I made changes to fix that, which uncovered another bug. The new bug description is mentioned here
@Mugurell Here is my thought on how we can set the height: If we are rendering page 2, we know for sure that page 1 would be full. So I think we can set the height of the view as that of two rows whenever there are more than 4 items in top sites list. I am quite new to android programming, so would need a bit of guidance on how to achieve this.
Hello @kanish671 Sorry I haven't responded earlier. It might be that the later changes are not trivial. Other than https://github.com/mozilla-mobile/fenix/issues/18672#issuecomment-810808051 and https://github.com/mozilla-mobile/fenix/issues/18672#issuecomment-810837558 I don't have other insights. You can open a PR with your changes and I'll look into resolving the viewpager height part.
Sure @Mugurell I will raise a PR for fixing the renaming bug
Verified as fixed on Nightly 5/19 with Samsung Note 10 (Android 11).
Steps to reproduce
1) Capture 8 important pages (or more) for the home page.
2) On the second page (change to the second page with a swipe gesture) of the -important pages-
3) Renaming of the entries is not possible
Expected behavior
The renaming of the entries should also be possible for entries on the second page.
Actual behavior
Entries on the second page of the important pages cannot be renamed.
Device information
In my opinion, the problem devices is independent. The error also occurs on completely different devices. Also available in pre-release versions up to the Nightly version
Device vendor / model and Android version: ? Nokia 7.2 (TA-1196) / Latest Android 10 Build 00WW_2_410_SP01
Firefox for Android version: ? (go to Settings -> About Firefox) 87.0.0-rc.1
┆Issue is synchronized with this Jira Task