mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Removing error styles from user messages
Summary: Removing error styles from user messages. Only unexpected errors are styled with red icon and border. Removing reportSuccess message - leaving it for another diff. Test Plan: manual tests Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3063
This commit is contained in:
@@ -14,10 +14,9 @@ import {isNarrowScreenObs, testId} from 'app/client/ui2018/cssVars';
|
||||
const maxAppErrors = 5;
|
||||
|
||||
interface INotifier {
|
||||
createUserMessage(message: string, options?: INotifyOptions): INotification;
|
||||
// If you are looking to report errors, please do that via reportError rather
|
||||
// than these methods so that we have a chance to send the error to our logs.
|
||||
createUserError(message: string, options?: INotifyOptions): INotification;
|
||||
createUserMessage(message: string, options?: INotifyOptions): INotification;
|
||||
createAppError(error: Error): void;
|
||||
|
||||
createProgressIndicator(name: string, size: string, expireOnComplete: boolean): IProgress;
|
||||
@@ -217,21 +216,6 @@ export class Notifier extends Disposable implements INotifier {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a basic toast user error. By default, expires in 10 seconds.
|
||||
* Takes an options objects to configure `expireSec` and `canUserClose`.
|
||||
* Set `expireSec` to 0 to prevent expiration.
|
||||
*
|
||||
* If you are looking to report errors, please do that via reportError so
|
||||
* that we have a chance to send the error to our logs.
|
||||
*/
|
||||
public createUserError(message: string, options: Partial<INotifyOptions> = {}): INotification {
|
||||
return this.createUserMessage(message, {
|
||||
level: 'error',
|
||||
...options
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a basic toast notification. By default, expires in 10 seconds.
|
||||
* Takes an options objects to configure `expireSec` and `canUserClose`.
|
||||
|
||||
Reference in New Issue
Block a user