Skip to content

Commit 3a4dc2d

Browse files
authored
[docs] Switch references from Classic Updates to EAS Update (expo#18262)
* Switch references from Classic Updates to EAS Update * remove a glimpse into the future
1 parent c48b48b commit 3a4dc2d

File tree

87 files changed

+757
-844
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+757
-844
lines changed

docs/common/error-utilities.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ test('redirects old building-standalone-apps paths versioned path', () => {
44
const redirectPath = '/versions/latest/distribution/building-standalone-apps/';
55
const newPath = getRedirectPath(redirectPath);
66

7-
expect(newPath).toEqual('/classic/building-standalone-apps/');
7+
expect(newPath).toEqual('/archive/classic-updates/building-standalone-apps/');
88

99
// The path with guides instead of distribution is very old
1010
expect(getRedirectPath('/versions/latest/guides/building-standalone-apps/')).toEqual(newPath);

docs/common/error-utilities.ts

+20-7
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ const RENAMED_PAGES: Record<string, string> = {
137137
'/guides/': '/workflow/exploring-managed-workflow/',
138138
'/versions/latest/sdk/': '/versions/latest/',
139139
'/versions/latest/sdk/overview/': '/versions/latest/',
140-
'/guides/building-standalone-apps/': '/classic/building-standalone-apps/',
141-
'/distribution/building-standalone-apps/': '/classic/building-standalone-apps/',
140+
'/guides/building-standalone-apps/': '/archive/classic-updates/building-standalone-apps/',
141+
'/distribution/building-standalone-apps/': '/archive/classic-updates/building-standalone-apps/',
142142
'/guides/genymotion/': '/workflow/android-studio-emulator/',
143143
'/workflow/upgrading-expo/': '/workflow/upgrading-expo-sdk-walkthrough/',
144144
'/workflow/create-react-native-app/': '/workflow/glossary-of-terms/#create-react-native-app',
@@ -152,7 +152,8 @@ const RENAMED_PAGES: Record<string, string> = {
152152
// Lots of old links pointing to guides when they have moved elsewhere
153153
'/guides/configuration/': '/workflow/configuration/',
154154
'/guides/expokit/': '/expokit/overview/',
155-
'/guides/publishing/': '/workflow/publishing/',
155+
'/guides/publishing/': '/archive/classic-updates/publishing/',
156+
'/workflow/publishing/': '/archive/classic-updates/publishing/',
156157
'/guides/linking/': '/workflow/linking/',
157158
'/guides/up-and-running/': '/get-started/installation/',
158159
'/guides/debugging/': '/workflow/debugging/',
@@ -179,7 +180,7 @@ const RENAMED_PAGES: Record<string, string> = {
179180

180181
// Additional redirects based on Sentry (04/28/2020)
181182
'/next-steps/installation/': '/get-started/installation/',
182-
'/guides/release-channels/': '/distribution/release-channels/',
183+
'/guides/release-channels/': '/archive/classic-updates/release-channels/',
183184

184185
// Redirects based on Next 9 upgrade (09/11/2020)
185186
'/api/': '/versions/latest/',
@@ -218,9 +219,21 @@ const RENAMED_PAGES: Record<string, string> = {
218219
'/versions/v43.0.0/sdk/permissions/': '/guides/permissions/',
219220
'/versions/latest/sdk/permissions/': '/guides/permissions/',
220221

221-
// updates
222-
'/guides/configuring-ota-updates/': '/guides/configuring-updates/',
223-
224222
// Redirect Gatsby guide to index guides page
225223
'/guides/using-gatsby/': '/guides/',
224+
225+
// Classic updates moved to archive
226+
'/guides/configuring-ota-updates/': '/archive/classic-updates/getting-started/',
227+
'/guides/configuring-updates/': '/archive/classic-updates/getting-started/',
228+
'/distribution/release-channels/': '/archive/classic-updates/release-channels/',
229+
'/distribution/advanced-release-channels/': '/archive/classic-updates/advanced-release-channels/',
230+
'/distribution/optimizing-updates/': '/archive/classic-updates/optimizing-updates/',
231+
'/eas-update/custom-updates-server/': '/distribution/custom-updates-server/',
232+
'/guides/offline-support/': '/archive/classic-updates/offline-support/',
233+
'/guides/preloading-and-caching-assets/':
234+
'/archive/classic-updates/preloading-and-caching-assets/',
235+
'/eas-update/bare-react-native/': '/bare/updating-your-app/',
236+
'/worfkflow/publishing/': '/archive/classic-updates/publishing/',
237+
'/classic/building-standalone-apps/': '/archive/classic-updates/building-standalone-apps/',
238+
'/classic/turtle-cli/': '/archive/classic-updates/turtle-cli/',
226239
};

docs/components/DocumentationHeader.tsx

-14
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import { Search } from './icons/Search';
2020

2121
import { paragraph } from '~/components/base/typography';
2222
import AlgoliaSearch from '~/components/plugins/AlgoliaSearch';
23-
import { shouldShowFeaturePreviewLink } from '~/constants/FeatureFlags';
2423
import * as Constants from '~/constants/theme';
2524

2625
const STYLES_LOGO = css`
@@ -394,19 +393,6 @@ export default class DocumentationHeader extends React.PureComponent<Props> {
394393
<span css={SECTION_LINK_TEXT}>API Reference</span>
395394
</a>
396395
</Link>
397-
{shouldShowFeaturePreviewLink() ? (
398-
<Link href="/feature-preview" passHref>
399-
<a
400-
css={[
401-
SECTION_LINK,
402-
this.props.activeSection === 'featurePreview' && SECTION_LINK_ACTIVE,
403-
]}>
404-
<span css={SECTION_LINK_TEXT}>Feature Preview</span>
405-
</a>
406-
</Link>
407-
) : (
408-
<span />
409-
)}
410396
</SectionContainer>
411397
</div>
412398
);

docs/components/DocumentationPage.tsx

+6-8
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ class DocumentationPageWithApiVersion extends React.Component<Props, State> {
122122
return this.props.router.pathname.startsWith('/versions');
123123
};
124124

125+
private isArchivePath = () => {
126+
return this.props.router.pathname.startsWith('/archive');
127+
};
128+
125129
private isGeneralPath = () => {
126130
return some(navigation.generalDirectories, name =>
127131
this.props.router.pathname.startsWith(`/${name}`)
@@ -137,12 +141,6 @@ class DocumentationPageWithApiVersion extends React.Component<Props, State> {
137141
);
138142
};
139143

140-
private isFeaturePreviewPath = () => {
141-
return some(navigation.featurePreviewDirectories, name =>
142-
this.props.router.pathname.startsWith(`/${name}`)
143-
);
144-
};
145-
146144
private isPreviewPath = () => {
147145
return some(navigation.previewDirectories, name =>
148146
this.props.router.pathname.startsWith(`/${name}`)
@@ -189,12 +187,12 @@ class DocumentationPageWithApiVersion extends React.Component<Props, State> {
189187
return 'general';
190188
} else if (this.isGettingStartedPath()) {
191189
return 'starting';
192-
} else if (this.isFeaturePreviewPath()) {
193-
return 'featurePreview';
194190
} else if (this.isPreviewPath()) {
195191
return 'preview';
196192
} else if (this.isEasPath()) {
197193
return 'eas';
194+
} else if (this.isArchivePath()) {
195+
return 'archive';
198196
}
199197

200198
return 'general';

docs/constants/FeatureFlags.js

-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ const flags = {
33
exampleFlag: true,
44
};
55

6-
const shouldShowFeaturePreviewLink = () => {
7-
return Object.values(flags).some(isInPreview => isInPreview);
8-
};
9-
106
module.exports = {
117
...flags,
12-
shouldShowFeaturePreviewLink,
138
};

docs/constants/navigation-deprecated.js

+46-27
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ const PAGES_DIR = path.resolve(__dirname, '../pages');
1414
/** Manual list of directories to pull in to the getting started tutorial */
1515
const startingDirectories = ['introduction', 'get-started', 'tutorial', 'next-steps'];
1616
/** Manual list of directories to categorize as "EAS content" */
17-
const easDirectories = ['eas', 'build', 'app-signing', 'build-reference', 'submit'];
17+
const easDirectories = ['eas', 'build', 'app-signing', 'build-reference', 'submit', 'eas-update'];
18+
/** Manual list of directories to categorize as "Archive" */
19+
const archiveDirectores = ['archive'];
1820
/** Private preview section which isn't linked in the documentation */
1921
const previewDirectories = ['preview'];
20-
/** Public preview section which is linked under `Feature Preview` */
21-
const featurePreviewDirectories = ['feature-preview', 'eas-update'];
2222
/** All other unlisted directories */
2323
const generalDirectories = fs
2424
.readdirSync(PAGES_DIR, { withFileTypes: true })
@@ -31,8 +31,8 @@ const generalDirectories = fs
3131
![
3232
...startingDirectories,
3333
...previewDirectories,
34-
...featurePreviewDirectories,
3534
...easDirectories,
35+
...archiveDirectores,
3636
].includes(name)
3737
);
3838

@@ -85,7 +85,6 @@ const general = [
8585
makePage('workflow/android-studio-emulator.md'),
8686
makePage('workflow/debugging.md'),
8787
makePage('workflow/configuration.md'),
88-
makePage('workflow/publishing.md'),
8988
makePage('workflow/upgrading-expo-sdk-walkthrough.md'),
9089
makePage('workflow/web.md'),
9190
makePage('workflow/snack.md'),
@@ -99,14 +98,11 @@ const general = [
9998
makeGroup('Distributing Your App', [
10099
makePage('distribution/introduction.md'),
101100
makePage('distribution/app-stores.md'),
102-
makePage('distribution/release-channels.md'),
103-
makePage('distribution/advanced-release-channels.md'),
104101
makePage('distribution/runtime-versions.md'),
105-
makePage('distribution/hosting-your-app.md'),
102+
makePage('distribution/custom-updates-server.md'),
106103
makePage('distribution/uploading-apps.md'),
107104
makePage('distribution/app-transfers.md'),
108105
makePage('distribution/security.md'),
109-
makePage('distribution/optimizing-updates.md'),
110106
makePage('distribution/publishing-websites.md'),
111107
]),
112108
]),
@@ -137,12 +133,9 @@ const general = [
137133
makePage('guides/typescript.md'),
138134
makePage('guides/authentication.md'),
139135
makePage('guides/userinterface.md'),
140-
makePage('guides/preloading-and-caching-assets.md'),
141136
makePage('guides/environment-variables.md'),
142-
makePage('guides/configuring-updates.md'),
143137
makePage('guides/customizing-metro.md'),
144138
makePage('guides/customizing-webpack.md'),
145-
makePage('guides/offline-support.md'),
146139
makePage('guides/progressive-web-apps.md'),
147140
makePage('guides/web-performance.md'),
148141
makePage('guides/delaying-code.md'),
@@ -207,9 +200,6 @@ const general = [
207200
makePage('push-notifications/faq.md'),
208201
]),
209202
]),
210-
makeSection('Classic Services', [
211-
makeGroup('Classic Services', sortAlphabetical(pagesFromDir('classic'))),
212-
]),
213203
makeSection('UI Programming', [
214204
makeGroup('UI Programming', [
215205
makePage('ui-programming/image-background.md'),
@@ -316,15 +306,6 @@ const eas = [
316306
],
317307
{ expanded: true }
318308
),
319-
];
320-
321-
const preview = [
322-
makeSection('Preview', [
323-
makeGroup('Preview', [makePage('preview/introduction.md'), makePage('preview/support.md')]),
324-
]),
325-
];
326-
327-
const featurePreview = [
328309
makeSection(
329310
'EAS Update',
330311
[
@@ -338,9 +319,7 @@ const featurePreview = [
338319
makePage('eas-update/debug-updates.md'),
339320
makePage('eas-update/eas-update-and-eas-cli.md'),
340321
makePage('eas-update/optimize-assets.md'),
341-
makePage('eas-update/custom-updates-server.md'),
342322
makePage('eas-update/migrate-to-eas-update.md'),
343-
makePage('eas-update/bare-react-native.md'),
344323
makePage('eas-update/runtime-versions.md'),
345324
makePage('eas-update/environment-variables.md'),
346325
makePage('eas-update/expo-dev-client.md'),
@@ -352,6 +331,46 @@ const featurePreview = [
352331
),
353332
];
354333

334+
const preview = [
335+
makeSection('Preview', [
336+
makeGroup('Preview', [makePage('preview/introduction.md'), makePage('preview/support.md')]),
337+
]),
338+
];
339+
340+
const archive = [
341+
makeSection('Archive', [makeGroup('Archive', [makePage('archive/index.md')])], {
342+
expanded: true,
343+
}),
344+
makeSection(
345+
'Classic Updates',
346+
[
347+
makeGroup('Classic Updates', [makePage('archive/classic-updates/introduction.md')]),
348+
makeGroup('Guides', [
349+
makePage('archive/classic-updates/configuring-updates.md'),
350+
makePage('archive/classic-updates/preloading-and-caching-assets.md'),
351+
]),
352+
makeGroup('Distribution', [
353+
makePage('archive/classic-updates/release-channels.md'),
354+
makePage('archive/classic-updates/advanced-release-channels.md'),
355+
makePage('archive/classic-updates/hosting-your-app.md'),
356+
makePage('archive/classic-updates/offline-support.md'),
357+
makePage('archive/classic-updates/optimizing-updates.md'),
358+
]),
359+
makeGroup('Workflow', [makePage('archive/classic-updates/publishing.md')]),
360+
makeGroup('Bare Workflow', [makePage('archive/classic-updates/updating-your-app.md')]),
361+
makeGroup('Classic Services', [
362+
makePage('archive/classic-updates/building-standalone-apps.md'),
363+
makePage('archive/classic-updates/turtle-cli.md'),
364+
]),
365+
],
366+
{
367+
expanded: true,
368+
}
369+
),
370+
];
371+
372+
const featurePreview = [];
373+
355374
const reference = VERSIONS.reduce(
356375
(all, version) => ({
357376
...all,
@@ -384,14 +403,14 @@ module.exports = {
384403
general,
385404
eas,
386405
preview,
406+
archive,
387407
featurePreview,
388408
/** @type {any} */
389409
reference: { ...reference, latest: reference[LATEST_VERSION] },
390410
generalDirectories,
391411
startingDirectories,
392412
previewDirectories,
393413
easDirectories,
394-
featurePreviewDirectories,
395414
};
396415

397416
// --- MDX methods ---

0 commit comments

Comments
 (0)