Skip to content

MudTabs: Rightmost tab is not fully scrolled into view when active#7876

Merged
henon merged 7 commits intoMudBlazor:devfrom
TDroogers:Bug/tabs/try2
Dec 26, 2023
Merged

MudTabs: Rightmost tab is not fully scrolled into view when active#7876
henon merged 7 commits intoMudBlazor:devfrom
TDroogers:Bug/tabs/try2

Conversation

@TDroogers
Copy link
Contributor

@TDroogers TDroogers commented Dec 7, 2023

Description

Fixes #5641
Before fix:
2023-12-07_16h50_10

After fix:
2023-12-07_16h44_25

How Has This Been Tested?

Updated unit tests and visual

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

@github-actions github-actions bot added bug Unexpected behavior or functionality not working as intended PR: needs review labels Dec 7, 2023
@codecov
Copy link

codecov bot commented Dec 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5efce2a) 87.39% compared to head (13758d5) 87.40%.

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.
📢 Have feedback on the report? Share it here.

if (position - compare > 0)
{
if (!AlwaysShowScrollButtons && _showScrollButtons)
compare -= 48 * 2;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess you would have to check your solution against all possible settings that influence _toolbarContentSize. Did you?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did, and it is also affected by resizing and that seems inconsistent. But will investigate more.

Copy link
Contributor Author

@TDroogers TDroogers Dec 13, 2023

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@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?

Copy link
Contributor

Choose a reason for hiding this comment

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

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.

@TDroogers TDroogers closed this Dec 7, 2023
@TDroogers TDroogers reopened this Dec 7, 2023
@TDroogers
Copy link
Contributor Author

@henon Do you have time to check this PR?

@henon
Copy link
Contributor

henon commented Dec 8, 2023

@Flaflo, IIRC you reworked tab scrolling a while ago. Maybe you could look over this as well?

@henon henon changed the title Scrolling Tab: Rightmost tab is not fully displayed when active MudTabs: Rightmost tab is not fully scrolled into view when active Dec 8, 2023
@henon
Copy link
Contributor

henon commented Dec 8, 2023

Is the new logic fully covered by the existing tests?

@TDroogers
Copy link
Contributor Author

Is the new logic fully covered by the existing tests?

Yes

@TDroogers TDroogers marked this pull request as draft December 13, 2023 19:22
@TDroogers TDroogers marked this pull request as ready for review December 26, 2023 10:21
@henon henon merged commit cc92141 into MudBlazor:dev Dec 26, 2023
@TDroogers TDroogers mentioned this pull request Dec 26, 2023
2 tasks
@TDroogers TDroogers deleted the Bug/tabs/try2 branch January 16, 2024 08:31
biegehydra pushed a commit to biegehydra/MudBlazor that referenced this pull request Apr 26, 2024
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unexpected behavior or functionality not working as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scrolling Tab: Rightmost tab is not fully displayed when active

2 participants