Was looking for a way to improve UX for end users when creating dimensions that link to other URLs and explores.
A common LookML use case to enable further exploration is to create a dimension that links to another Looker report or explore. For example you may create a dimension that links to a history of all orders that user has ever created.
Typically we create a HTML parameter with liquid templating to generate a URL for a given user and their order history:
dimension: history {
sql: ${TABLE}.id ;;
html: <a href="/explore/thelook/order_items?fields=order_items.detail*&f[users.id]={{ value }}">Order History</a>
;;
}
However it’s not immediately obvious to the end user they can click on this dimension value. We can simply add a <button> HTML tag to render the link as a button, making the UX a bit more clear for our end users.
Do you have any other UX tricks that better guide users towards all the exploring and drilling they can do in Looker? Would love to see what you’ve come up with.
Hi, I have a dimension with the URL’s. I am trying to create a button for the values that will redirect to the respected page in the URL on clicking the button.
Hey @Dawid I’m curious how you were able to format the buttons?
I tried adding HTML styling (which I know next to nothing about) but could only format the space around the button (i.e. in the ‘cell’ of the table). See below - I was formatting the background to be white:
I had a few iterations of it and since removed the button altogether, as I figured out how to make the image itself hyperlink…but I think this how I got to the above (I changed the href to google just to keep things simple):