Skip to content

Position in bevy_ui has an overly general name #19418

@Jondolf

Description

@Jondolf

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

#18139 added a Position type to bevy_ui for a position relative to a UI node. This name is overly general and can easily conflict with similarly named types in user code or third party crates (such as Avian 0.3), especially because the type is in the prelude.

What solution would you like?

Rename the type to something more specific and UI-centric. Some ideas include UiPosition, or even GradientPosition, since that's what the type seems to be actually used for (unless future features also intend to use it).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-UIGraphical user interfaces, styles, layouts, and widgetsC-Code-QualityA section of code that is hard to understand or changeD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions