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

Add Main UI docs for integration into sidebar help #2199

Merged
merged 13 commits into from
Jan 26, 2024

Conversation

florian-h05
Copy link
Contributor

@florian-h05 florian-h05 commented Jan 3, 2024

Required for openhab/openhab-webui#2253.

/cc @stefan-hoehn @Confectrician

Please have a look at the CONTRIBUTING.md inside the mainui folder.

Copy link

netlify bot commented Jan 3, 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 b70c874
🔍 Latest deploy log https://app.netlify.com/sites/openhab-docs-preview/deploys/65b43c45f3cd7700087cae6a
😎 Deploy Preview https://deploy-preview-2199--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.

@florian-h05
Copy link
Contributor Author

I have now migrated all content that was hard-coded into the UI to the docs repo and created the structure for the new Main UI docs. You can run my linked UI PR locally to see how the UI integrates the docs.

Feel free to extend the documentation, migrate docs from elsewhere in this repo and put some content into the empty files.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 force-pushed the mainui-doc-integration branch from ced2e65 to 921112f Compare January 17, 2024 21:50
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 force-pushed the mainui-doc-integration branch from 80e88c3 to 9ae7489 Compare January 17, 2024 21:56
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 force-pushed the mainui-doc-integration branch 4 times, most recently from 2cef667 to ae20c8b Compare January 26, 2024 09:23
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 force-pushed the mainui-doc-integration branch from 73f1cd0 to 120fd37 Compare January 26, 2024 09:34
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 force-pushed the mainui-doc-integration branch 5 times, most recently from 53de863 to 2f60e90 Compare January 26, 2024 13:47
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 force-pushed the mainui-doc-integration branch from 2f60e90 to e7676a6 Compare January 26, 2024 13:49
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 force-pushed the mainui-doc-integration branch from 4f45e36 to 76eaabe Compare January 26, 2024 14:53
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 force-pushed the mainui-doc-integration branch from 76eaabe to 7aecd66 Compare January 26, 2024 15:25
@florian-h05 florian-h05 marked this pull request as ready for review January 26, 2024 15:27
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 force-pushed the mainui-doc-integration branch from 30f11f2 to ab92bbd Compare January 26, 2024 15:40
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.

@florian-h05 This is an amazing contribution to the docs and you earn the docs gold medal for the month 🥇 🤩

Given the amount of text you contributed I only found only a few minor issues.

Inside these comments, the UI allows the following features:

- Embed [Framework7 icons](https://framework7.io/icons/) into the UI-rendered docs using these comments:
- `<!--F7 $iconame -->`, where `$iconname` is a Framework7 icon's name
Copy link
Contributor

Choose a reason for hiding this comment

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

where $iconame (one n too much)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is one n missing in $iconame ;-)

mainui/about.md Outdated
- Logs folder on the server
- Operating System openHAB is running on
- Java Runtime openHAB is running on
- number of processors and memory
Copy link
Contributor

Choose a reason for hiding this comment

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

Number

mainui/about.md Outdated
Main UI implements a web audio sink which allows the openHAB server to play audio through the web browser.

To enable web audio sink support for a client, turn on the **Enable Web Audio sink support** option on the **Help & About** page.
As it is setting specific to your browser environment, web audio support has to be enabled for every client where it should be used.
Copy link
Contributor

Choose a reason for hiding this comment

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

setting-specific

mainui/about.md Outdated
As it is setting specific to your browser environment, web audio support has to be enabled for every client where it should be used.

Please note that due to limitations in Safari (and possibly Chrome as well), a user interaction is required after the first audio stream has been sent to actually play it.
This means, that after opening Main UI, the first audio that should be played on the web audio sink is only player after the user interacts with Main UI in any way (i.e. touching the screen is enough).
Copy link
Contributor

Choose a reason for hiding this comment

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

only played

mainui/about.md Outdated

Please note that due to limitations in Safari (and possibly Chrome as well), a user interaction is required after the first audio stream has been sent to actually play it.
This means, that after opening Main UI, the first audio that should be played on the web audio sink is only player after the user interacts with Main UI in any way (i.e. touching the screen is enough).
For subsequent audio playback, that is not required anymore and the audio is played immediately.
Copy link
Contributor

Choose a reason for hiding this comment

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

For subsequent audio playback the above is not required anymore and the audio is played immediately.


![saturday-morning-rule](../images/saturday-rule-schedule.png)

A rule that is schedule repeatedly like everyday at 8:00 in the morning will therefore be shown on every day of the calendar view.
Copy link
Contributor

Choose a reason for hiding this comment

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

A rule that is scheduled repeatedly

