Skip to content

ScrollDirection and BlockDirection confusion #151

Closed

Description

@FlutterIssues

Issue by Hixie
Thursday Aug 27, 2015 at 17:12 GMT
Originally opened as https://github.com/flutter/engine/issues/888


Right now scrollables use ScrollDirection and they're backed by render objects that use BlockDirection. However, that means ScrollDirection.both has no good mapping.

We should clean this up. I think we should probably still have two enums, one with "horizontal" and "vertical" and one with "horizontal", "vertical", and "both", but we should not split it across Block vs Scroll, instead of should split it according to who supports "both" and who doesn't.

Activity

  1. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by Hixie
    Tuesday Sep 15, 2015 at 17:58 GMT


    Briefly looked at this with @collinjackson. Scrollable right now asserts that you don't use "both". RenderViewport supports "both", nobody else seems to. We probably want a Widget to wrap RenderViewport with fling gesture support that does both, but other than that we should probably not have any use of the enum with "both".

  2. self-assigned this
    on Dec 5, 2015
  3. abarth commented on Dec 5, 2015

    @abarth
    Contributor

    Happy to fix this issue, but I'm not clear what we want. Here's a guess:

    • Scrollable should use an enum with just two values (horizontal and vertical)
    • Scrollable and RenderBlock should use the same enum
    • Viewport should use a different enum with three values

    Questions:

    • ScrollDirection is a nice name that makes sense for Scrollable. Should we use that name for RenderBlock too even though RenderBlocks aren't necessarily related to scrolling?
    • What should we call the enum with three values (horizontal, vertical, both) that Viewport uses?
  4. Hixie commented on Dec 5, 2015

    @Hixie
    Contributor

    Axisand MultiAxis?

  5. added this to the milestone on Dec 12, 2015
  6. removed their assignment
    on Dec 30, 2015
  7. added a commit that references this issue on Jan 5, 2016
    7aa575b
  8. Hixie commented on Jan 5, 2016

    @Hixie
    Contributor

    Should we still merge ScrollDirection and BlockDirection into a single enum?

  9. reopened this on Jan 5, 2016
  10. abarth commented on Jan 5, 2016

    @abarth
    Contributor

    Sorry, didn't mean to close this issue. Yes, we still need to delete BlockDirection.

  11. 1 remaining item

  12. Hixie commented on Jan 5, 2016

    @Hixie
    Contributor

    Looking at abarth@4246237 (from PR #1074), I really think we should just use "Axis" as the enum name.

  13. abarth commented on Jan 5, 2016

    @abarth
    Contributor

    Makes sense.

  14. added a commit that references this issue on Jan 7, 2016
    76dd622
  15. Hixie commented on Jan 7, 2016

    @Hixie
    Contributor

    Oh GitHub, you mean well...

  16. reopened this on Jan 7, 2016
  17. github-actions commented on Aug 17, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  18. locked as resolved and limited conversation to collaborators on Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

c: API breakBackwards-incompatible API changesc: contributor-productivityTeam-specific productivity, code health, technical debt.frameworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions