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

Sitemap: extended syntax for icon to define conditional rules #2175

Merged
merged 2 commits into from
Dec 16, 2023

Conversation

lolodomo
Copy link
Contributor

Related to openhab/openhab-core#3820

Signed-off-by: Laurent Garnier [email protected]

Copy link

netlify bot commented Dec 16, 2023

Thanks for your pull request to the openHAB documentation! The result can be previewed at the URL below (this comment and the preview will be updated if you add more commits).

Name Link
🔨 Latest commit 0dc76d1
🔍 Latest deploy log https://app.netlify.com/sites/openhab-docs-preview/deploys/657dcd9d60b0d3000898bba8
😎 Deploy Preview https://deploy-preview-2175--openhab-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@lolodomo lolodomo force-pushed the sitemap_dynamic_icons branch from ccf4d17 to 10792c0 Compare December 16, 2023 10:33
Copy link
Contributor

@stefan-hoehn stefan-hoehn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comprehensive documentation.
A small type in openHAB and a minor unclear sentence (at least to me)

ui/sitemaps.md Outdated Show resolved Hide resolved
ui/sitemaps.md Outdated Show resolved Hide resolved
@stefan-hoehn stefan-hoehn added this to the 4.1 milestone Dec 16, 2023
Signed-off-by: Laurent Garnier <[email protected]>
Copy link
Contributor

@stefan-hoehn stefan-hoehn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx, @lolodomo

@stefan-hoehn stefan-hoehn merged commit 0cd203c into openhab:main Dec 16, 2023
5 checks passed
@lolodomo lolodomo deleted the sitemap_dynamic_icons branch December 16, 2023 16:25
@lolodomo
Copy link
Contributor Author

lolodomo commented Dec 17, 2023

As icons are now available in SVG format and no more in PNG format, I made the change in this PR for battery icons.
Unfortunately, the result is not the one expected, the icons are terribly big:

https://next.openhab.org/docs/ui/sitemaps.html#icons

@stefan-hoehn : any idea what I should add to fix a size ?

Edit: and note that we should update any link to an icon from classic iconset in the documentation. Do you know how to find them easily ?

@stefan-hoehn
Copy link
Contributor

@lolodomo Good that you caught this (again something I should look more closely in the future!)

I researched that a bit and played around with it to see what we could do.

Unfortunately AFAIK there is no official way to tell markdown how to amend image sizes in the markdown image tag. There are some unofficial ways like adding the size this way ![Image](/img/battery-01.svg =64x64) which I tried it out but it doesn't work for us.

So the only way that I am aware of to fix this special case is to use the html image tag (which we usually try to avoid)

battery-0

Can you try that out?

@lolodomo
Copy link
Contributor Author

So the only way that I am aware of to fix this special case is to use the html image tag (which we usually try to avoid)

battery-0

Can you try that out?

The icon will appear in the page with this solution without having to click on a link ?

@stefan-hoehn
Copy link
Contributor

I would say so, yes, can you try to make a PR and if it doesn't I am happy to look into it more closely.

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

Successfully merging this pull request may close these issues.

2 participants