From 8cd1872ef7f4b2bf97d76e68a3b4b763f69cc7d2 Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Sun, 28 Mar 2021 14:39:02 -0700 Subject: [PATCH] chore: better trace handling around css --- packages/core/package.json | 2 +- packages/core/ui/layouts/root-layout/index.d.ts | 6 +++--- packages/core/ui/styling/style-scope.ts | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/core/package.json b/packages/core/package.json index 98be07fad..a5e27263f 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -3,7 +3,7 @@ "main": "index", "types": "index.d.ts", "description": "NativeScript Core Modules", - "version": "8.0.0-alpha.8", + "version": "8.0.0-alpha.9", "homepage": "https://nativescript.org", "repository": { "type": "git", diff --git a/packages/core/ui/layouts/root-layout/index.d.ts b/packages/core/ui/layouts/root-layout/index.d.ts index 93e7b0300..86b9d1e37 100644 --- a/packages/core/ui/layouts/root-layout/index.d.ts +++ b/packages/core/ui/layouts/root-layout/index.d.ts @@ -24,8 +24,8 @@ export interface ShadeCoverOptions { color?: string; tapToClose?: boolean; animation?: { - enterFrom?: TransitionAnimation; // these will only be applied if its the first one to be opened - exitTo?: TransitionAnimation; // these will only be applied if its the last one to be closed + enterFrom?: TransitionAnimation; // only applied if first one to be opened + exitTo?: TransitionAnimation; // only applied if last one to be closed }; ignoreShadeRestore?: boolean; } @@ -38,5 +38,5 @@ export interface TransitionAnimation { rotate?: number; // in degrees opacity?: number; duration?: number; // in milliseconds - curve?: any; // TODO: type collisision branch fixes this! AnimationCurve; + curve?: any; // CoreTypes.AnimationCurve (string, cubicBezier, etc.) } diff --git a/packages/core/ui/styling/style-scope.ts b/packages/core/ui/styling/style-scope.ts index bbe3088ea..3107c8031 100644 --- a/packages/core/ui/styling/style-scope.ts +++ b/packages/core/ui/styling/style-scope.ts @@ -207,7 +207,9 @@ class CSSSource { this._selectors = []; } } catch (e) { - Trace.write('Css styling failed: ' + e, Trace.categories.Error, Trace.messageType.error); + if (Trace.isEnabled()) { + Trace.write('Css styling failed: ' + e, Trace.categories.Style, Trace.messageType.error); + } this._selectors = []; } }