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

refactor layout pages doc, add interactive background docu #2398

Merged

Conversation

stefan-hoehn
Copy link
Contributor

Documentation for the interactive background feature implemented in openhab/openhab-webui#2787

Copy link

netlify bot commented Nov 10, 2024

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 9d9501c
🔍 Latest deploy log https://app.netlify.com/sites/openhab-docs-preview/deploys/6730ef1e74896d00088b5b26
😎 Deploy Preview https://deploy-preview-2398--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.

Copy link

netlify bot commented Nov 10, 2024

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 95ed2f1
🔍 Latest deploy log https://app.netlify.com/sites/openhab-docs-preview/deploys/6733024ddfa90a000820d3a6
😎 Deploy Preview https://deploy-preview-2398--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.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
@stefan-hoehn
Copy link
Contributor Author

@rkoshak Hey, Rich, you might like this new feature. Do you mind reviewing the docs?

@pgfeller
Copy link
Contributor

I also looked at the generated preview of the docu and again it did a huge step - especially the developer section and the nice way all the information I love - and highly appreciate the work of you and all that contributed! Power is nothing without control - without the docu openHAB would not be an option for many users - this makes it accessible to a wider audience and also after using the system for aprox. 10 years now it is my main place to go if I look for something!

Kudos!

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
@stefan-hoehn
Copy link
Contributor Author

I will merge this now, so we do have the documentation available asap. Everyone who wants to provide feedback on the documentation, please still feel free to do so and I will take care of it.

@stefan-hoehn stefan-hoehn merged commit b0dea49 into openhab:main Nov 12, 2024
5 checks passed
Copy link
Contributor

@florian-h05 florian-h05 left a comment

Choose a reason for hiding this comment

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

Overall looks good!
Please have a look at my comments.

And: I would consider putting the images related to the different page types in individual folders to avoid a chaos.

@@ -152,9 +152,16 @@ module.exports = [
children: [
'ui/',
'ui/sitemaps',
{ title: 'Pages',
{ title: 'Page Types',
Copy link
Contributor

Choose a reason for hiding this comment

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

Page Types reads a bit awkward, I would rather just name this pages.

@@ -14,12 +14,21 @@ To do that, openHAB puts different options at your disposal; they are commonly r

Several types of pages are available:

- [Home Page](index.html#the-home-page)
Copy link
Contributor

Choose a reason for hiding this comment

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

#the-home-page should work as well for anchor links and is preferable because it doesn‘t depend on filename.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did that first but it results into a linter issue which is why I reverted it to index.html#...

Copy link
Contributor

Choose a reason for hiding this comment

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

Just to be sure: What has been removed here has just been moved (and possibly extended in this step) to the new subpages?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just split the content into the two sub pages as it makes more readable. Nothing was removed.

If you want to achieve a different placement, adding margins to the image in an image editor will be necessary.

This setting is in particular in important if you want to make your background image interactive, in which case it has to be of type SVG.
See below for more information on [interactive backgrounds](layout-pages-fixed.html#interactive-backgrounds).
Copy link
Contributor

Choose a reason for hiding this comment

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

Here the anchor link alone should be enough instead of having the filename as well:
#interactive-backgrounds

Copy link
Contributor Author

Choose a reason for hiding this comment

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

see comment above

- **Embed SVG**: Only when enabled, the SVG image is embedded in the page as "real" HTML elements, allowing to interact with it (normally an SVG would only be referenced by an IMG tag).
By default, this is switched off and therefore needs to be enabled.

- **Embed SVG Flashing in Run-Mode**: It is possible within the editor to flash the elements of the SVG image that have been previously marked as interactive through the attribute 'openhab' (see below).
Copy link
Contributor

Choose a reason for hiding this comment

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

I would add when they flash: on hover/mouseover IIRC.


Many special options though will only be available when you click on "Show Advanced".

- **State Items**: Define the item that is used to retrieve the state of the element to reflect the state.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should be mentioned that this defaults to the action Item (IIRC, but the code should be checked to be sure).

@rkoshak
Copy link
Contributor

rkoshak commented Nov 15, 2024

Sorry I missed my opportunity to review. I'm glad it got merged. I like the changes!

@stefan-hoehn stefan-hoehn deleted the fixed_layout_interactive_background branch November 16, 2024 09:00
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.

4 participants