Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 64 additions & 17 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,86 @@ name: Validate Docs

on: [pull_request]

# A new push supersedes the run before it.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
NODE_VERSION: 24

jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Build processes work differently across operating systems, so the
# checks run on each one to make sure anyone can contribute to the
# docs.
os: [windows-latest, macOS-latest]
# Needs no dependencies, so it reports in seconds rather than queueing behind
# npm ci and lint.
admonitions:
name: Check Admonitions
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# The check diffs against the pull request base, so it needs history.
fetch-depth: 0
- uses: ./.github/workflows/actions/check-admonitions

# These produce the same verdict on any operating system, so they run once.
checks:
name: Checks
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: ⚙️ Use Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: 🕸️ Install Dependencies
run: npm ci
- name: 🖌️ Lint
run: npm run lint
- name: Test
run: npm run test
- name: 🧩 Typecheck
run: npm run typecheck
- name: 🔤 Spell Check
run: npm run spellcheck
- uses: ./.github/workflows/actions/check-admonitions
- uses: ./.github/workflows/actions/check-translations
# Lint and spell check changes should be pushed
# to the branch before the branch is merge eligible.
#
# The translation keys check should not produce any changes.

cross-platform:
name: Cross-platform on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Prettier rewrites line endings, so Lint is the one check whose
# verdict depends on the operating system.
os: [windows-latest, macOS-latest]

steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: ⚙️ Use Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: 🕸️ Install Dependencies
run: npm ci
- name: 🖌️ Lint
run: npm run lint
# Lint changes should be pushed to the branch before the branch is merge
# eligible.
- name: 🔍 Check Diff
run: git diff --exit-code
shell: bash

verify:
# The one required check on main and the feature branches, so the jobs
# above can change without touching the protection rules. Renaming this
# blocks merges until those rules are updated to match.
name: Verify
if: ${{ always() }}
needs: [admonitions, checks, cross-platform]
runs-on: ubuntu-latest

steps:
- name: Check job status
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
run: exit 1
7 changes: 2 additions & 5 deletions .github/workflows/actions/check-admonitions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@ runs:
# Only the files the pull request touches are checked, so an existing
# page is never anyone else's problem to fix.
#
# The event payload has no file list, so the changed files come from a
# diff. The checkout is shallow and the base commit is fetched here
# rather than through `fetch-depth` on the checkout, which would pull
# the full history for every step in the job just to serve this one.
# The caller has to check out with `fetch-depth: 0`, which a composite
# action cannot require for itself.
- name: 🔎 Check Admonitions
shell: bash
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
CHANGED_FILES: ${{ runner.temp }}/changed-files.txt
run: |
git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA"
git diff --name-only --diff-filter=ACMR "$BASE_SHA" HEAD > "$CHANGED_FILES"
node <<'JS'
const { readFileSync } = require('fs');
Expand Down
16 changes: 8 additions & 8 deletions docs/angular/add-to-existing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import DocsCards from '@components/global/DocsCards';
/>
</head>

This guide covers how to add Ionic Angular to an existing Angular project. If you're looking to start a new project from scratch, check out the [Ionic Angular Quickstart](/docs/angular/quickstart.mdx) guide. For an overview of how Ionic Angular works with Angular, including version support and tooling, check out the [Ionic Angular Overview](/docs/angular/overview.mdx).
This guide covers how to add Ionic Angular to an existing Angular project. If you're looking to start a new project from scratch, check out the [Ionic Angular Quickstart](/angular/quickstart.mdx) guide. For an overview of how Ionic Angular works with Angular, including version support and tooling, check out the [Ionic Angular Overview](/angular/overview.mdx).

:::tip

Expand Down Expand Up @@ -76,7 +76,7 @@ Replace the existing `styles` array in `angular.json` with the following:

:::info

While `core.css` is required, `normalize.css`, `structure.css`, and `typography.css` are recommended but not required. They normalize cross-browser differences, ensure proper scrolling behavior, and provide consistent typography and form styling. Without them, you may need to handle these concerns yourself. For more details, refer to [Global Stylesheets](/docs/layout/global-stylesheets.mdx).
While `core.css` is required, `normalize.css`, `structure.css`, and `typography.css` are recommended but not required. They normalize cross-browser differences, ensure proper scrolling behavior, and provide consistent typography and form styling. Without them, you may need to handle these concerns yourself. For more details, refer to [Global Stylesheets](/layout/global-stylesheets.mdx).

:::

