processwire / processwire-requests

ProcessWire feature requests.
39 stars 0 forks source link

add ability to specify custom labels for pwlink classes #477

Closed BernhardBaumrock closed 1 year ago

BernhardBaumrock commented 1 year ago

Current vs. suggested behavior

Currently the pwlink interface looks like this:

image

Would it be possible to define custom labels for those classes? For a primary button in UIkit I need the class uk-button uk-button-primary but for the user that is not really a good wording...

I'd love to have something like Primary Button instead that adds the class uk-button uk-button-primary when selected.

Input could look something like this:

Primary Button: uk-button uk-button-primary
Secondary Button: uk-button uk-button-secondary
Transparent Button: uk-button uk-button-default

Why would the enhancement be useful to users?

Clients don't know anything about the meaning of uikit classes so a better readable label would help them a lot.

Thx in advance!

Screenshot

Here a screenshot that shows how much of a difference it makes:

image

ryancramerdesign commented 1 year ago

@BernhardBaumrock Thanks, I have added this as an alternative option for the existing label support, which showed value (label), though it wasn't mentioned anywhere, I just noticed it was coded in there, so I guess it was at least intended at some point. I've updated it to now include instructions and also now if you put the label in quotes, i.e. value="label" then it will show just the label, like your screenshot. This applies to not just class but rel and target options as well.

BernhardBaumrock commented 1 year ago

great, thank you ryan!