Skip to content

Conversation

@wouterlucas
Copy link
Contributor

@wouterlucas wouterlucas commented Aug 12, 2025

Warning - breaking changes

width and height properties have been renamed to short hand form w and h to match upstream usage.
This includes:

  • Node props and Node Text Props (including animations)
  • Dimensions returned in events
  • Shader properties
  • Texture dimension properties

@michielvandergeest
Copy link
Contributor

@wouterlucas I prefer events to report w and h as well and keep things consistent

@chiefcll
Copy link
Contributor

Why width and height are preferable

  • Clarity and Self-Documentation
    width and height are immediately obvious to anyone reading the code — including people brand-new to the project or even to programming.
    w and h require context: to you and your team it’s second nature, but to a new contributor, they could mean “weight” or “window” or something else.

  • Consistency with the JavaScript / DOM ecosystem
    The HTML DOM, CSSOM, Canvas API, and almost every JS graphics API use width and height.
    Sticking with these terms reduces mental switching costs when moving between different parts of a codebase or different frameworks.

  • Better for tooling and searchability
    Searching the codebase for width finds all relevant references — searching for w often returns noise (variables named w, temporary counters, loop vars, etc.).
    Auto-complete in IDEs is more predictable and descriptive.

  • Reduces “hidden shorthand” culture
    Short forms encourage devs to make similar abbreviations elsewhere (xPosx, opacityo, etc.), leading to an API that’s harder to read for anyone who didn’t grow up inside the codebase.

Might also want to let the Plex folks know you're breaking their upstream framework as well.

@wouterlucas
Copy link
Contributor Author

Yeah good point - will let Plex know!

Copy link
Contributor

@michielvandergeest michielvandergeest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work ❤️

I found a few minor errors, possibly the ones responsible for the failing VR tests?

@wouterlucas wouterlucas added this pull request to the merge queue Aug 13, 2025
Merged via the queue into main with commit c3bb523 Aug 13, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants