Add contextual user guide help buttons across mapped pages and dialogs - #303
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ee67e35 to
50e321d
Compare
Add per-entity title keys and a working learnAbout_(title) helper for the top-nav help tooltip, following the existing arrow-function translation pattern in this file (activeFiltersCount_, moreLabels_, etc).
roles/users links were swapped: roles manages access groups (access-control.html), users manages accounts/permissions (permissions.html). Add missing 'user' detail route mapping. Point dashboard at the general orientation doc instead of the unrelated analyst-workflow guide.
currentHelpLabel called a translation function that didn't exist, so it silently always fell back to hardcoded English regardless of locale. Wire it up to the new learnAbout_/titleKey translations.
level09
left a comment
There was a problem hiding this comment.
Looks good. Route-keyed lookup plus one computed in the global mixin is the right amount of machinery for this.
Since it has been open a while I checked the things most likely to have rotted, and they held up: all 18 doc URLs return 200, all 29 route keys match real route names in config.js, and every titleKey resolves to a key that exists in jsapi.jinja2.
One follow-up, not a blocker. Eight of the new strings have no Arabic yet:
Learn about {title}, What is Bayanat?, Activity Monitor, Dynamic Fields, Permissions, Media Management, Video Deduplication, Data Export
The other seven are already translated (Locations, Labels, Sources, Events, Access Control, Media Import, Data Import). Because Learn about {title} is one of the missing ones, those seven come out mixed, like "Learn about الأماكن", which reads worse than plain English. #391 adds eight more, so it is one extract and update pass covering both, then Khaleel for the Arabic. Merging this first so it stops aging against main.
Tiny thing whenever you next touch the file: in global-mixin.js currentHelpLabel falls back to window.translations || {} and then calls translations.learnAbout_(title) on it, which would throw in exactly the case the fallback is there for. It cannot happen in practice since layout.html loads jsapi before the mixin, so either the fallback or the unguarded call can go.
Rebase before merge.
Description
Adds a reusable contextual help button and wires it to relevant Bayanat docs pages across mapped admin pages/dialogs.
Also adds revision-history help links in entity cards and OCR help in media dashboard/transcription..
How to Test
Jira ID (if applicable)
BYNT-1560