Skip to content

Commit 1593744

Browse files
committed
EN,CZ : contextHelp : Plugin for contextual help described in better detail
1 parent c2ebba0 commit 1593744

10 files changed

Lines changed: 138 additions & 0 deletions

File tree

cs/contextHelp.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# ❔ Kontextová nápověda pro web
2+
3+
V rámci řešení HelpViewer je k dispozici [plugin][PluginR] pro prohlížeče s jádrem Chromium (Chrome, Edge).
4+
5+
## Funkce
6+
7+
Plugin zajišťuje přidání akce ❔ **Co je zde?** do menu pravého tlačítka myši, která následně otevře kapitolu konkrétní kapitoly v konkrétním souboru nápovědy stejným způsobem, jako to bylo v minulosti obvyklé u operačních systémů.
8+
9+
## Instalace
10+
11+
**Systémový administrátor** musí plugin nainstalovat na stanicích uživatelů v **režimu pro vývojáře** (chrome://extensions/). Plugin není v Chrome Web Store.
12+
13+
## Propojení aplikace a nápovědy
14+
15+
**Napojení nápovědy v aplikaci zajistí programátor**.
16+
Stačí definovat **objekt hvHelpFile** ve webové aplikaci:
17+
18+
```javascript
19+
var hvHelpFile = {
20+
file: 'hlp-user/Help-__.zip',
21+
viewer: 'https://helpviewer.github.io/index.html',
22+
//viewer: '$/index.html', // relativní cesta k prohlížeči odvozená z umístění aplikace
23+
routing: false
24+
//, extension: '.md'
25+
//, offset: 0
26+
}
27+
```
28+
29+
Definici lze měnit dynamicky podle kontextu (např. podle stránky). Více detailů v [dokumentaci pluginu][PluginR].
30+
31+
## Získání seznamu kapitol
32+
33+
Pro autory nápovědy jsou klíčové názvy kapitol, odvozené z atributu **id** ovládacích prvků v aplikaci.
34+
**Programátor je musí poskytnout** – odpovídá za konfiguraci pluginu.
35+
36+
### Kroky pro programátora
37+
38+
1. Otevřete konzoli pro vývojáře (F12) na stránce aplikace.
39+
2. Získejte všechna ID prvků:
40+
41+
```javascript
42+
allElements = Array.from(document.body.querySelectorAll('*')).map(x => x.id).filter(x => x);
43+
```
44+
45+
3. Pro sloučené ID (např. stromy, seznamy - sloučí se jen předpony před **|**):
46+
47+
```javascript
48+
allElements = [...new Set(Array.from(document.body.querySelectorAll('*')).map(x => x.id).filter(x => x).map(x => x.split('|')[0]))];
49+
```
50+
51+
4. **Ověřte chování** na cílovém prostředí - parametry **routing, extension a offset** ovlivňují finální jméno kapitoly.
52+
53+
## Speciální případy
54+
55+
- Pro **prvky bez ID** se otevírá kapitola **noid.md** (nebo noid.(extension) z konfigurace)
56+
- Testujte na různých stránkách/formulářích podle architektury aplikace
57+
58+
## Ladění a tipy
59+
60+
1. Pokud položka ❔ chybí, zkontrolujte **hvHelpFile** v konzoli: console.log(hvHelpFile).
61+
2. Jméno otevřené kapitoly je chybné nebo se nezobrazuje žádný text kapitoly? Ověřte ID prvku pod kurzorem a konfiguraci offset/routing/extension. Ověřte také zda jste soubor kapitoly v nápovědě založili.
62+
3. Použijte **\$/index.html** pro samostatné nasazení s aplikací - **\$** zde znamená relativní cesta vzhledem k současné URI aplikace (záložky ze které se spustil příkaz ❔).
63+
4. Bezpečnost: Plugin běží v izolovaném kontextu a neovlivňuje aplikaci.
64+
65+
[PluginR]: ?d=https://raw.githubusercontent.com/HelpViewer/PluginChromeHelpViewer/master/ "PluginChromeHelpViewer"

cs/files.lst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ sectionList.md|Seznam částí
3434
print.md|Tisk
3535
export.md|Export
3636
admonitions.md|Vyznačené informační bloky
37+
contextHelp.md|Kontextová nápověda pro web

cs/keywords-files.lst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@
3030
26
3131
34
3232
35
33+
36

cs/keywords.lst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ Odkaz
3030
Identita;Branding;Vizuál
3131
Export
3232
Admonition;upozornění;Blok;infoblok;vyznačení
33+
Kontext;Kontextové menu;Pravé tlačítko;Co je zde

cs/tree.lst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ Vydání verze nápovědy|Vydání verze nápovědy||publish.md
3030
📥 Export|Export||export.md
3131
🌐 Nový jazyk|Nový jazyk||newLang.md
3232
🤝 Integrace s aplikacemi|Integrace s aplikacemi||integration.md
33+
❔ Kontextová nápověda pro web|Kontextová nápověda pro web||contextHelp.md
3334
💬 Uživatelská skupina|Uživatelská skupina Discord||https://discord.gg/J2SjcmqHSZ

en/contextHelp.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# ❔ Contextual help for the web
2+
3+
The HelpViewer solution includes a [plugin][PluginR] for browsers based on the Chromium engine (Chrome, Edge).
4+
5+
## Features
6+
7+
The plugin adds the ❔ **What's here?** action to the right-click menu, which then opens a specific chapter in a specific help file in the same way that was common in operating systems in the past.
8+
9+
## Installation
10+
11+
**The system administrator** must install the plugin on user workstations in **developer mode** (chrome://extensions/). The plugin is not available in the Chrome Web Store.
12+
13+
## Integrating the application and help
14+
15+
**The programmer is responsible for integrating the help into the application**.
16+
Simply define the **hvHelpFile object** in the web application:
17+
18+
```javascript
19+
var hvHelpFile = {
20+
file: 'hlp-user/Help-__.zip',
21+
viewer: 'https://helpviewer.github.io/index.html',
22+
//viewer: '$/index.html', // relative path to the viewer derived from the application location
23+
routing: false
24+
//, extension: '.md'
25+
//, offset: 0
26+
}
27+
```
28+
29+
The definition can be changed dynamically based on context (e.g., by page). More details in the [plugin documentation][PluginR].
30+
31+
## Retrieving the list of chapters
32+
33+
For help authors, chapter names—derived from the **id** attribute of controls in the application—are key.
34+
**The programmer must provide them**—they are responsible for configuring the plugin.
35+
36+
### Steps for the programmer
37+
38+
1. Open the developer console (F12) on the application page.
39+
2. Retrieve all element IDs:
40+
41+
```javascript
42+
allElements = Array.from(document.body.querySelectorAll('*')).map(x => x.id).filter(x => x);
43+
```
44+
45+
3. For combined IDs (e.g., trees, lists—only prefixes before **|** are combined):
46+
47+
```javascript
48+
allElements = [...new Set(Array.from(document.body.querySelectorAll('*')).map(x => x.id).filter(x => x).map(x => x.split('|')[0]))];
49+
```
50+
51+
1. **Verify behavior** in the target environment—the **routing, extension, and offset** parameters affect the final chapter name.
52+
53+
## Special cases
54+
55+
- For **elements without an ID**, the **noid.md** chapter opens (or noid.(extension) from the configuration)
56+
- Test on different pages/forms according to the application architecture
57+
58+
## Debugging and tips
59+
60+
1. If the ❔ item is missing, check **hvHelpFile** in the console: console.log(hvHelpFile).
61+
2. Is the name of the opened chapter incorrect, or is no chapter text displayed? Verify the element ID under the cursor and the offset/routing/extension configuration. Also verify that you have created the chapter file in the help.
62+
3. Use **\$/index.html** for standalone deployment with the application—**\$** here denotes a relative path relative to the current application URI (the tab from which the ❔ command was launched).
63+
4. Security: The plugin runs in an isolated context and does not affect the application.
64+
65+
[PluginR]: ?d=https://raw.githubusercontent.com/HelpViewer/PluginChromeHelpViewer/master/ "PluginChromeHelpViewer"

en/files.lst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ sectionList.md|Sections list
3434
print.md|Print
3535
export.md|Export
3636
admonitions.md|Admonitions
37+
contextHelp.md|Contextual help for the web

en/keywords-files.lst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@
3030
26
3131
34
3232
35
33+
36

en/keywords.lst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ Link;Hyperlink
3030
Branding;Visual;Brand;Identity
3131
Export
3232
Admonition;warning;Block;info block;marking;highlight;callouts;callout block
33+
Context;Contextual;What is here

en/tree.lst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ Publishing of help|Publishing of help||publish.md
3030
📥 Export|Export||export.md
3131
🌐 New language|New language||newLang.md
3232
🤝 Integration with application|Integration with application||integration.md
33+
❔ Contextual help for the web|Contextual help for the web||contextHelp.md
3334
💬 User group|Discord user group||https://discord.gg/J2SjcmqHSZ

0 commit comments

Comments
 (0)