Skip to content

Commit 9ac84e8

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 3bfe8d2 commit 9ac84e8

File tree

10 files changed

+113
-3
lines changed

10 files changed

+113
-3
lines changed

src/components/ProductNavigation/ProductNavigation.tsx

+4
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/chat" 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

+1
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

+1
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

+7
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/spaces' }],
62+
},
5663
{
5764
title: 'LiveSync',
5865
type: 'feature',

src/data/index.ts

+5
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

+3
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

+10-1
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

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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 guide',
25+
link: '/docs/liveobjects/quickstart',
26+
},
27+
{
28+
name: 'LiveObjects setup',
29+
link: '/docs/liveobjects/setup',
30+
},
31+
],
32+
},
33+
{
34+
name: 'LiveObjects features',
35+
pages: [
36+
{
37+
name: 'LiveCounter',
38+
link: '/docs/liveobjects/counter',
39+
},
40+
{
41+
name: 'LiveMap',
42+
link: '/docs/liveobjects/map',
43+
},
44+
{
45+
name: 'Batching Operations',
46+
link: '/docs/liveobjects/batch',
47+
},
48+
{
49+
name: 'Objects Lifecycle Events',
50+
link: '/docs/liveobjects/lifecycle',
51+
},
52+
{
53+
name: 'Typing LiveObjects',
54+
link: '/docs/liveobjects/typing',
55+
},
56+
],
57+
},
58+
],
59+
api: [
60+
{
61+
name: 'API References',
62+
pages: [
63+
{
64+
link: 'https://ably.com/docs/sdk/js/v2.0/interfaces/ably.Objects.html',
65+
name: 'JavaScript SDK',
66+
external: true,
67+
},
68+
],
69+
},
70+
],
71+
} satisfies NavProduct;

src/data/types.ts

+1-1
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

+10-1
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)