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

Card style issues in model cards and beyond #2809

Closed
JustinGeorgi opened this issue Oct 13, 2024 · 1 comment
Closed

Card style issues in model cards and beyond #2809

JustinGeorgi opened this issue Oct 13, 2024 · 1 comment
Labels
bug Something isn't working main ui Main UI

Comments

@JustinGeorgi
Copy link
Contributor

I don't use my model cards a lot, so I honestly can't say what update caused this issue and I haven't had the time to carefully track it down yet. But I'm now on:

runtimeInfo:
  version: 4.3.0
  buildString: "Build #4312"

I assume this is a regression from either #2584 or #2801 but as I say, I don't have proof of that at the moment.

The model cards no longer display correctly either in their closed state:
image
(The background image should cover the entire card)

Or in the open state:
image
(The card contents should, of course, remain within the card limits)

It's also possible this is related to some larger change that I missed because other widgets I have that use f7 cards also don't display properly:
image
(This is one of my oldest widgets and has been the same for years: the card contents used to be inset from the card edge)

Here's the code for that widget:

uid: widget_active_doors
tags:
  - overview
props:
  parameters:
    - description: Show all on opening
      label: Show All
      name: allStart
      required: false
      type: BOOLEAN
  parameterGroups: []
timestamp: Jan 7, 2022, 9:08:46 PM
component: f7-card
config:
  title: Open Doors
slots:
  content:
    - component: oh-list
      slots:
        default:
          - component: oh-repeater
            config:
              filter: "((vars.showAll === undefined && props.allStart) || vars.showAll) ? true
                : ((loop.activeItem.state.toString()=='OPEN') ? true : false)"
              for: activeItem
              fragment: true
              itemTags:
                - OpenState
                - Opening
              sourceType: itemsWithTags
            slots:
              default:
                - component: oh-list-item
                  config:
                    title: =loop.activeItem.label
                  slots:
                    after:
                      - component: f7-chip
                        config:
                          iconColor: white
                          iconF7: "=(items[loop.activeItem.name.replace('Status','Lock')].state != '-') ?
                            ((items[loop.activeItem.name.replace('Status','Lock\
                            ')].state == 'ON') ? 'lock_fill' : 'lock_open_fill')
                            : ((items[loop.activeItem.name].state=='OPEN') ?
                            'exclamationmark' : 'checkmark_alt')"
                          mediaBgColor: "=(items[loop.activeItem.name].state=='OPEN') ? 'red' : 'green'"
                          text: =dayjs(items[loop.activeItem.name+"_TS"].state).fromNow()
  header:
    - component: oh-link
      config:
        action: command
        actionCommand: ON
        actionItem: Door_FrontDoor_Lock
        iconF7: lock_fill
    - component: oh-button
      config:
        action: variable
        actionVariable: showAll
        actionVariableValue: "=(vars.showAll === undefined) ? !props.allStart : !vars.showAll"
        active: =((vars.showAll === undefined && props.allStart) || vars.showAll)
        raised: =!((vars.showAll === undefined && props.allStart) || vars.showAll)
        text: Show All
@JustinGeorgi JustinGeorgi added bug Something isn't working main ui Main UI labels Oct 13, 2024
@JustinGeorgi
Copy link
Contributor Author

Nevermind. Fixed by #2803 it appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working main ui Main UI
Projects
None yet
Development

No branches or pull requests

1 participant