Skip to content

Rename the Taffy struct #449

@nicoburns

Description

@nicoburns

What problem does this solve or what need does it fill?

The Taffy struct is not particularly descriptively named, especially now that taffy also has a low-level API and the Taffy struct doesn't represent the only API

What solution would you like?

Give the Taffy struct a better name. Suggestions:

  • DefaultTree / DefaultLayoutTree
  • SimpleTree / SimpleLayoutTree
  • TaffyTree / TaffyLayoutTree

We could also consider renaming the LayoutTree trait at the same time if that would help.

Additional context

We may also want to make the Taffy struct generic in future for two purposes:

  • To allow for both Send + Sync and non-Send + Sync measure functions. The former is required to allow Taffy instances to be moved between threads, but the latter is necessary in contexts like WASM where measure functions from JS typically won't be Send.
  • To allow a context to be provided for passing into measure functions (which would effectively allow them to borrow from their environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking-changeA change that breaks our public interfacedocumentationImprovements or additions to documentationusabilityMake the library more comfortable to use

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions