Skip to content

Commit 1fc1b12

Browse files
committed
Add LiveObjects product to site navigation
This was added by searching for "livesync" in "src" folder and adding corresponding "liveObjects" sections where necessary.
1 parent 0d1c04b commit 1fc1b12

File tree

10 files changed

+109
-3
lines changed

10 files changed

+109
-3
lines changed

src/components/ProductNavigation/ProductNavigation.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const ProductNavigation = ({ currentProduct = 'channels' }: { currentProduct?: s
2828
const onChannels = currentProduct === 'channels';
2929
const onLiveSync = currentProduct === 'livesync';
3030
const onChat = currentProduct === 'chat';
31+
const onLiveObjects = currentProduct === 'liveobjects';
3132
const onAssetTracking = currentProduct === 'asset-tracking';
3233

3334
return (
@@ -50,6 +51,9 @@ const ProductNavigation = ({ currentProduct = 'channels' }: { currentProduct?: s
5051
<Item to="/docs/products/chat" active={onChat}>
5152
Chat
5253
</Item>
54+
<Item to="/docs/products/liveobjects" active={onLiveObjects}>
55+
LiveObjects
56+
</Item>
5357
<Item to="/docs/products/asset-tracking" active={onAssetTracking}>
5458
Asset Tracking
5559
</Item>

src/components/common/meta-title.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ describe('getMetaTitle', () => {
77
['spaces', 'Ably Spaces', 'Setup'],
88
['livesync', 'Ably LiveSync', 'Begin'],
99
['chat', 'Ably Chat', 'Emojis'],
10+
['liveobjects', 'Ably LiveObjects', 'Setup'],
1011
['asset-tracking', 'Ably Asset Tracking', 'Examples'],
1112
['api-reference', 'API References', 'Setup'],
1213
['pub_sub', 'Ably Pub/Sub', 'Authentication'],

src/components/common/meta-title.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export const getMetaTitle = (title: string, product: ProductName): string => {
66
spaces: 'Ably Spaces',
77
livesync: 'Ably LiveSync',
88
chat: 'Ably Chat',
9+
liveobjects: 'Ably LiveObjects',
910
'asset-tracking': 'Ably Asset Tracking',
1011
'api-reference': 'API References',
1112
pub_sub: 'Ably Pub/Sub',

src/data/content/homepage.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ export default {
5353
image: 'spaces.png',
5454
links: [{ text: 'Get started', href: '/docs/spaces' }],
5555
},
56+
{
57+
title: 'LiveObjects',
58+
type: 'feature',
59+
content: 'Seamlessly sync application state between clients.',
60+
image: 'liveobjects.png',
61+
links: [{ text: 'Get started', href: '/docs/liveobjects' }],
62+
},
5663
{
5764
title: 'LiveSync',
5865
type: 'feature',

src/data/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
assetTrackingNavData,
33
chatNavData,
4+
liveObjectsNavData,
45
liveSyncNavData,
56
platformNavData,
67
pubsubNavData,
@@ -27,6 +28,10 @@ export const productData = {
2728
nav: spacesNavData,
2829
languages: languageData.spaces,
2930
},
31+
liveObjects: {
32+
nav: liveObjectsNavData,
33+
languages: languageData.liveObjects,
34+
},
3035
liveSync: {
3136
nav: liveSyncNavData,
3237
languages: languageData.liveSync,

src/data/languages/languageData.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ export default {
3131
javascript: 0.4,
3232
react: 0.4,
3333
},
34+
liveObjects: {
35+
javascript: 2.6,
36+
},
3437
liveSync: {
3538
javascript: 0.4,
3639
},

src/data/nav/index.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
import platformNavData from './platform';
22
import pubsubNavData from './pubsub';
33
import chatNavData from './chat';
4+
import liveObjectsNavData from './liveobjects';
45
import spacesNavData from './spaces';
56
import liveSyncNavData from './livesync';
67
import assetTrackingNavData from './assettracking';
78

8-
export { platformNavData, pubsubNavData, chatNavData, spacesNavData, liveSyncNavData, assetTrackingNavData };
9+
export {
10+
platformNavData,
11+
pubsubNavData,
12+
chatNavData,
13+
liveObjectsNavData,
14+
spacesNavData,
15+
liveSyncNavData,
16+
assetTrackingNavData,
17+
};

src/data/nav/liveobjects.ts

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import { NavProduct } from './types';
2+
3+
export default {
4+
name: 'Ably LiveObjects',
5+
link: '/docs/liveobjects',
6+
icon: {
7+
closed: 'icon-product-liveobjects-mono',
8+
open: 'icon-product-liveobjects',
9+
},
10+
content: [
11+
{
12+
name: 'Introduction',
13+
pages: [
14+
{
15+
name: 'About LiveObjects',
16+
link: '/docs/liveobjects',
17+
},
18+
],
19+
},
20+
{
21+
name: 'Get started',
22+
pages: [
23+
{
24+
name: 'Quickstart',
25+
link: '/docs/liveobjects/quickstart',
26+
},
27+
],
28+
},
29+
{
30+
name: 'LiveObjects features',
31+
pages: [
32+
{
33+
name: 'LiveCounter',
34+
link: '/docs/liveobjects/counter',
35+
},
36+
{
37+
name: 'LiveMap',
38+
link: '/docs/liveobjects/map',
39+
},
40+
{
41+
name: 'Batch Operations',
42+
link: '/docs/liveobjects/batch',
43+
},
44+
{
45+
name: 'Lifecycle Events',
46+
link: '/docs/liveobjects/lifecycle',
47+
},
48+
{
49+
name: 'Typing',
50+
link: '/docs/liveobjects/typing',
51+
},
52+
],
53+
},
54+
],
55+
api: [
56+
{
57+
name: 'API References',
58+
pages: [
59+
{
60+
link: 'https://ably.com/docs/sdk/js/v2.0/interfaces/ably.Objects.html',
61+
name: 'JavaScript SDK',
62+
external: true,
63+
},
64+
],
65+
},
66+
],
67+
} satisfies NavProduct;

src/data/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { LanguageData } from './languages/types';
33
import { NavProduct } from './nav/types';
44

55
const pageKeys = ['homepage'] as const;
6-
const productKeys = ['platform', 'pubsub', 'chat', 'spaces', 'liveSync', 'assetTracking'] as const;
6+
const productKeys = ['platform', 'pubsub', 'chat', 'spaces', 'liveObjects', 'liveSync', 'assetTracking'] as const;
77

88
export type ProductKey = (typeof productKeys)[number];
99
type PageKey = (typeof pageKeys)[number];

src/templates/template-data.d.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,22 @@ export type AblyPageContext = {
3535
script: string;
3636
};
3737

38-
export type ProductName = 'channels' | 'spaces' | 'livesync' | 'chat' | 'asset-tracking' | 'api-reference' | 'home';
38+
export type ProductName =
39+
| 'channels'
40+
| 'spaces'
41+
| 'livesync'
42+
| 'chat'
43+
| 'liveobjects'
44+
| 'asset-tracking'
45+
| 'api-reference'
46+
| 'home';
3947

4048
export type ProductTitle =
4149
| 'Channels'
4250
| 'Ably Spaces'
4351
| 'Ably LiveSync'
4452
| 'Ably Chat'
53+
| 'Ably LiveObjects'
4554
| 'Ably Asset Tracking'
4655
| 'API References'
4756
| 'Home'

0 commit comments

Comments
 (0)