Location picker design change

Hello!

Context

When looking for a fix to the lack of alternative text for the location picker elements “pick” and “edit” on Loading... , I realized those were semantically buttons but in the DOM they were links. This difference is highlighted by the fact that they didn’t have any proper “href”.


This causes a few problems for everyone (see for example how the underlining appears on hover…), so I figured out we should replace them with HTML buttons. From then on, there’s one main choice to make: do we try to keep the style as close as possible as what it was, or do we update the design of these elements?

Proposal

Update the design of those elements to make them fit some of our standard button designs:


Opinion

I think the cost of this change in design is very low compared to the clarity and consistency it brings. The buttons don’t look too out of place with this “btn btn-default btn-xs” styles. This is pretty much the simplest and safest implementation.
We could put them in a button-group (shaped together like one pill), or even make them blend into the breadcrumb line shape, but these would need a bit more code and would be more prone to bugs. Personally I’m happy with how the proposed change looks already so I didn’t dig much further.

Conclusion

Are you in favor or against the proposal? Do you think another design would fit better?

For reference, here is the PR where I implemented this proposal (and the one where I’ll act depending on the results of this discussion). I’ll close the discussion in a week and proceed from there.

Thank you in advance for your answers!
Lucas C.

1 Like

LGTM but I’m not an expert in our L&F conventions so I’ll defer to @tkrieck on this. Thx

I agree, +1 for me

Thanks!

+1 thanks

I prefer the simple style without a border and background, but if we want to be consistent, then I think we should use the same style as for the comment action buttons, which are in a group (no space between them, even though I don’t like it that much).

Just to be sure, those are the buttons you’re referencing?


(my instance might look a bit off but the idea is here)

The annotationTools container is a btn-group. I’m neutral on this, IMO it doesn’t bring much when there’s only two buttons that are already grouped by proximity so I didn’t include it in the prototype above. It’s very easy to implement and maintain so I’m not against it.

Looks good +1 from me.

Thank you for your opinions! I’ll move along with this decision:

Convert the "pick"/"edit" location-picker links to real <button> elements styled btn btn-default btn-xs (pretty much +6 from everyone that joined), wrapped in a .btn-group (to match mflorea's comment) .

I’ll close the topic and proceed with the fix but don’t hesitate to add anything to the discussion!

2 Likes