AalianKhan / mushroom-strategy

A strategy to automatically generate a dashboard using mushroom cards
MIT License
364 stars 36 forks source link

Make it possible to configure items per row for area cards in home view #84

Open punxaphil opened 9 months ago

punxaphil commented 9 months ago

Make it possible to configure items per row for area cards in home view, as well as make it possible to have different configurations based on the width of the display.

Example yaml

strategy:
  type: custom:mushroom-strategy
  options:
    home_view:
      areas_per_row:
        narrow: 3
        wide: 5
views: []

Example for narrow view

image

Example for desktop view

image
DigiLive commented 9 months ago

This is exactly one of my future ideas for the project. 👍🏻

I do hope you're gonna code a little slower since I'm migrating to Typescript at the moment. 😅

punxaphil commented 9 months ago

😁 Should i close it? Delete it? Change it to typescript?

DigiLive commented 9 months ago

Let me review it first, so we can merge it later. If you want, create a Typescript version after review to merge into the Typescript branch. 😬

DigiLive commented 9 months ago

The narrow property at my hass is undefined and therefor the strategy assumes wide. However, my homeview always shows a narrow column, making the narrow/wide settings useless. Did you change something to render a wider column?

afbeelding

punxaphil commented 9 months ago

The narrow property at my hass is undefined and therefor the strategy assumes wide. However, my homeview always shows a narrow column, making the narrow/wide settings useless. Did you change something to render a wider column?

afbeelding

It matters if you use panel mode.

image
DigiLive commented 9 months ago

It matters if you use panel mode.

Panel mode can't be set if there's more than 1 card.

This view contains more than one card, but a panel view can only show 1 card.

punxaphil commented 9 months ago

True I hide everything else with the new hidden options 😄

DigiLive commented 9 months ago

Yeah... that's a catch. 😅 Such conditions should actually be known on beforehand. Now this option is more or less for a specific use case.

Let me think about it if we can get the best out of two worlds.

punxaphil commented 9 months ago

Never thought of it that way. Actually, if one is using a dashboard it's hard for me to understand why anyone wouldn't want to use the full width nearly always (I.e. panel mode)

DigiLive commented 9 months ago

I agree. It's the masonry layout which causes the "narrow" column. I'm not very fond of it.

We must see how to trick it or find another layout to apply.

DigiLive commented 8 months ago

[!WARNING] The main branch has been switched to TypeScript. Update your feature branch accordingly!

punxaphil commented 8 months ago

Warning

The main branch has been switched to TypeScript. Update your feature branch accordingly!

Done. I see docs are moved to wiki, I can update it if you give me access once this is merged.

punxaphil commented 7 months ago

@DigiLive @AalianKhan Has development stopped on this repository?

DigiLive commented 7 months ago

Not for me, but currently a bit busy with other code and personal matters.

farridav commented 5 months ago

Bump. This would add a lot of value to my setup, any idea on a timeline, or anything I can do t help ? Thanks

DigiLive commented 5 months ago

Bump. This would add a lot of value to my setup, any idea on a timeline, or anything I can do t help ? Thanks

It's currently stuck on the requirement of panel view. We must see how to trick it or find another layout to apply.

punxaphil commented 5 months ago

Why not simply change to always use panel? Full width makes more sense to me.

DigiLive commented 5 months ago

Why not simply change to always use panel? Full width makes more sense to me.

As already said before: Panel mode can't be set if there's more than 1 card.