Skip to content

Commit d6bcdfb

Browse files
committed
Group migration and Cordova under Other in guide navigation
1 parent a1c3b43 commit d6bcdfb

7 files changed

Lines changed: 27 additions & 31 deletions

File tree

‎projects/docs/src/app/app.html‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,15 @@ <h2 id="task-navigation-title">{{ guideCopy.guideTitle }}</h2>
138138
</section>
139139
@if (migrationGuide; as chapter) {
140140
<section aria-labelledby="migration-navigation-title">
141-
<h2 id="migration-navigation-title">{{ guideCopy.migrationGroup }}</h2>
141+
<h2 id="migration-navigation-title">{{ guideCopy.otherGuides }}</h2>
142142
<a
143143
[href]="guideHref(chapter.path)"
144144
[attr.aria-current]="isGuide(chapter.path) ? 'page' : null"
145145
>{{ chapter.title }}</a
146146
>
147+
<a [href]="guideHref('/projects/cordova-native-ui/docs/readme')">{{
148+
guideCopy.cordovaSetup
149+
}}</a>
147150
</section>
148151
}
149152
</nav>

‎projects/docs/src/app/docs/guide-article.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export class GuideArticleComponent {
7171
this.kind() === 'setup'
7272
? this.#copy.setupGroup
7373
: this.kind() === 'migration'
74-
? this.#copy.migrationGroup
74+
? this.#copy.otherGuides
7575
: this.#copy.guideTitle,
7676
);
7777
protected readonly contentsLabel = $localize`:@@onThisPage:On this page`;

