More dashboard CSS (filters popovers + buttons + more)

Jared Hardy · Friday Demos · October 18, 2024 · 9:30

A bunch of new CSS surface area for dashboards, plus some conversation about future work. Want to make sure the experiences is 100% controllable for embedded deployments.

Try it yourselfThe full week on docsdashboardsembed

Transcript

This transcript is auto-generated. Names and product terms may be wrong.

  1. I guess I could start with the demo uh if we're doing demos um I've been working on some improvements to our theming um and particularly around controls and filters um we have some rudimentary controls right now where you can change the background colors of the controls on the dashboard and um the pop over here um and the best way to kind of show some locations of this is to like picked like I don't know garish colors that like don't work well so if you were to pick Green it's probably not necessarily realistic color you may pick but maybe there is a reason you want to do that but you can see like text color doesn't quite come through um if you were to pick even

  2. like a medium gray for the popover um uh that's I picked a transparent color sorry let's see if I do that again if it comes through um not sure why it's looking like that but you can see that you know you're picking colors here uh it doesn't work well let's try red let's see what's going on here um yeah so anyway you start picking colors and um the colors don't quite work well and once you start touching any color you kind of want to be able to touch all the colors because you know you're trying to like theme these as a as a unit or working on something that's a little more harmonious um so kind of like in my local branch here um what

  3. you'll see is kind of restructuring some of these pieces and offering a lot more uh knobs for you to go tweak these pieces and get kind of a design that you want so kind of introduced um some structure here to kind of collapse these because you'll see we'll have a lot more options uh tiles is kind of what we have right now already going to expand these but we have a couple new sections for controls which are these here and kind of all the colors that you want to touch uh controls for the popover and the inputs inside of them they're quite sophisticated and complicated component so you do need a lot of little pieces to uh touch all the Styles and then we have

  4. uh kind of a new control for the buttons down here um I'm not going to go live uh tweak all these colors it's hard to pick anything but let me um just kind of like walk through a couple that I put together locally here so if we like apply like kind of like this natural uh theme here hopefully it loads uh you can see kind of like you know better control of the uh um controls we can change a label color we can change the color of the text inside these inputs now pop these over there's like a subtle kind of like green color on the uh popover we can control the transparent buttons um the text inside these um you can open these up

  5. and then uh it's loading very slowly right now but you know you you can kind of like control the token colors and the check box colors and all these little pieces to kind of like really uh dial in the design that you're looking for um here's a few more examples there's like a bubble gum which is very pink uh you know you can kind of invert the form Fields based on kind of the styles that you want and um these work in kind of multiple places where you see you know like our date filters are pretty complex you know the icon colors are here uh the pieces in here and selecting the calendar controls we still have some pieces to dial in like get these

  6. Chevrons out here are actually background images we need to go change how these work so they can inherit the colors but overall you have a lot more a lot more control um and here's like another one that's just like again trying just like really intense colors so you can kind of see all the pieces that you can style so we have placeholder colors we have label colors input text colors uh background colors uh you can pop these open this is like really green just to like flip the inverse and you know button colors and again uh all these little all these little pieces inside there's just lots of control so there's like gradients on these and these check boxes are just all different so um

  7. kind of opening up just a lot of a lot of nice options for people that want to style these quite complicated pieces so um yeah this should be hopefully shipping soon I'm kind of need to wrap up this PR get it reviewed and eventally refactor a little bit the CSS because it's pretty complicated to dial these pieces in but um making some good progress and and um it's exciting and I think people and customers will hopefully appreciate that they can uh style their controls uh how they want was huge yeah th% so cool I did have a question for you though Jared yes uh what is the lift to where it says default to actually show the default value I mean right now we're manually

  8. setting those values in in the code like we're just like we have like a little placeholder thing we could potentially put the default values in there um I mean next step after this is like putting in real controls for this like you want you don't want type inex codes all the time if you have them you want to type in but you want to put a Color Picker and some some accept numbers and so you kind of want a little bit better inputs for working with numbers are on radius and so I think we have a lot of stuff to work in there I agree maybe the default is not the best color but I mean like in my mind the ideal state is it

  9. just like shows a color that it is like when you're picking color it's like oh it's here's white for the background of the inputs uh by default and then you can kind of come in and pick those colors as you want but yeah I mean it's not a huge lift to go add in the actual colors we could do it but we use a lot of uh CSS variables for all of these and so it's like a little bit of misdirection so we' have to like go and put the actual uh default value so I mean we could do it it's not hard if we think it would be helpful we should do it super cool the other piece I saw somebody um giv me

  10. some feedback about like oh being able to basically set one theme with a light in a dark mode so that would be really cool here yeah I would I would love if we could like do like uh even include like the light and dark base on this because if you're kind of like getting a a dark theme you can set the URL parameter like prefers dark go true and you can kind of start from the Dark theme and then you may want to go switch a few things um it'd be nice if like the theme had the kind of a sense of um which mode you're designing for do you have any thoughts on having like a simple mode where you just specify like three

  11. to five color swatches that map to like primary secondary and then sort of automatically building out the rest from there yeah I would love to go do that I mean there's like we're doing a little bit that right now like the new CSS color functions to kind of make some choices for people but then browser supports not quite there yet um I would love to get there in the future where it's like you select a color and then we do a lot of uh intelligent things for you uh it's not it's not hard with the kind of the new the new CSS there's some um you know JavaScript libr if we wanted to run something I I don't think we should run them in real

  12. time I think it's expensive like calculating colors all the time but like when you're building the theme if we could potentially you know let you SEL a color and then generate some colors for you it' be a real nice Improvement as well yeah I think the main use case would be here are my four brand colors can um can we feed this back into an llm and let chat GPT make us a theme I'm sure there's good uh tools that'll like help us pick colors and pick complimentary colors and and everything yeah be cool like you know generate color pal for me is common tools across the internet and it's not hard but um um some of the other like CSS color functions that like

  13. allow like consistent images or color gradients across multiple things it's really easy to go in and just pick a few different colors so I mean yes we can we can get fancier so your answer is we don't need AI there's actual tools to solve this yeah I mean it's not it's not it's not rocket science here like you select a gray color and you generally want a few tints and shades of it um and then like you can just change the lightness channel a little bit and you get all the things that you want and so like you pick your text color and we'll generate a couple a couple variants for you so you can have like the text hierarchy and contrast hierarchy that we

  14. we use throughout the UI so um it shouldn't shouldn't be too hard the the the other thing that I wonder about is like potentially shipping with some like Bas themes that that we've designed that like might be good jumping off points or something along those lines yeah s and I were talking about this as like we have a lot of knobs you should go you can go twist but it's like if we just give you a starting point of like here's some nice looking ones then you can go in and change the three that you want to go adjust would be pretty awesome yet I I do want to shout out sah she's been helping me quite a bit on this um uh trim all

  15. the stuff so I've been really appreciate for feedback yeah I was going to say um having a designer involved with a looker embed was always a uh a warning signal and I feel like we've uh actually inflected to the other side where having a designer show up is now a a positive signal for us so that's a really it's a very good thing