New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control; 'name_unique' option #16

Closed
BrodyB opened this Issue Aug 17, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@BrodyB

BrodyB commented Aug 17, 2015

Currently, if a Mint control is added into a Luxe scene with a duplicate name, the scene will throw a warning.

It'd be great if Mint control options had the 'name_unique' parameter like Luxe objects have, so this is handled in the constructor.

@underscorediscovery

This comment has been minimized.

Show comment
Hide comment
@underscorediscovery

underscorediscovery Aug 17, 2015

Member

Will consider a good option but name+Luxe.utils.uniqueid() should get you there

Member

underscorediscovery commented Aug 17, 2015

Will consider a good option but name+Luxe.utils.uniqueid() should get you there

@underscorediscovery

This comment has been minimized.

Show comment
Hide comment
@underscorediscovery

underscorediscovery Sep 6, 2016

Member

Upon further thought, it seems more sensible to default to a good name + unique id and the explicit name override to be what it's intended: explicit.

What that means is previously, the defaults were sensible plain names:

  • button
  • progress

Now:

  • button.2F6xWQ
  • progress.8FCHj

This means that you can create controls freely without naming overlaps, since the name is not a function of the library usage, unless explicitly required to be, in which case the application implementation detail will handle both of those and the library provides the option to be explicit. This alleviates what you were seeing in practice, the rendering creating multiple visuals named the same.

Member

underscorediscovery commented Sep 6, 2016

Upon further thought, it seems more sensible to default to a good name + unique id and the explicit name override to be what it's intended: explicit.

What that means is previously, the defaults were sensible plain names:

  • button
  • progress

Now:

  • button.2F6xWQ
  • progress.8FCHj

This means that you can create controls freely without naming overlaps, since the name is not a function of the library usage, unless explicitly required to be, in which case the application implementation detail will handle both of those and the library provides the option to be explicit. This alleviates what you were seeing in practice, the rendering creating multiple visuals named the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment