User tests: Successful: Unsuccessful:
The inline help toggle forgets its state on every page load, so anyone who keeps the descriptions open has to press the button again after each save or reload.
This adds an opt-in storage attribute to the form's inline help config:
<config>
<inlinehelp button="show" storage="local"/>
</config>When it is set, the toggle state is kept in localStorage, keyed by the toggle class and the page URL (path + query string), so each form remembers its own state. Only the visible state is stored; hiding the help removes the key.
FormView::addToolbar() reads storage from the form XML and passes it to the button.InlinehelpButton gets a storage option, rendered as data-storage.inlinehelp.es6.js restores and saves the state only when the button carries data-storage="local". Storage access is wrapped in try/catch, so blocked storage (private mode, disabled site data) falls back to the current behaviour.Forms without the attribute are unchanged.
npm run build:js.administrator/components/com_content/forms/article.xml, change <inlinehelp button="show"/> to <inlinehelp button="show" storage="local"/>.The inline help is hidden again after every reload, on every form.
joomla.inlinehelp.* key is gone from localStorage.localStorage — unchanged behaviour.Please select:
| Status | New | ⇒ | Pending |
| Category | ⇒ | Libraries JavaScript NPM Change |
| Labels |
Added:
NPM Resource Changed
PR-6.3-dev
|
||
Nice idea