It's the Help Widget from LSB -- chat and all -- extracted in a reusable addon.
- Ember.js v3.28 or above
- Ember CLI v3.28 or above
- Node.js v16 or above
NOTE: Version 0.2.0 is a breaking change due to ember-auto-import moving to version 2.x from 1.x
ember install ember-help-widget
ember-help-widget
supplies the <HelpWidget />
component, which is the main
interface for adding the widget to an Ember app. The component expects a handful
of parameters:
@viewName
- This is the name of the view the user is currently on, which will appear in the header of the widget. This is also used for searching the help center for suggestions.@performSearch
- The action for searching the help center for articles. It is passed the current search query and should return a promise that resolves to an array of result object, each of which should have aurl
field and atext
field, indicating the URL and the title of the link to the help center, respectively.@fetchSuggestions
- The action for fetching suggestions from the help center. It is passed the current view name and should return a promise that resolves to an array of result objects, which should have the same fields as above.@sendFeedback
- The action for sending feedback. It is passed an object containing asubject
line, themessage
itself, and apriority
, which will be one of "low", "normal", "high", or "urgent". It is expected to return a promise, though the promise need not resolve to any particular value.@zendeskChatKey
- The API key from Zendesk for accessing the Chat SDK@chatTags
- An array of tags to assign to chat conversations in Zendesk@currentUserName
- The name of the current user. This is primarily used to auto-populate the info into chat sessions.@currentUserEmail
- The email of the current user. As above, this is primarily for auto-populating into chat sessions.@keyboardShortcuts
- Optional. An array of objects representing keyboard shortcuts for the current view. Each shortcut object should have anaction
, which describes the action the shortcut will take, as well as acombos
array, each of which is itself an array of string representing the keys comprising the keyboard shortcut's chord.combos
is an array, as you could have multiple chords that invoke the same action.@helpCenterUrlKey
- Optional. Defaults tohelp-center-url
. The key must be defined underember-help-widget
.
The addon leverages ember-intl
for internationalization of all strings, which
can be overridden by translations for the consuming app. Of particular note are a
couple translation keys which are intended to always be overridden:
ember-help-widget.help-center-url
- The URL that will link to the app's help centerember-help-widget.contact-phone-number
- A phone number to call for support
See the Contributing guide for details.
This project is licensed under the MIT License.