MudTabs: Rightmost tab is not fully scrolled into view when active#7876
MudTabs: Rightmost tab is not fully scrolled into view when active#7876henon merged 7 commits intoMudBlazor:devfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #7876 +/- ##
==========================================
+ Coverage 87.39% 87.40% +0.01%
==========================================
Files 392 392
Lines 11602 11612 +10
Branches 2329 2334 +5
==========================================
+ Hits 10140 10150 +10
Misses 950 950
Partials 512 512 ☔ View full report in Codecov by Sentry. |
| if (position - compare > 0) | ||
| { | ||
| if (!AlwaysShowScrollButtons && _showScrollButtons) | ||
| compare -= 48 * 2; |
There was a problem hiding this comment.
I'm not sure about this part myself. Sometimes the buttons are calculated into _toolbarContentSize and sometimes not. AlwaysShowScrollButtons is one, but I'm not sure if that's all.
There was a problem hiding this comment.
I guess you would have to check your solution against all possible settings that influence _toolbarContentSize. Did you?
There was a problem hiding this comment.
I did, and it is also affected by resizing and that seems inconsistent. But will investigate more.
There was a problem hiding this comment.
The inconsistency comes from the ResizeObserver. That does not detect the changes from _showScrollButtons
My code works fine, untill it gets resized in a way the ResizeObserver detects.
There was a problem hiding this comment.
@henon I should probably create an js function to update the size on request, but I don't have time to do this in the near future. Should we wait with this PR until then? Or merge it now and improve in a later time?
There was a problem hiding this comment.
I would say, we merge now as it is an improvement. If you would please make an issue that describes the problem and the proposed solution as well as links to this PR so that it doesn't get lost. Of course if you find the time later it would be perfect if you could complete it, as you already know exactly what the problem is.
|
@henon Do you have time to check this PR? |
|
@Flaflo, IIRC you reworked tab scrolling a while ago. Maybe you could look over this as well? |
|
Is the new logic fully covered by the existing tests? |
Yes |
…udBlazor#7876) * Observing prev / next button does not work. * The tests fail, but it seems to be a bug in the tests * Fix failing tests * Fixing bugs created by fixinging tests
Description
Fixes #5641

Before fix:
After fix:

How Has This Been Tested?
Updated unit tests and visual
Types of changes
Checklist:
dev).