<!-- START MAINUI SIDEBAR DOC - DO NOT REMOVE -->
**Rules** are the heart of home automation.
**Scripts** are special types of rules with only one action and no triggers, so they have to be called from "real" rules or run manually.
They can be used to reuse code and logic across multiple other rules, one off experimentation to figure something out, create a catalog of examples, or to drive tests for other rules and behaviors.
Copy link
Contributor

Choose a reason for hiding this comment

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

for experimentation to figure

- **Add new Things**<br>
Use the [Thing Inbox](#inbox) to scan for available things or manually add ones that cannot be found automatically using the <!--F7:blue plus_circle_fill --> plus button.
- **Configure Things**<br>
Click on any Thing in the list to see its configuration page and it's channels.
Copy link
Contributor

Choose a reason for hiding this comment

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

its channels.

It therefore makes a lot of sense to use these features for a smart home solution.

openHAB bindings can therefore implement Discovery Services for Things, which provide Discovery Results.
All Discovery Results are put into the Thing inbox, from where they can be easily added to openHAB with just a few clicks.
Copy link
Contributor

Choose a reason for hiding this comment

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

Thing inbox from where they can be

# Settings - Transformations

<!-- START MAINUI SIDEBAR DOC - DO NOT REMOVE -->
**Transformations** convert a value or Item state into different value or state.
Copy link
Contributor

Choose a reason for hiding this comment

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

into a different value

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05
Copy link
Contributor Author

@stefan-hoehn Thank you for your fast review of this big PR!! I have addressed your review.

This is an amazing contribution to the docs and you earn the docs gold medal for the month 🥇 🤩

Thank you very much, I guess I will share it with you since you wrote large parts of the docs that I moved around, and with @JustinGeorgi, who originally wrote what has been added to the UI and what I migrated to the docs repo.

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, looks good now.

@stefan-hoehn stefan-hoehn added this to the 4.2 milestone Jan 26, 2024
@stefan-hoehn stefan-hoehn merged commit 321c8de into openhab:main Jan 26, 2024
5 checks passed
@florian-h05 florian-h05 deleted the mainui-doc-integration branch January 26, 2024 23:38
florian-h05 added a commit to openhab/openhab-webui that referenced this pull request Jan 27, 2024
)

Follow-up for #2088.
Depends on openhab/openhab-docs#2199.

Also add the help sidebar button to the settings and list pages where it
is missing.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05
Copy link
Contributor Author

@ghys @Confectrician Why can’t I find that documentation changes on https://next.openhab.org/docs?

@stefan-hoehn
Copy link
Contributor

@kaikreuzer Do you mind having a look. It is actually weird that we don't see the changes. I also don't see a way to trigger a new build. Do you know what happened here?

An example would be https://next.openhab.org/docs/mainui/about.html which is missing.

@ghys
Copy link
Member

ghys commented Feb 6, 2024

The website fails to build on Netlify since Jan 26th:
https://app.netlify.com/sites/openhab-next/deploys/65c1516267c7c40008971007
with this error:

10:22:45 PM: /opt/buildhome/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/fileutils.rb:1225:in `stat": No such file or directory @ rb_file_s_stat - .vuepress/openhab-docs/settings/images (Errno::ENOENT)
	from /opt/buildhome/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/fileutils.rb:1225:in `lstat"
	from /opt/buildhome/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/fileutils.rb:1254:in `copy"
	from /opt/buildhome/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/fileutils.rb:416:in `block in copy_entry"
	from /opt/buildhome/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/fileutils.rb:1388:in `wrap_traverse"
	from /opt/buildhome/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/fileutils.rb:413:in `copy_entry"
	from /opt/buildhome/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/fileutils.rb:391:in `block in cp_r"
	from /opt/buildhome/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/fileutils.rb:1461:in `block in fu_each_src_dest"
	from /opt/buildhome/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/fileutils.rb:1477:in `fu_each_src_dest0"
	from /opt/buildhome/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/fileutils.rb:1459:in `fu_each_src_dest"
	from /opt/buildhome/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/fileutils.rb:390:in `cp_r"
	from prepare-docs.rb:359:in `<main>"

corresponding to this line in prepare-docs.rb:
https://github.com/openhab/website/blob/31c746e62fa4c3d5a3fc33c070713acfd2dd308c/prepare-docs.rb#L359

florian-h05 added a commit to florian-h05/website that referenced this pull request Feb 6, 2024
openhab/openhab-docs#2199 broke the website build due to the directory structure changes.
This adjusts the build script and therefore fixes the website build.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05
Copy link
Contributor Author

openhab/website#445 will fix the website build.

kaikreuzer pushed a commit to openhab/website that referenced this pull request Feb 7, 2024
* Adjust to openhab/openhab-docs#2199

openhab/openhab-docs#2199 broke the website build due to the directory structure changes.
This adjusts the build script and therefore fixes the website build.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
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.

3 participants