thub.com
From 3d4a528e550d0262d3192708d74fc605941c19bc Mon Sep 17 00:00:00 2001
From: wSedlacek
Date: Sun, 3 Dec 2023 17:58:44 -0800
Subject: [PATCH 1/6] fix(core): safe important check
---
packages/core/ui/styling/css-utils.ts | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/packages/core/ui/styling/css-utils.ts b/packages/core/ui/styling/css-utils.ts
index 81684401ac..25a9054a69 100644
--- a/packages/core/ui/styling/css-utils.ts
+++ b/packages/core/ui/styling/css-utils.ts
@@ -2,7 +2,11 @@ import { Trace } from '../../trace';
import { CoreTypes } from '../../core-types';
import { Length } from './style-properties';
-export function cleanupImportantFlags(value: string, propertyName: string) {
+export function cleanupImportantFlags(value: unknown, propertyName: string) {
+ if (typeof value !== 'string') {
+ return value;
+ }
+
const index = value?.indexOf('!important');
if (index >= 0) {
if (Trace.isEnabled()) {
From c3c7b59694a34e2a116288929d1de80ecaa00524 Mon Sep 17 00:00:00 2001
From: Nathan Walker
Date: Sun, 17 Dec 2023 15:17:32 -0800
Subject: [PATCH 2/6] fix(time-picker): properly handle 0 on hour and minutes
with valueChanged (#10460)
closes https://github.com/NativeScript/NativeScript/issues/10457
---
.../src/ui/time-picker/time-picker-tests.ts | 14 ++++++++++++++
apps/toolbox/src/pages/datepicker.ts | 2 ++
apps/toolbox/src/pages/datepicker.xml | 4 ++++
packages/core/ui/time-picker/time-picker-common.ts | 10 ++++++++--
4 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/apps/automated/src/ui/time-picker/time-picker-tests.ts b/apps/automated/src/ui/time-picker/time-picker-tests.ts
index e7af6b34c2..6de5aafbe2 100644
--- a/apps/automated/src/ui/time-picker/time-picker-tests.ts
+++ b/apps/automated/src/ui/time-picker/time-picker-tests.ts
@@ -197,6 +197,13 @@ export class TimePickerTest extends testModule.UITest
+
+
+
+
diff --git a/packages/core/ui/time-picker/time-picker-common.ts b/packages/core/ui/time-picker/time-picker-common.ts
index 92913a3bd8..115d845545 100644
--- a/packages/core/ui/time-picker/time-picker-common.ts
+++ b/packages/core/ui/time-picker/time-picker-common.ts
@@ -165,8 +165,11 @@ minuteIntervalProperty.register(TimePickerBase);
export const minuteProperty = new Property({
name: 'minute',
- defaultValue: 0,
+ // avoid defaultValue of 0 because it will prevent valueChanged from firing to initialize value due to it already matching defaultValue to start
+ // sometimes user needs to set 0: https://github.com/NativeScript/NativeScript/issues/10457
+ defaultValue: null,
valueChanged: (picker, oldValue, newValue) => {
+ newValue = newValue || 0;
if (!isMinuteValid(newValue) || !isValidTime(picker)) {
throw new Error(getErrorMessage(picker, 'minute', newValue));
}
@@ -179,8 +182,11 @@ minuteProperty.register(TimePickerBase);
export const hourProperty = new Property({
name: 'hour',
- defaultValue: 0,
+ // avoid defaultValue of 0 because it will prevent valueChanged from firing to initialize value due to it already matching defaultValue to start
+ // sometimes user needs to set 0: https://github.com/NativeScript/NativeScript/issues/10457
+ defaultValue: null,
valueChanged: (picker, oldValue, newValue) => {
+ newValue = newValue || 0;
if (!isHourValid(newValue) || !isValidTime(picker)) {
throw new Error(getErrorMessage(picker, 'Hour', newValue));
}
From 826ef7f8ddbeda6ff8a75edc4971084833405915 Mon Sep 17 00:00:00 2001
From: Nathan Walker
Date: Sun, 17 Dec 2023 15:24:27 -0800
Subject: [PATCH 3/6] chore: readme update
[skip ci]
---
README.md | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
index 9f430241bb..66c9e245d8 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@
-[NativeScript](http://www.nativescript.org) empowers you to access native APIs from JavaScript directly. Currently iOS and Android runtimes are provided for rich mobile development across a variety of diverse use cases.
+[NativeScript](http://www.nativescript.org) empowers you to access native APIs from JavaScript directly. Currently iOS, Android, and visionOS runtimes are provided for rich mobile development across a variety of diverse use cases.
[](https://app.fossa.com/projects/git%2Bgithub.com%2FNativeScript%2FNativeScript?ref=badge_large)
@@ -40,7 +40,7 @@ We love you and your pull requests 🤗. Please follow our [contributing guide](
## @nativescript/*
- [@nativescript/core](https://github.com/NativeScript/NativeScript/tree/main/packages/core)
- Core iOS/Android for NativeScript.
+ Singular primitives offering an easy-to-use API surface for diverse iOS/Android APIs implemented with NativeScript.
- [@nativescript/types](https://www.npmjs.com/package/@nativescript/types)
Types for both iOS/Android below wrapped up as a convenience. *Most commonly used.*
- [@nativescript/types-ios](https://github.com/NativeScript/NativeScript/tree/main/packages/types-ios)
@@ -73,14 +73,14 @@ We love you and your pull requests 🤗. Please follow our [contributing guide](
Outside the source centralized in this repo, NativeScript consists of a few other source repos. Here are the major ones:
-- [iOS Runtime](https://github.com/NativeScript/ns-v8ios-runtime)
- NativeScript iOS Runtime: Empowers JavaScript code to be executed on iOS devices written in a mix of C++, Objective-C, and Swift.
+- [iOS and visionOS Runtime](https://github.com/NativeScript/ns-v8ios-runtime)
+ Empowers JavaScript code to be executed on iOS and visionOS devices written in a mix of C++, Objective-C, and Swift.
- [Android Runtime](https://github.com/NativeScript/android-runtime)
- NativeScript Android Runtim: Empowers JavaScript code to be executed on Android devices written in a mix of C++, Java and Kotlin.
+ Empowers JavaScript code to be executed on Android devices written in a mix of C++, Java and Kotlin.
- [CLI](//github.com/NativeScript/nativescript-cli)
- NativeScript command-line interface empowering you to create, build, and run apps using NativeScript.
+ Command-line interface empowering you to create, build, and run apps using NativeScript.
- [Docs](//github.com/NativeScript/docs-new)
- NativeScript documentation available at written in Markdown.
+ Documentation available at written in Markdown.
- [Plugins](https://github.com/NativeScript/plugins)
A [plugin workspace](https://docs.nativescript.org/plugins/plugin-workspace-guide.html) with several useful plugins.
- [Firebase](https://github.com/NativeScript/firebase)
@@ -92,4 +92,4 @@ Outside the source centralized in this repo, NativeScript consists of a few othe
- [Artwork](https://github.com/NativeScript/artwork)
Want to use our logo or colors? Feel free to use any of our ready-to-use media material.
-