rill icon indicating copy to clipboard operation
rill copied to clipboard

feat: human readable dimension filters in URL

Open briangregoryholmes opened this issue 1 year ago • 1 comments

https://www.notion.so/rilldata/Passing-Filters-as-part-of-URL-ac2972fcd3f64de3af20838ec1c0231b?pvs=4

briangregoryholmes avatar Jul 25 '24 16:07 briangregoryholmes

@briangregoryholmes : Can you resolve the conflicts here ? Is this ready to review ?

nishantmonu51 avatar Aug 19 '24 19:08 nishantmonu51

It looks like you need to add support for this feature to Rill Cloud. On opening a Cloud dashboard, I hit this error: image

And while we currently don't need support for the other instances of the <Dashboard /> component (MetricsExplorerEmbed.svelte, [org]/[project]/-/share/[token]/+page.svelte), I'm guessing they'll need to be protected from the above error.

ericpgreen2 avatar Aug 28 '24 22:08 ericpgreen2

On an Adbids dashboard, I've tried navigating to this URL: http://localhost:3001/dashboard/Adbids_dashboard?filter="publisher eq Facebook"

The "F" is getting clipped from "Facebook" to "acebook":

image

Can you please update the PR description with the API that you've implemented and some examples?

ericpgreen2 avatar Aug 28 '24 22:08 ericpgreen2

@ericpgreen2 According to the Notion, dimension values are required to be surrounded by some form of single quotes. I updated the description with a variety of examples.

Unfortunately, I don't think it's practical to validate whether a dimension value is valid, though that's certainly something we can discuss. I've added some guard rails and an updated warning if we're able to detect that something should be quoted that isn't.

Added cloud support.

briangregoryholmes avatar Aug 29 '24 03:08 briangregoryholmes

@ericpgreen2 According to the Notion, dimension values are required to be surrounded by some form of single quotes. I updated the description with a variety of examples.

Oh, got it now, thanks.

I commented in the Notion doc, but IMO the ephemeral nature of these filters makes for a frustrating UX. Often, I find myself getting some part of the filter syntax incorrect. I would like to iterate on the filter / edit it after submission. But when the filter is immediately transformed into its protobuf representation, I cannot edit what I input. Let's wait for feedback from @mindspank and @nishantmonu51.

ericpgreen2 avatar Aug 30 '24 00:08 ericpgreen2