Skip to content

GestureArena class name is confusing #202

Closed

Description

@FlutterIssues

Issue by Hixie
Wednesday Oct 14, 2015 at 20:47 GMT
Originally opened as https://github.com/flutter/engine/issues/1618


GestureArena is confused about whether it is an arena with multiple matches, or if it's a group of arenas. We seem to use "arena" to mean both interchangeably right now.

Activity

  1. added this to the milestone on Dec 12, 2015
  2. self-assigned this
    on Feb 4, 2016
  3. abarth commented on Feb 4, 2016

    @abarth
    Contributor

    What should we call it? GestureDisambiguatior ? GestureResolver ?

    /cc @krisgiesing

  4. abarth commented on Feb 4, 2016

    @abarth
    Contributor

    /cc @Hixie

  5. krisgiesing commented on Feb 4, 2016

    @krisgiesing
    Contributor

    _GestureArenaState is really the singular GestureArena class (but it's private).

    GestureArena today is a map of keys to _GestureArenaState, i.e. it's a global lookup table of arenas.

    I would typically rename _GestureArenaState to GestureArena (or _GestureArena if it stays private), and GestureArena to GestureArenaManager. But we don't tend to use *Manager in Flutter code, so it might be odd to introduce that nomenclature just for this one case.

    Another option is to give GestureArena a static lookup method that returns a GestureArena, and make the methods close(), sweep(), hold(), and release() not take a key anymore. But that introduces lifetime issues since the caller might hold onto a GestureArena longer than necessary.

  6. Hixie commented on Feb 4, 2016

    @Hixie
    Contributor

    GestureArena and GestureArenaManager seems fine to me. It's an improvement over the current state.

  7. Hixie commented on Feb 11, 2016

    @Hixie
    Contributor

    We should also consider whether to continue making GestureArenaManager (currently GestureArena) pretend that it uses arbitrary keys (as opposed to integers), with GestureRecognizer (the subclass of GestureArenaMember) knowing that they're really ints. We should probably merge GestureArenaMember and GestureRecognizer and move to just saying int everywhere. We're not getting anything from pretending that keys can be arbitrary objects.

  8. krisgiesing commented on Feb 11, 2016

    @krisgiesing
    Contributor

    Agreed; and in fact the notion that the ints are pointer IDs turned out to be pretty important when I was working in this code a few months ago, so I might vote to be even more explicit.

  9. added a commit that references this issue on Mar 12, 2016
    44c4e93
  10. added a commit that references this issue on Mar 21, 2019
  11. 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.

  12. 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