Expand All @@ -96,7 +96,7 @@ export const appConfig: ApplicationConfig = {
};
```

This reflects the Angular 21 and 22 scaffold, which is zoneless by default. If your existing app is on Angular 18 through 20, it still has `provideZoneChangeDetection({ eventCoalescing: true })`; keep that provider and add `provideIonicAngular({})` alongside it. Refer to [Zoneless Change Detection](/docs/angular/zoneless.mdx) for details.
This reflects the Angular 21 and 22 scaffold, which is zoneless by default. If your existing app is on Angular 18 through 20, it still has `provideZoneChangeDetection({ eventCoalescing: true })`; keep that provider and add `provideIonicAngular({})` alongside it. Refer to [Zoneless Change Detection](/angular/zoneless.mdx) for details.

## Using Individual Components

Expand All @@ -123,7 +123,7 @@ import { IonButton, IonDatetime } from '@ionic/angular';
export class App {}
```

Visit the [components](/docs/components.mdx) page for all of the available Ionic components.
Visit the [components](/components.mdx) page for all of the available Ionic components.

## Using Ionic Pages

Expand Down Expand Up @@ -172,7 +172,7 @@ Replace the existing `styles` array in `angular.json` with the following:
]
```

These stylesheets set up the overall page structure and provide [CSS utilities](/docs/layout/css-utilities.mdx) for faster development. Some stylesheets are optional. For details on which stylesheets are required, check out [Global Stylesheets](/docs/layout/global-stylesheets.mdx).
These stylesheets set up the overall page structure and provide [CSS utilities](/layout/css-utilities.mdx) for faster development. Some stylesheets are optional. For details on which stylesheets are required, check out [Global Stylesheets](/layout/global-stylesheets.mdx).

#### 2. Set up Theming

Expand All @@ -191,7 +191,7 @@ Create a `src/theme/variables.css` file with the following content:
@import '@ionic/angular/css/palettes/dark.system.css';
```

This file enables [dark mode support](/docs/theming/dark-mode.mdx) for your Ionic app when the system is set to prefer a dark appearance. You can customize the theming behavior by uncommenting different dark palette imports or adding custom CSS variables.
This file enables [dark mode support](/theming/dark-mode.mdx) for your Ionic app when the system is set to prefer a dark appearance. You can customize the theming behavior by uncommenting different dark palette imports or adding custom CSS variables.

#### 3. Update the App Component

Expand Down Expand Up @@ -326,11 +326,11 @@ Now that you have Ionic Angular integrated into your project, check out:
<p>Discover how to handle routing and navigation in Ionic Angular apps using the Angular Router.</p>
</DocsCard>

<DocsCard header="Components" href="/docs/components" icon="/icons/guide-components-icon.png">
<DocsCard header="Components" href="/components" icon="/icons/guide-components-icon.png">
<p>Explore Ionic's rich library of UI components for building beautiful apps.</p>
</DocsCard>

<DocsCard header="Theming" href="/docs/theming/basics" icon="/icons/guide-theming-icon.png">
<DocsCard header="Theming" href="/theming/basics" icon="/icons/guide-theming-icon.png">
<p>Learn how to customize the look and feel of your app with Ionic's powerful theming system.</p>
</DocsCard>

Expand Down
2 changes: 1 addition & 1 deletion docs/angular/lifecycle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ If your pages keep state in plain fields rather than signals, the component host

On **Angular 18 through 21** this only affects you if you set `OnPush` on those components yourself, because a component that does not declare a strategy is eager.