‎projects/docs/src/app/docs/guide-page.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe('Task guides', () => {
3737
expect(page.querySelector('h1')?.textContent).toBe(chapter.title[code]);
3838
const copy = guideCopyForLocale(code);
3939
expect(page.querySelector('.guide-kind')?.textContent?.trim()).toBe(
40-
chapter.kind === 'migration' ? copy.migrationGroup : copy.guideTitle,
40+
chapter.kind === 'migration' ? copy.otherGuides : copy.guideTitle,
4141
);
4242
const steps = page.querySelectorAll('article h2[id]');
4343
expect(steps.length).toBeGreaterThanOrEqual(4);

‎projects/docs/src/app/docs/plugin-index.css‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@
3535
.guide-chapter a { color: var(--rd-ink); text-decoration: none; }
3636
.guide-chapter a:hover { color: var(--rd-accent); text-decoration: underline; }
3737
.guide-chapter p, .package-reference-intro p, .chapter-heading > p { color: var(--rd-muted); font-size: .95rem; line-height: 1.8; }
38-
.package-reference-intro h2, .migration-guide h2 { margin: 0; font-size: clamp(1.5rem, 3cqi, 2rem); font-weight: 650; letter-spacing: -.03em; }
38+
.package-reference-intro h2 { margin: 0; font-size: clamp(1.5rem, 3cqi, 2rem); font-weight: 650; letter-spacing: -.03em; }
3939
.package-reference-intro { padding-top: 2rem; border-top: 1px solid var(--rd-line); scroll-margin-top: 90px; }
40-
.migration-guide { padding-block: .75rem 2.5rem; }
4140
@media (max-width: 639px) { .guide-chapters { grid-template-columns: 1fr; } }
4241

4342

‎projects/docs/src/app/docs/plugin-index.ts‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ import { SeoService } from './seo.service';
7878
<a [href]="guideHref('/projects/ionic-theme-md3/docs/setup')">MD3</a></div>
7979
<a [href]="guideHref('/projects/capacitor-native-ui/docs/ionic-vertical-bars')">{{ copy.existingTheme }}</a>
8080
<a [href]="guideHref('/projects/capacitor-native-ui/docs/framework-independent')">{{ copy.htmlSetup }}</a>
81-
<a [href]="guideHref('/projects/cordova-native-ui/docs/readme')">{{ copy.cordovaSetup }}</a>
8281
</nav>
8382
</section>
8483
<header class="chapter-heading"><h2>{{ copy.guideTitle }}</h2></header>
@@ -90,13 +89,7 @@ import { SeoService } from './seo.service';
9089
</section>
9190
}
9291
</section>
93-
@if (migrationGuide; as chapter) {
94-
<section class="guide-chapter migration-guide" aria-labelledby="migration-guide-title">
95-
<h2 id="migration-guide-title">{{ copy.migrationGroup }}</h2>
96-
<p>{{ copy.migrationReading }}</p>
97-
<a [href]="guideHref(chapter.path)">{{ chapter.title }} →</a>
98-
</section>
99-
}
92+
10093
<section id="packages" class="package-reference-intro">
10194
<h2>{{ copy.reference }}</h2>
10295
<p>{{ copy.referenceDescription }}</p>
@@ -151,7 +144,6 @@ export class PluginIndexComponent implements OnInit {
151144
protected readonly copy = guideCopyForLocale(this.#locale);
152145
protected readonly chapters = guideChaptersForLocale(this.#locale);
153146
protected readonly taskGuides = this.chapters.filter((chapter) => chapter.kind === 'task');
154-
protected readonly migrationGuide = this.chapters.find((chapter) => chapter.kind === 'migration');
155147
protected guideHref(path: string): string { return localizedPublicPath(this.#locale, path); }
156148
protected readonly standardSetupLabel = STANDARD_SETUP_LABELS[resolveDocsLocale(this.#locale)];
157149
protected readonly standardSetupHref = localizedPublicPath(this.#locale, STANDARD_SETUP_PATH);

‎scripts/build-output.test.ts‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,6 @@ test('the portal owns combined setup while plugin guides keep feature boundaries
499499
'ionic-theme-md3/docs/setup',
500500
'capacitor-native-ui/docs/ionic-vertical-bars',
501501
'capacitor-native-ui/docs/framework-independent',
502-
'cordova-native-ui/docs/readme',
503502
])
504503
assert.ok(selector.querySelector(`a[href="${prefix}/projects/${path}"]`), `${code}: ${path}`);
505504
assert.ok(!selector.querySelector(`a[href="${prefix}/guides/appearance"]`));
@@ -545,7 +544,16 @@ test('shared guides lead from the complete setup to localized package details',
545544
);
546545
}
547546
assert.equal(home.querySelectorAll('.guide-chapters a[href$="/migration"]').length, 0);
548-
assert.ok(home.querySelector('.migration-guide a[href$="/migration"]'));
547+
assert.ok(
548+
home.querySelector(
549+
`section[aria-labelledby="migration-navigation-title"] a[href="${prefix}/projects/cordova-native-ui/docs/readme"]`,
550+
),
551+
);
552+
assert.ok(
553+
home.querySelector(
554+
'section[aria-labelledby="migration-navigation-title"] a[href$="/migration"]',
555+
),
556+
);
549557
assert.ok(home.querySelector('#installation-navigation-title'));
550558
assert.ok(home.querySelector('#task-navigation-title'));
551559
assert.ok(home.querySelector('#migration-navigation-title'));

‎shared/guide-navigation.ts‎

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,11 @@ export const GUIDE_COPY = {
140140
fr: 'Installation',
141141
de: 'Einrichtung',
142142
},
143-
migrationGroup: {
144-
en: 'Update an existing integration',
145-
ja: '移行・更新',
146-
fr: 'Mettre à jour une intégration',
147-
de: 'Eine bestehende Integration aktualisieren',
148-
},
149-
migrationReading: {
150-
en: 'For an existing integration. Follow the changes that apply to the packages and features your app already uses.',
151-
ja: 'テーマだけを使うアプリは、テーマの更新とWeb画面の確認が対象です。ネイティブ連携を使う場合は、その起動処理と端末での動作も確認します。',
152-
fr: 'Pour une intégration existante. Appliquez les changements correspondant aux paquets et fonctions déjà utilisés.',
153-
de: 'Für eine bestehende Integration. Führen Sie die Änderungen für die bereits genutzten Pakete und Funktionen aus.',
143+
otherGuides: {
144+
en: 'Other',
145+
ja: 'その他',
146+
fr: 'Autres',
147+
de: 'Sonstiges',
154148
},
155149
standardAudience: {
156150
en: 'For Ionic 9 + Capacitor 8',
@@ -273,10 +267,10 @@ export const GUIDE_COPY = {
273267
de: 'Capacitor + HTML ohne Ionic',
274268
},
275269
cordovaSetup: {
276-
en: 'Cordova integration',
277-
ja: 'Cordovaでの導入',
278-
fr: 'Intégration Cordova',
279-
de: 'Cordova-Integration',
270+
en: 'Use in a Cordova app',
271+
ja: 'Cordovaアプリで使う',
272+
fr: 'Utiliser dans une application Cordova',
273+
de: 'In einer Cordova-App verwenden',
280274
},
281275
iosPreview: {
282276
en: 'iOS 27 theme: Library screen',

0 commit comments

Comments
 (0)