Thanks for the quick reply, no the page doesnāt grey or show any signs of a hidden pop up.
Iām triggering it by change of item state, when the doorbell rings a rule sets the state to ON.
For your code, rather than displaying a URL can it use an item image? I have an item in OH that holds the latest snapshotā¦
EDITā¦itās sort of workingā¦I think I had a typo somewhere, Iāve C&P it all back in and I now get the popup, but itās blank as the URL I have goes no whereā¦
So the only question is whether / how I can use the item as the image to display.
Thanks, tried that but still an empty pop up. Iāve added an image widget which is the item snapshot in question to the main page to check itās correctā¦but you can see the blank pop upā¦
Full YAML (It is pretty much verbatum from your example as a test)
The trigger is vDoorBellPress switch item and the image Iām trying to show is called FrontDoor_Snapshot, and is the same item shown bottom right of the page shown above so I know it is working.
I might look to set up the live view rather than a snapshot but Iād rather work out what is wrong here for the learning experience, (or find out where Iāve been stupid)ā¦then I can develop it.
Could you delete these attributes?
The popup in general works as can be seen at the image placeholder
Not related to this problem, but:
Is vDoorBellPress a string item or on/off item (switch)? If switch you need to replace close by off
And the height of the button needs to be 100%, otherwise its size is 50% of 50%
In general (and I think you already did that) you need to set the desired size of the popup and have the size of oh-image component set to 100%.
If you see just a part of your image in the popup (and I assume there is no wasted space arund your oh-image) your resolution is larger than your device.
Either reduce the resolution of the image source or you can start trying around with
style:
-webkit-transform: scale(0.7)
to shrink the image.
@JustinG is a very helpful expert for css related questions. Do you have any other advice?
Could this widget open up a different page in the popup rather than an item? That way, the page is already formatted and you get a little more freedom in the contentsā¦
Iāve fiddled with the YAML, essentially Iāve tried to add in a modal to a ācameraā page Iāve createdā¦the pop up comes up as expected but Iām back to a blank page, is there a setting Iām missing or is it not possible to link to a page in this way?
If you donāt specify a width (height works too, for that matter) then the oh-image will always stretch to fit the image you give it. You can use a % width in this case, because the image is a child of the popup which has a defined width value of its own.
Not really no. Although pages are constructed in a similar format to widgets, the two are not really interchangeable. āWidgetsā are just UI elements. āPagesā in MainUI app are destinations that you can navigate to within the framework of the app that just happen to have widgets on them.
If you wan this item-based control the the popup then you are constrained to building the widget you want to have as the popup.
This will never trigger automatically. Widgets actions can only be initiated by interaction with the component. Thatās why you cannot use the oh actions here to navigate to a page and must use the f7-popup method which you can control without direct interaction with the component.