nemrutco / nova-global-filter

This package allows you to apply any of your existing Laravel Nova filters to your cards in Dashboards or Index and Detail view of your nova resources.
MIT License
39 stars 32 forks source link

Layout global filter #3

Closed cord closed 4 years ago

cord commented 4 years ago

currently, the global filter card consumes a lot of space. Would be great to have a slim version

1 2020-05-01 14-02-44 or even some options to style like this: 71813573-429dc280-307a-11ea-9238-a128968b8847

wonder if this could be achieved with allow the user to add some CSS classes or define a custom view?

MuzafferDede commented 4 years ago

Maybe i could allow users to define as any other cards " w-1/3", "w-2/3" and by default full width as it is now. Something like:

NovaGlobalFilter([.....])->width('1/3');
cord commented 4 years ago

ah - I am thinking about the height of the card. I think it should be fullwidth "toolbar" rather than a card panel. And of course the width of the filter widgets and padding between them to make it more compact.

MuzafferDede commented 4 years ago

I see your point. Hmm that's a bit tricky. Maybe there could be a accordion style as option to allow collapse toggle. But not sure if layout could be dynamic as your mention. I could define some classes for custom styling by user, but we still need to stick with a layout guideline. Let's get some feedback and we'll see what to do on this topic.

cord commented 4 years ago

maybe missing is a nova "slim" style where everything is less "fluffy"

MuzafferDede commented 4 years ago

Yeah, i think there could be a better way to layout custom cards on pages but current way is limited by nova. Specially we are looping filters as there might be checkbox or other type of input elements. Let's see if we can come out with a good idea. Open to suggestions.

MuzafferDede commented 4 years ago

And @cord i want to know all your use cases and needs if it's possible since the package idea come from you. So i can implement them as we go. So it would be great to collect some use cases and needs for a while and implement until we got a solid package. Thank you.

cord commented 4 years ago

@muzafferdede thanks again for your great work.

I think almost any Nova App could use a kind of interactive analytics dashboard / BI dashboard / (... https://powerbi.microsoft.com ...) , so I think this could be a (commercial?) package by itself.

Am thinking of:

so once installed the developer just needs to create/configure datasources. Then dashboards can be configured with different widgets, default filter settings etc.

am happy to contribute with a nova setup for managing dashboards including a hack to make metrics re-usable through metaData (similar to https://nova.laravel.com/docs/3.0/filters/defining-filters.html#dynamic-filters )

MuzafferDede commented 4 years ago

I have to spend full time even to think about for such a thing! :) But i guess you are deeply involved on "Dashboard Softwares/Widgets". Things are not too familiar to me in use cases, but yeah, i would love to see how re-useable widgets would look like.

MuzafferDede commented 4 years ago

@cord Ability for original request has been included in v1.0.3 now. Also there is a reset button option. You can use as:

new NovaGlobalFilter([
    // Filters
])->inline()->resettable(),

Details are in Readme. Let me know if all good.

Cheers

cord commented 4 years ago

@muzafferdede just published https://github.com/Nova-BI/nova-databoards - would be great to get your feedback!

MuzafferDede commented 4 years ago

@cord i am amazed what you put have together with this package. It is very promising solution to many dashboards. The only thing i see as hard is that it relays on many packages which will cause difficulties to maintain or add new functionalities unless if you convince other packages devs for the new features or ideas. But for foundation, it is great step to benefit other packages as you did. Hopefully you can gather some contributors and make this package awesome and unique.