-
Notifications
You must be signed in to change notification settings - Fork 473
For mozilla-mobile/fenix#11739: Fix tabcounter flicker #7446
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7446 +/- ##
============================================
+ Coverage 77.62% 77.66% +0.03%
+ Complexity 5138 5134 -4
============================================
Files 690 689 -1
Lines 24985 24949 -36
Branches 3690 3675 -15
============================================
- Hits 19394 19376 -18
+ Misses 4072 4062 -10
+ Partials 1519 1511 -8
Continue to review full report at Codecov.
|
Thanks for doing this. On a first glance, I am guessing we probably copied and paste the files directly. We have some significant formatting changes probably as a result of downstream changes that we might want to fix here (4 spaces vs 8 spaces for tabbing). I think we should only focus on your changes of fixing the count display logic in this PR instead of uplifting everything from Fenix in one go and make those changes either in a separate commit or PR for #2743. One of the benefits of upstreaming these changes is that we do have test coverage for this component which didn't make it into Fenix. You will also need to update TabCounterTest.kt |
Should i roll back changes other than count display logic? |
Only lint problem i saw from firefoxCI rtlsupport=true missing in manifest. Fixed. On my build environment ktlint and detekt didn't show that. Idk why. |
I imagine changes like removing the line under the box to be its own commit/pr to keep things simple and make it easy to tell what each commit is doing. So, keep that in mind when you are making your commits and PRs and that should make things go really smooth from a review point of view. |
components/ui/tabcounter/src/main/java/mozilla/components/ui/tabcounter/TabCounter.kt
Outdated
Show resolved
Hide resolved
components/ui/tabcounter/src/main/java/mozilla/components/ui/tabcounter/TabCounter.kt
Show resolved
Hide resolved
@gabrielluong I'll close this and open another pr with proper commiting. Don't review. Also local unit test doesn't work for me as i wrote on riot ac. Thus I'm trying to fix unit test via FirefoxCI. |
Found out why unit test fail. |
@gabrielluong unit tests fixed. |
One protip you could do is to squash your commits and force push to your branch which will update the PR. |
context: Context, | ||
attrs: AttributeSet? = null, | ||
defStyle: Int = 0 | ||
) : RelativeLayout(context, attrs, defStyle) { | ||
|
||
private val box: ImageView | ||
private val bar: ImageView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want the PR to be about removing the bar necessarily since it should be about fixing the tab count. So, I would suggest undo-ing some of these changes and just make sure it is refined to the problem we are trying to solve. We could introduce changes to remove the bar in a different commit/PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the bar for now need undo-ing or is there another?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably undo most changes that does not touch the count. The PR should look similar to your limited changes on resolving the count like your Fenix PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to close this pr and open a new pr with just the logic? Is this okey?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, organize it however you want to.
Warning: I'm amateur. Double check everything.
I've fixed tab counter flicker issue in fenix and @gabrielluong wanted to upstream that changes to ac.
I'm not good with components. Hope it's good to go :)
Pull Request checklist
After merge