Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Add a chip line in mushroom template card #1286

Open
2 tasks done
BBE-FR opened this issue Nov 6, 2023 · 4 comments
Open
2 tasks done

[Feature]: Add a chip line in mushroom template card #1286

BBE-FR opened this issue Nov 6, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@BBE-FR
Copy link

BBE-FR commented Nov 6, 2023

Requirements

  • I have updated Mushroom to the latest available version
  • I did a search to see if there is a similar issue or if a pull request is open.

Is your feature request related to a problem?

In order to build more customized mushroom card, some usage require to have additional buttons.

One very interresting option to have these buttons would be to have a row of Mushroom Chips integrated into the mushroom template card.
Chips already integrate many customisation option and are coherent in term of design with the other Mushroom cards.

A line of Chip is a very versatile solution:

  • Each Chip can be customisable (icon only, name only, icon + name, template, etc...)
  • The chip can even be conditionnal
  • The chip allow to have tap action, double tap action and hold action allowing many interractions.

Describe the solution you'd like

I would like to have an optional row of chip:

  • inside the template card
  • following the template card format (default, vertical or horizontal)
  • positionned to the user choice (top, bottom, right, left).
  • maybe if not to complicated with the choice to have the chips in line or in column.

Describe alternatives you've considered

Stack-in of template card + chip is the option I use (like some others), but is not always obvious, it requires YAML input (not UI compatible) and often card_mod fine tuning and is not as versatile as if it was embedded into Mushroom Template card.

Additional context

Some ideas comming from here to show what it could look like (here for room cards):
#55

image

image

image

@BBE-FR BBE-FR added the enhancement New feature or request label Nov 6, 2023
@bdsoha
Copy link

bdsoha commented Nov 12, 2023

It would be great if there was an action section for templates cards.
I have accomplished something similar using the following:

  type: grid
  columns: 2
  square: false
  cards:
    - type: custom:mushroom-entity-card
      entity: binary_sensor.****
      icon_color: red
      name: ****
      tap_action:
        action: none
      hold_action:
        action: none
      double_tap_action:
        action: none
    - type: custom:paper-buttons-row
      styles:
        justify-content: flex-end
      base_config:
        preset: mushroom
        styles:
          button:
            margin-top: 12px
            margin-right: 12px
      buttons:
        - icon: mdi:refresh
          entity_id: ****
          tap_action:
            action: toggle

@BBE-FR
Copy link
Author

BBE-FR commented Nov 16, 2023

You can already have Tap action, Hold action and Double tap action for mushroom template card.

The point to have an embedded chips line is to have multiple additional button (or informations) into a template card.

@bdsoha
Copy link

bdsoha commented Nov 16, 2023

@BBESINET As you mentioned, I was referring to multiple action buttons, similar to those found on vacuum and fan cards.

@BBE-FR
Copy link
Author

BBE-FR commented Mar 28, 2024

For those interrested in such a row of chips / buttons:

I have presented my own version of a mushroom room card on the french Forum here:
https://forum.hacf.fr/t/carte-mise-en-forme-de-ma-mushroom-room-card-et-tuto/20429

image
image

do not hesitate to use the code...

And a french tuto step by step to install a simplified version here:
https://forum.hacf.fr/t/carte-mise-en-forme-de-ma-mushroom-room-card-et-tuto/20429/12

Those version are 100% mushroom compatible, they even preserve the configuration through Graphical User Interface...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants