(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:
Jarosław Sadziński
2021-10-06 17:50:29 +02:00
parent a2e066176c
commit 26766fd4ab
5 changed files with 25 additions and 36 deletions

View File

@@ -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`.