**Angular 22** makes `OnPush` the default for components that do not declare one, so refer to [Change detection on Angular 22](/docs/angular/zoneless.mdx#change-detection-on-angular-22) for what your app shell has to declare.
**Angular 22** makes `OnPush` the default for components that do not declare one, so refer to [Change detection on Angular 22](/angular/zoneless.mdx#change-detection-on-angular-22) for what your app shell has to declare.

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/angular/navigation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ The application history in this example has the following path:

`Accessibility` --> `VoiceOver` --> `Speech`

When we press the back button, we follow that same routing path except in reverse. Linear routing is helpful in that it allows for simple and predictable routing behaviors. It also means we can use router Angular Router APIs such as [LocationStrategy.historyGo()](#navigating-using-locationstrategy).
When we press the back button, we follow that same routing path except in reverse. Linear routing is helpful in that it allows for simple and predictable routing behaviors. It also means we can use router Angular Router APIs such as [LocationStrategy.historyGo()](#navigating-using-locationstrategyhistorygo).

The downside of linear routing is that it does not allow for complex user experiences such as tab views. This is where non-linear routing comes into play.

Expand Down
2 changes: 1 addition & 1 deletion docs/angular/your-first-app/2-taking-photos.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sidebar_label: カメラ撮影
/>
</head>

Now for the fun part - adding the ability to take photos with the device’s camera using the Capacitor [Camera API](../../native/camera.mdx). We’ll begin with building it for the web, then make some small tweaks to make it work on mobile (iOS and Android).
Now for the fun part - adding the ability to take photos with the device’s camera using the Capacitor [Camera API](/native/camera.mdx). We’ll begin with building it for the web, then make some small tweaks to make it work on mobile (iOS and Android).

## Photo Service

Expand Down
2 changes: 1 addition & 1 deletion docs/angular/your-first-app/3-saving-photos.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export interface UserPhoto {
}
```

We'll use the Capacitor [Filesystem API](../../native/filesystem.mdx) to save the photo. First, convert the photo to base64 format.
We'll use the Capacitor [Filesystem API](/native/filesystem.mdx) to save the photo. First, convert the photo to base64 format.

Then, pass the data to the Filesystem's `writeFile` method. Recall that we display photos by setting the image's source path (`src`) to the `webviewPath` property. So, set the `webviewPath` and return the new `Photo` object.

Expand Down
2 changes: 1 addition & 1 deletion docs/angular/your-first-app/4-loading-photos.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sidebar_label: 写真の読み込み

We’ve implemented photo taking and saving to the filesystem. There’s one last piece of functionality missing: the photos are stored in the filesystem, but we need a way to save pointers to each file so that they can be displayed again in the photo gallery.

Fortunately, this is easy: we’ll leverage the Capacitor [Preferences API](../../native/preferences.mdx) to store our array of Photos in a key-value store.
Fortunately, this is easy: we’ll leverage the Capacitor [Preferences API](/native/preferences.mdx) to store our array of Photos in a key-value store.

## Preferences API

Expand Down
4 changes: 2 additions & 2 deletions docs/angular/zoneless.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ You do not need to change these. Angular schedules change detection for them in

:::note[Angular 22]

Angular 22 also makes `OnPush` the default change detection strategy. Under `OnPush`, synchronous state set as a plain field (including in the lifecycle hooks above) no longer re-renders on its own, even though Ionic notifies Angular. Signals still update the view. Refer to [Change detection on Angular 22](#change-detection-on-angular-22) for what this means for your app shell, and to the [OnPush Change Detection section of the Ionic 9 upgrade guide](/docs/updating/9-0.mdx#onpush-change-detection-on-angular-22) for the migration steps.
Angular 22 also makes `OnPush` the default change detection strategy. Under `OnPush`, synchronous state set as a plain field (including in the lifecycle hooks above) no longer re-renders on its own, even though Ionic notifies Angular. Signals still update the view. Refer to [Change detection on Angular 22](#change-detection-on-angular-22) for what this means for your app shell, and to the [OnPush Change Detection section of the Ionic 9 upgrade guide](/updating/9-0.mdx#onpush-change-detection-on-angular-22) for the migration steps.

:::

Expand Down Expand Up @@ -174,4 +174,4 @@ Hosting an `ion-nav` is fine either way, because its pages are attached as root

## Staying on Zone.js

If you are not ready to adopt zoneless change detection, you can opt back into Zone.js with `provideZoneChangeDetection()`. Refer to the [Keeping Zone.js section of the Ionic 9 upgrade guide](/docs/updating/9-0.mdx#keeping-zonejs) for the exact configuration.
If you are not ready to adopt zoneless change detection, you can opt back into Zone.js with `provideZoneChangeDetection()`. Refer to the [Keeping Zone.js section of the Ionic 9 upgrade guide](/updating/9-0.mdx#keeping-zonejs) for the exact configuration.
2 changes: 1 addition & 1 deletion docs/api/input-password-toggle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The InputPasswordToggle component is a companion component to [Input](./input).

:::info

InputPasswordToggle must be used with an [Input](./input) that has its [`type`](./input/#type) property set to either `'text'` or `'password'`.
InputPasswordToggle must be used with an [Input](./input) that has its [`type`](./input.mdx#prop-type) property set to either `'text'` or `'password'`.

Using any other `type` will cause a warning to be logged.

Expand Down
Loading