Adding Labels to a Field Type called Topic

Hey again,

Another feature I’m working on is Labels. Labels will be attached to a Topic and can be customized as for what they say, but the color can’t. I’ve attached a Screenshot on how these will work. I’m working through the data structure on this now.

In the above Screenshot you can see: 1.) The Topic with the associated label color (to the left). The Right is the UI to adding the appropriate Label to a Topic. This is made up of a Color and a Label. You can see the Edit Icon will allow the User to change the Label. No color is giving the user the option to not attach a label.

1.) My original thought is that since these will primarily be associated to a Topic. I can just make a "Text Field List under the Topic Data Type and then just use Custom States to display the new color and label associated to the Topic? For the time being you’ll only be able to add 1 label per Topic, but I suppose that could change.

2.) For more control I’m sort of leaning towards creating a new Data Type called Label and it would have the Label Name as a Text Field Type (not as a list since each label is it’s own up to 8) and also include a Text Field Type called Label Color. I would then Add an association to the Topic Field Type called Label (as a list) and then this would allow me to associate/bind the two. I’d then be able to modify the Topic with the appropriate Label and use Custom States if needed in order to Display he Color on the Topic.

Thoughts? 2 the best bet? Is their a better way?

I’m also thinking of using a RG to build this UI out. Since it’s really not seeing to be a Dropdown. Do you see any issues with that?

Lastly, I’ll likely want to display these Topics at some option based on the “Label”. Option 2 still the best?

Thanks!

Dennis

Just thought I’d bump this up. @gf_wolfer any thoughts on the above?

I would go with option 2 and use an HTML element to display dynamic colors.

Thanks Scott I’ve not used that HTML Element yet. Is it essentially an “open” div you can manipulate as you’d like? I was going to just use a Group with a conditional., but sounds like an HTML element with conditional is better.

You could save a Hex Colour Code to the piece of data, and then use the HTML element to display the colour. There is probably a proper way to style it but here is an example to show you what I mean

You can do this to dynamically change the Text Element’s colour as well, and the text element can be used to display an Icon. This might be preferred for the circle so it can be combined into the same element as the Text

Exactly. It’s much easier to customize, especially since you don’t have to write a condition for every color.

This topic was automatically closed after 70 days. New replies are no longer allowed.