zircleUI / zircleUI

🚀 zircle-ui is a frontend library to develop zoomable user interfaces.

Home Page:https://zircleui.github.io/docs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Label of view inherits label from trigger -feature

Paperasse opened this issue · comments

In a view would it be nice to inherit the label from the z-spot that triggers the view.
eg: if the label of a z-spot is "Profile" it is evident that the view's label also becomes "Profile".

In that way redundancy is low. Of course, it still must be able that the view has its own label.

I was thinking about the implementation of the feature you suggest.

That is what I think:

  • The user maybe doesn't want to show a view's label.
  • As you said the user maybe want to set another label or put text in the z-view container.
  • As a result, the label shouldn't be inherited by default.

With that in mind, one possible implementation of the feature would be to allow user to write inherit into the label prop. However, I think that solution doesn't reduce the redundancy.

To sum up, I don't see the benefits to implement this feature. However I'm glad to hear your view about this.

Well, I think it is more logical to name the label the same as the triggering z-spot. By doing an inherit by default there is no need to define a label for the view. Those users that want another label can do that as it is now. And those that don't want a label could hide a label by defining it as "none". E.g. . In that way you serve all purposes.

I follow your idea and your proposed solution. However, I think that, at the moment, it's better to keep the labels going as they are now. Zircle is a multipurpose UI library and for this reason I'd prefer to maintain the UI elements as decoupled as possible. I'm aware that in your project have a function as you request would be very useful, but in other approaches maybe not.
Thank you @Paperasse for filling this issue, these kind of discussions are very valuable to consolidate zircle.

I think, it should be up to the "user" (of the zircle) to define the label/view name. Sometimes you want to inherit the name, sometimes you don't. So will be better to leave it the way it is now.