mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Reopen HelpScout beacon to the last-opened article
Summary:
- When opening HelpScout beacon to an article ("answers"), avoid a 'navigate'
call to let the beacon show the previously open article.
- Work around a bug with reloading a page with a beacon article open: HelpScout
renders the last state without triggering usual events.
- Report errors to server when beacon fails to load.
- reportWarning() method now reports the message to the server.
Test Plan: Added a test case
Reviewers: paulfitz
Reviewed By: paulfitz
Differential Revision: https://phab.getgrist.com/D3345
This commit is contained in:
@@ -53,10 +53,14 @@ export function reportMessage(msg: string, options?: Partial<INotifyOptions>) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows warning toast notification (with yellow styling).
|
||||
* Shows warning toast notification (with yellow styling), and log to server and to console. Pass
|
||||
* {level: 'error'} for same behavior with adjusted styling.
|
||||
*/
|
||||
export function reportWarning(msg: string, options?: Partial<INotifyOptions>) {
|
||||
reportMessage(msg, {level: 'warning', ...options});
|
||||
options = {level: 'warning', ...options};
|
||||
log.warn(`${options.level}: `, msg);
|
||||
_logError(msg);
|
||||
reportMessage(msg, options);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user