Skip to content

Commit bec6dcd

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/flavor-snippets
2 parents 23a9a61 + 6a9d63a commit bec6dcd

File tree

7 files changed

+69
-39
lines changed

7 files changed

+69
-39
lines changed

content/plugins/firebase-core.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ A plugin to initialize [FirebaseApp](https://firebase.google.com/docs/reference/
1515

1616
Use this plugin with any of the following plugins:
1717

18-
- [@nativescript/firebase-admob](../firebase-admob/)
19-
- [@nativescript/firebase-analytics](../firebase-admob/)
20-
- [@nativescript/firebase-app-check](../firebase-app-check/)
21-
- [@nativescript/firebase-app-check-debug](../firebase-app-check-debug/)
22-
- [@nativescript/firebase-auth](../firebase-auth/)
23-
- [@nativescript/firebase-crashlytics](../firebase-analytics/)
24-
- [@nativescript/firebase-database](../firebase-database/)
25-
- [@nativescript/firebase-dynamic-links](../firebase-dynamic-links/)
26-
- [@nativescript/firebase-firestore](../firebase-firestore/)
27-
- [@nativescript/firebase-functions](../firebase-functions/)
28-
- [@nativescript/firebase-in-app-messaging](../firebase-in-app-messaging/)
29-
- [@nativescript/firebase-installations](../firebase-installations/)
30-
- [@nativescript/firebase-messaging](../firebase-messaging/)
31-
- [@nativescript/firebase-messaging-core](../firebase-messaging-core/)
32-
- [@nativescript/firebase-performance](../firebase-performance/)
33-
- [@nativescript/firebase-remote-config](../firebase-remote-config/)
34-
- [@nativescript/firebase-storage](../firebase-storage/)
18+
- [@nativescript/firebase-admob](https://docs.nativescript.org/plugins/firebase-admob)
19+
- [@nativescript/firebase-analytics](https://docs.nativescript.org/plugins/firebase-analytics)
20+
- [@nativescript/firebase-app-check](https://docs.nativescript.org/plugins/firebase-app-check)
21+
- [@nativescript/firebase-app-check-debug](https://docs.nativescript.org/plugins/firebase-app-check-debug)
22+
- [@nativescript/firebase-auth](https://docs.nativescript.org/plugins/firebase-auth)
23+
- [@nativescript/firebase-crashlytics](https://docs.nativescript.org/plugins/firebase-crashlytics)
24+
- [@nativescript/firebase-database](https://docs.nativescript.org/plugins/firebase-database)
25+
- [@nativescript/firebase-dynamic-links](https://docs.nativescript.org/plugins/firebase-dynamic-links)
26+
- [@nativescript/firebase-firestore](https://docs.nativescript.org/plugins/firebase-firestore)
27+
- [@nativescript/firebase-functions](https://docs.nativescript.org/plugins/firebase-functions)
28+
- [@nativescript/firebase-in-app-messaging](https://docs.nativescript.org/plugins/firebase-in-app-messaging)
29+
- [@nativescript/firebase-installations](https://docs.nativescript.org/plugins/firebase-installations)
30+
- [@nativescript/firebase-messaging](https://docs.nativescript.org/plugins/firebase-messaging)
31+
- [@nativescript/firebase-messaging-core](https://docs.nativescript.org/plugins/firebase-messaging-core)
32+
- [@nativescript/firebase-performance](https://docs.nativescript.org/plugins/firebase-performance)
33+
- [@nativescript/firebase-remote-config](https://docs.nativescript.org/plugins/firebase-remote-config)
34+
- [@nativescript/firebase-storage](https://docs.nativescript.org/plugins/firebase-storage)
3535

3636
## Installation
3737

content/plugins/firebase-database.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,14 @@ If you are listening to a node with many children, only listening to data you ca
169169
```ts
170170
import { firebase } from '@nativescript/firebase-core'
171171

172-
const onChildAdd = firebase()
173-
.database()
174-
.ref('/users')
175-
.on('child_added', (snapshot) => {
176-
console.log('A new node has been added', snapshot.val())
177-
})
172+
const ref = firebase().database().ref('/users')
173+
174+
const onChildAdd = ref.on('child_added', (snapshot) => {
175+
console.log('A new node has been added', snapshot.val())
176+
})
178177

179178
// Stop listening for updates when no longer required
180-
firebase().database().ref('/users').off('child_added', onChildAdd)
179+
ref.off('child_added', onChildAdd)
181180
```
182181

183182
### Remove a reference event listener
@@ -187,17 +186,22 @@ To unsubscribe from an event, call the `off` method on the reference passing it
187186
```ts
188187
import { firebase } from '@nativescript/firebase-core'
189188

190-
const onValueChange = firebase()
191-
.database()
192-
.ref(`/users/${userId}`)
193-
.on('value', (snapshot) => {
194-
console.log('User data: ', snapshot.val())
195-
})
189+
const ref = firebase().database().ref(`/users/${userId}`)
190+
191+
const onValueChange = ref.on('value', (snapshot) => {
192+
console.log('User data: ', snapshot.val())
193+
})
196194

197195
// Stop listening for updates when no longer required
198-
firebase().database().ref(`/users/${userId}`).off('value', onValueChange)
196+
ref.off('value', onValueChange)
199197
```
200198

199+
:::tip Note
200+
201+
The `off` method requires the same `ref` as specified on the corresponding `on` method. The event handler specified in the `on` method must be unique. If a common event handler is used for multiple events, an anonymous function can be used to invoke the common handler.
202+
203+
:::
204+
201205
### Data querying
202206

203207
Realtime Database provides support for basic querying of your data. When a reference node contains children, you can both order & limit the returned results.

content/project-structure/app-resources.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ contributors:
77

88
The App_Resources folder contains platform-specific resources of the application (icons, configuration files, native code, etc.). An application that supports both Android and iOS would therefore contain a subfolder for each platform.
99

10-
This page serves as a quick reference to understand how most settings in App_Resources affect behavior and the the look of a NativeScript app.
10+
This page serves as a quick reference to understand how most settings in App_Resources affect the behavior and the look of a NativeScript app.
1111

1212
## Android specific resources
1313

@@ -27,7 +27,7 @@ App_Resources/
2727
└─ ... more
2828
```
2929

30-
Values can be overriden on specific API levels by making the changes in the corresponding directories.
30+
Values can be overridden on specific API levels by making the changes in the corresponding directories.
3131

3232
### Android app display name
3333

@@ -62,7 +62,7 @@ To change the default color of the status bar, edit the `ns_primaryDark` color i
6262

6363
:::tip Note
6464

65-
The color will be applied on API21+ since lower API leves do not support custom status bar colors\*.
65+
The color will be applied on API21+ since lower API levels do not support custom status bar colors\*.
6666

6767
:::
6868

@@ -79,7 +79,7 @@ Various native elements have an accent color, which can be changed by setting th
7979

8080
:::tip Note
8181

82-
The color will be applied on API21+ since lower API leves do not support custom accent colors.
82+
The color will be applied on API21+ since lower API levels do not support custom accent colors.
8383

8484
:::
8585

content/project-structure/src/fonts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ Add a new css class (for example in [`app.css`](/project-structure/src/app-css-s
2525

2626
```css
2727
.font-albert-sans {
28-
font-family: "Albert Sans", "albert-sans-700";
28+
font-family: 'Albert Sans', 'albert-sans-700';
2929
font-weight: 700;
3030
}
3131

3232
.far {
33-
font-family: "Font Awesome 5 Free", "fa-regular-400";
33+
font-family: 'Font Awesome 5 Free', 'fa-regular-400';
3434
font-weight: 400;
3535
}
3636
```
@@ -66,7 +66,7 @@ In Vue, when using html entities like the char codes above, use the `.decode` mo
6666

6767
::: details Sizing font images
6868
Images have specific stretch options (`none`, `aspectFit`, `aspectFill`). Font icons on the other hand usually use `font-size` to control the size of the icon.
69-
When using an `Image`, you can control the size with `font-size`, but you need to set `stretch="none"` for it to take effect. Setting `stretch` to anything other than `none` will cause the icon to be streched by measuring the image.
69+
When using an `Image`, you can control the size with `font-size`, but you need to set `stretch="none"` for it to take effect. Setting `stretch` to anything other than `none` will cause the icon to be stretched by measuring the image.
7070
:::
7171

7272
If an icon doesn't appear, or renders unintended characters, make sure you are using the correct font family and weight.

content/setup/windows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ ns doctor android
128128

129129
If you see **No issues were detected** then you have successfully set up your system.
130130

131-
Lastly, you will also want to [set up an android device or emulator](#setting-up-an-android-device-or-emulator).
131+
Lastly, you will also want to [set up an android device](/guide/running#enable-usb-debugging-on-android-devices) or [emulator](/guide/running#android-emulators).
132132

133133
::: warning Troubleshooting
134134

content/snacks/index.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,20 @@ Each Snack reveals NativeScript's power, from UI tricks to platform SDK usages t
293293
videoUrl: "https://youtube.com/embed/bXSyBTGJIlc",
294294
videoTitle: "Top Bar Height with NativeScript",
295295
},
296+
{
297+
id: 19,
298+
title: "iOS Spotlight Search",
299+
href: "https://stackblitz.com/edit/nativescript-ios-spotlight-search?file=src%2Fapp%2Fitem%2Fitem.service.ts",
300+
description: "How to allow app content to be searchable using iOS Core Spotlight.",
301+
categories: [
302+
{
303+
title: "iOS Core Spotlight",
304+
href: "https://developer.apple.com/documentation/corespotlight",
305+
},
306+
],
307+
videoUrl: "https://youtube.com/embed/uzzMskFL5g8",
308+
videoTitle: "Use iOS Spotlight Search with NativeScript",
309+
},
296310
// Not ready yet but will discuss with Dylan to update
297311
// {
298312
// id: 15,

content/ui/segmented-bar.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,18 @@ To set the background color of the entire bar, use `backgroundColor`.
4747

4848
See [Color](/api/class/Color).
4949

50+
### selectedTextColor
51+
52+
```ts
53+
selectedTextColor: Color
54+
```
55+
56+
Gets or sets the text color of the selected item.
57+
58+
To set the text color of the entire bar, use `selectedTextColor`.
59+
60+
See [Color](/api/class/Color).
61+
5062
### ...Inherited
5163

5264
For additional inherited properties, refer to the [API Reference](/api/class/SegmentedBar).

0 commit comments

Comments
 (0)