The Wayback Machine - https://web.archive.org/web/20250604114304/https://github.com/flutter/flutter/pull/89271
Skip to content

Make NavigationRail scrollable #89271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Closed

Make NavigationRail scrollable #89271

wants to merge 8 commits into from

Conversation

maheshj01
Copy link
Member

This PR addressed the issue #89167 to make the navigationRail Scrollable when the number NavigationDestinations exceeds the viewport

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Sep 1, 2021
@google-cla google-cla bot added the cla: yes label Sep 1, 2021
@maheshj01
Copy link
Member Author

I am kind of not sure what tests would we write for this PR, some sort of feedback or pointers would be much helpful.

Thanks

@gspencergoog
Copy link
Contributor

So, a possible test would be to create a NavigationRail, and then synthesize a drag over the control and verify that it scrolls.

You'll also have to address the semantics failures in the existing tests. Ideally, the semantics tree wouldn't change, but since you are introducing scrolling, the semantics will change somewhat, and you'll have to verify that your changes are sensible. I also think perhaps that the semantics shouldn't change on a control that is too small to scroll, but perhaps there is overscroll even then, so maybe not (I'm not too sure about that point).

@flutter-dashboard
Copy link

This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@maheshj01
Copy link
Member Author

maheshj01 commented Sep 25, 2021

Thanks for taking a look @gspencergoog, I am sorry for the delayed response, I have added the scrollable test. But I have no idea at this point how to address the semantics test failure
The semantic tree fails with

Actual: SemanticsTester:<SemanticsTester for SemanticsNode#0(Rect.fromLTRB(0.0, 0.0, 2400.0, 1800.0))>
   Which: expected node id null to have textDirection "TextDirection.ltr" but found "null".
          Current SemanticsNode tree:

Some feedback or pointers would be much helpful.

@Hixie
Copy link
Contributor

Hixie commented Dec 8, 2021

@maheshmnj If you are still interested in working on this PR but looking for advice on writing the tests, I recommend reaching out for help on Discord in our #hackers-new channel. See the contributing guide for a link to the Discord server. Thanks!

@maheshj01
Copy link
Member Author

Closing this for now will send a PR When I can fully contribute

@davedega
Copy link

davedega commented Dec 1, 2022

any update on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants