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 intergrated Help Features #2088

Merged
merged 19 commits into from
Nov 17, 2023
Merged

Conversation

JustinGeorgi
Copy link
Contributor

@JustinGeorgi JustinGeorgi commented Sep 24, 2023

Closes #2058.

This converts the developer sidebar into a multipurpose dock.
It keeps the previous developer sidebar as the Tools panel and adds a Help panel.

The new Help panel contains 4 different sections:

  1. A context dependent section that will show basic help for the administrative page currently viewed. These pages give basic definitions, some simple tips and links to the relevant full documentation.
  2. An add-on section that lists all the currently installed add-ons and provides direct links to their documentation pages.
  3. A FAQ section for simple answers to common questions with internal links to help guide the users, some external links to relevant resources, and links to documentation pages providing more details about the question.
  4. A Quick-Start section that guides a new user with click-by-click instructions for everything from binding installation to adding a widget to a MainUI page with links to the detailed Getting Started Tutorial for each step. This section is opened by default when an administrator opens a new MainUI instance with no configured overview page (i.e., most likely a new user).

All of the main setting list pages and the overview page now have a help icon in the navbar that toggles the help dock.

FAQ and Quick-Start data are stored in separate JSON formatted files for ease of addition and maintenance.

Signed-off-by: Justin Georgi justin.georgi@gmail.com

@florian-h05
Copy link
Contributor

Can you please rebase your PR? Your commit history is messed up because of the merge ...

@JustinGeorgi
Copy link
Contributor Author

JustinGeorgi commented Sep 26, 2023

Can you please rebase your PR? Your commit history is messed up because of the merge ...

I'll give it a try when I get a chance later. As far as I know, it's messed up partially because I'm still learning all this rebase stuff and somehow messed it up the first time.

Edit: Did I figure it out? It looks like I figured it out.

@relativeci
Copy link

relativeci bot commented Sep 27, 2023

Job #1257: Bundle Size — 15.8MiB (+0.26%).

380151f(current) vs b7270d2 main#1158(baseline)

Important

Bundle introduced 1 and removed 1 duplicate package – View changed duplicate packages

Warning

Bundle introduced 13 new packages: @jsep-plugin/regex, @jsep-plugin/arrow, @jsep-plugin/object and 10 more – View changed packages

Bundle metrics  Change 10 changes Regression 5 regressions Improvement 1 improvement
                 Current
Job #1257
     Baseline
Job #1158
Regression  Initial JS 1.89MiB(+13.11%) 1.67MiB
Regression  Initial CSS 609.63KiB(+0.12%) 608.89KiB
Change  Cache Invalidation 93.81% 93.95%
Change  Chunks 217(-0.91%) 219
Change  Assets 683(-0.87%) 689
Change  Modules 3027(+78.06%) 1700
Regression  Duplicate Modules 173(+92.22%) 90
Improvement  Duplicate Code 1.61%(-17.44%) 1.95%
Regression  Packages 152(+10.14%) 138
Regression  Duplicate Packages 16(+6.67%) 15
Bundle size by type  Change 3 changes Regression 3 regressions
                 Current
Job #1257
     Baseline
Job #1158
Regression  JS 9.28MiB (+0.27%) 9.25MiB
Regression  Other 4.74MiB (+0.3%) 4.73MiB
Regression  CSS 860.87KiB (+0.16%) 859.49KiB
Not changed  Fonts 526.1KiB 526.1KiB
Not changed  Media 295.6KiB 295.6KiB
Not changed  IMG 140.74KiB 140.74KiB
Not changed  HTML 1.23KiB 1.23KiB

View job #1257 reportView JustinGeorgi:jag-help-doc branch activity

Copy link
Member

@ghys ghys 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 this @JustinGeorgi!
I will test it asap, one initial remark though:

Comment on lines 5 to 6
<f7-link v-if="$store.state.developerDock" icon-f7="question_circle_fill" @click="$f7.emit('toggleDeveloperDock')" />
<f7-link v-else icon-f7="question_circle" @click="$f7.emit('selectDeveloperDock',{'dock':'help','helpTab':'current'})" />
Copy link
Member

Choose a reason for hiding this comment

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

How about when the developer dock can't be displayed because the screen is too narrow?
This new button/link will still be displayed but appear to (and in fact will) do nothing I think, which is not good.
Maybe best remove them when the current screen is not able to display the dock - or keep them but just link them to relevant documentation instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yeah, forgot that point from the previous discussion. If it's all the same to you, I'm inclined to just remove it so it doesn't clutter the navbar on narrower screens.

Copy link
Member

Choose a reason for hiding this comment

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

I do think it's best to either remove it, or perhaps change it to a regular link to the documentation when the developer dock wouldn't fit.

By the way, I think when those icons make their way in the navbar, we should replace these buttons in the empty state placeholders:

image

You have a message saying "add your first thing manually with the button below" but the actual button below opens the documentation. It was an oversight which should be corrected.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By the way, I think when those icons make their way in the navbar, we should replace these buttons in the empty state placeholders:

I hadn't thought of that, that's a good point.

You have a message saying "add your first thing manually with the button below" but the actual button below opens the documentation. It was an oversight which should be corrected.

Do you mean this?

image

The button is link to the docs, but the "click here" refers to the list item itself. Maybe that's not clear enough...

Otherwise, I'm not sure which button you're referring to.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By the way, I think when those icons make their way in the navbar, we should replace these buttons in the empty state placeholders:

Since we decided to just remove the button on narrow screens, I only removed the documentation buttons after the placeholders when the navbar help buttons are visible. So, on narrow screens instead of the navbar button you will still see the documentation buttons.

You have a message saying "add your first thing manually with the button below" but the actual button below opens the documentation. It was an oversight which should be corrected.

Do you mean this?

I'm still not 100% sure which message you are referring to, but I've added arrow indicators to all the click here list items in the quickstart section which I hope will make it more clear that those specific items are clickable.

image

@florian-h05
Copy link
Contributor

Hi @JustinGeorgi, since it seems that @ghys is busy at the moment, I will take over the review of your PR, so stay tuned.

Signed-off-by: jgeorgi <justin.georgi@gmail.com>
Signed-off-by: jgeorgi <justin.georgi@gmail.com>
Signed-off-by: jgeorgi <justin.georgi@gmail.com>
Signed-off-by: jgeorgi <justin.georgi@gmail.com>
Signed-off-by: jgeorgi <justin.georgi@gmail.com>
Signed-off-by: jgeorgi <justin.georgi@gmail.com>
Signed-off-by: jgeorgi <justin.georgi@gmail.com>
Signed-off-by: jgeorgi <justin.georgi@gmail.com>
Signed-off-by: jgeorgi <justin.georgi@gmail.com>
Signed-off-by: jgeorgi <justin.georgi@gmail.com>
Signed-off-by: jgeorgi <justin.georgi@gmail.com>
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
Signed-off-by: Justin Georgi <justin.georgi@gmail.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>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
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.

LGTM, thanks! Great addition.

I have rebased your PR, and I decided to directly commit my findings during review (this saves us both work, I anyway need to test some of my requested changes before giving a suggestion, then I'd have to wait for you implementing it, and finally test it again).

What I changed:

  • You used window.innerWidth for the breakpoints. This works, but does not update when the window is resized. Better to use $f7.width, because this is dynamic.
  • Added back a few documentationLinks that were removed, but still needed.
  • Improved styling of the "Page Help" feature: The list items now look the same as for all other tabs.
  • Added a cloud connector link to the remote access FAQ entry.
  • Added a link to Thing add to the Quick Start entry.

In case one has suggestion regarding the content, let's merge this and then open a new PR. This PR is already big enough, no need to make it even bigger ;-)

@florian-h05 florian-h05 added this to the 4.1 milestone Nov 17, 2023
@florian-h05 florian-h05 merged commit b4128cb into openhab:main Nov 17, 2023
6 checks passed
@florian-h05 florian-h05 changed the title Intergrated Help Features Add intergrated Help Features Nov 17, 2023
@JustinGeorgi
Copy link
Contributor Author

I decided to directly commit my findings during review

No worries, I think that's a fine idea.

Thanks for the review!

@JustinGeorgi JustinGeorgi deleted the jag-help-doc branch November 18, 2023 00:54
florian-h05 added a commit to florian-h05/openhab-webui that referenced this pull request Nov 19, 2023
Follow-up for openhab#2088.

I forgot that during review, let's do it now.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
florian-h05 added a commit that referenced this pull request Nov 19, 2023
Follow-up for #2088.

I forgot that during review, let's do it now.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
florian-h05 added a commit 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request main ui Main UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI Integrated Help Feature
3 participants