Skip to content

Commit

Permalink
Merge branch 'canary' into unstated
Browse files Browse the repository at this point in the history
  • Loading branch information
samcx authored Dec 10, 2024
2 parents e629d53 + 15d1133 commit df3b24c
Show file tree
Hide file tree
Showing 136 changed files with 1,608 additions and 2,919 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/issue_stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,23 @@ jobs:
name: 'Close stale issues with no reproduction'
with:
repo-token: ${{ secrets.STALE_TOKEN }}
any-of-labels: 'please add a complete reproduction,please simplify reproduction'
close-issue-message: 'This issue has been automatically closed because it received no activity for a month and had no reproduction to investigate. If you think it was closed by accident, please leave a comment. If you are running into a similar issue, please open a new issue with a reproduction. Thank you.'
any-of-labels: 'please add a complete reproduction'
close-issue-message: 'This issue has been automatically closed due to 2 days of inactivity and the avsence of a complete reproduction. If you believe this was done in error, please leave a comment. If you are experiencing a similar issue, consider opening a new issue with a complete reproduction. Thank you.'
days-before-issue-close: 1
days-before-issue-stale: 30
days-before-issue-stale: 2
days-before-pr-close: -1
days-before-pr-stale: -1
exempt-issue-labels: 'blocked,must,should,keep'
operations-per-run: 300 # 1 operation per 100 issues, the rest is to label/comment/close
- uses: actions/stale@v9
id: stale-simple-repro
name: 'Close issues with no simple repro'
with:
repo-token: ${{ secrets.STALE_TOKEN }}
any-of-labels: 'please simplify reproduction'
close-issue-message: 'This issue has been automatically closed due to 14 days of inactivity and the absence of a simple reproduction for investigation. If you believe this was done in error, please leave a comment. If you are experiencing a similar issue, consider opening a new issue with a simple reproduction. Thank you.'
days-before-issue-close: 1
days-before-issue-stale: 14
days-before-pr-close: -1
days-before-pr-stale: -1
exempt-issue-labels: 'blocked,must,should,keep'
Expand All @@ -29,9 +42,9 @@ jobs:
with:
repo-token: ${{ secrets.STALE_TOKEN }}
any-of-labels: 'please verify canary'
close-issue-message: "This issue has been automatically closed because it wasn't verified against next@canary. If you think it was closed by accident, please leave a comment. If you are running into a similar issue, please open a new issue with a reproduction. Thank you."
close-issue-message: 'This issue has been automatically closed due to 14 days of inactivity and the absence of testing against next@canary. If you believe this was done in error, please leave a comment. If you are experiencing a similar issue, consider opening a new issue with a reproduction. Thank you.'
days-before-issue-close: 1
days-before-issue-stale: 30
days-before-issue-stale: 14
days-before-pr-close: -1
days-before-pr-stale: -1
exempt-issue-labels: 'blocked,must,should,keep'
Expand Down
2 changes: 1 addition & 1 deletion examples/with-babel-macros/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&ut
## Note

You'll notice the configuration in `.babelrc` includes the `babel-macros`
plugin, then we can use the `preval.macro` in `pages/index.js` to pre-evaluate
plugin, then we can use the `preval.macro` in `app/page.tsx` to pre-evaluate
code at build-time. `preval.macro` is effectively transforming our code, but
we didn't have to configure it to make that happen!

Expand Down
22 changes: 0 additions & 22 deletions examples/with-ionic-typescript/next.config.js

This file was deleted.

21 changes: 0 additions & 21 deletions examples/with-ionic-typescript/package.json

This file was deleted.

44 changes: 0 additions & 44 deletions examples/with-ionic-typescript/pages/_app.tsx

This file was deleted.

32 changes: 0 additions & 32 deletions examples/with-ionic-typescript/pages/index.tsx

This file was deleted.

4 changes: 0 additions & 4 deletions examples/with-ionic-typescript/public/vercel.svg

This file was deleted.

19 changes: 0 additions & 19 deletions examples/with-ionic-typescript/tsconfig.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage
Expand All @@ -24,6 +28,7 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# Ionic with TypeScript Example

Example app using Next.js with [Ionic](https://ionicframework.com/) and [TypeScript](https://www.typescriptlang.org/). You can learn more about Ionic in the [documentation](https://ionicframework.com/docs).
Example app using Next.js with [Ionic](https://ionicframework.com/). You can learn more about Ionic in the [documentation](https://ionicframework.com/docs).

## Deploy your own

Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example) or preview live with [StackBlitz](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/with-ionic-typescript)
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example) or preview live with [StackBlitz](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/with-ionic)

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-ionic-typescript&project-name=with-ionic-typescript&repository-name=with-ionic-typescript)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-ionic&project-name=with-ionic&repository-name=with-ionic)

## How to use

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:

```bash
npx create-next-app --example with-ionic-typescript with-ionic-typescript-app
npx create-next-app --example with-ionic with-ionic-app
```

```bash
yarn create next-app --example with-ionic-typescript with-ionic-typescript-app
yarn create next-app --example with-ionic with-ionic-app
```

```bash
pnpm create next-app --example with-ionic-typescript with-ionic-typescript-app
pnpm create next-app --example with-ionic with-ionic-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
35 changes: 35 additions & 0 deletions examples/with-ionic/_components/Card.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import Image from "next/image";

type CardProps = {
imageSrc: string;
title: string;
subtitle: string;
content: string;
};

export default function Card({
imageSrc,
title,
subtitle,
content,
}: CardProps) {
return (
<ion-card>
<Image
src={imageSrc}
alt={`Image of ${title}`}
width={320}
height={320}
priority={true}
/>
<ion-card-header>
<ion-card-subtitle>{subtitle}</ion-card-subtitle>
<ion-card-title>{title}</ion-card-title>
</ion-card-header>
<ion-card-content>
<ion-icon name="pin" slot="start"></ion-icon>
{content}
</ion-card-content>
</ion-card>
);
}
30 changes: 30 additions & 0 deletions examples/with-ionic/_components/IonicLayout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"use client";

import React, { useEffect } from "react";
import { defineCustomElements as ionDefineCustomElements } from "@ionic/core/loader";

export default function IonicLayout({
children,
}: {
children: React.ReactNode;
}) {
useEffect(() => {
ionDefineCustomElements(window);
}, []);

return (
<ion-app>
<ion-header translucent>
<ion-toolbar>
<ion-title>Next.js with Ionic</ion-title>
</ion-toolbar>
</ion-header>
<ion-content fullscreen>{children}</ion-content>
<ion-footer>
<ion-toolbar>
<ion-title>Footer</ion-title>
</ion-toolbar>
</ion-footer>
</ion-app>
);
}
File renamed without changes.
22 changes: 22 additions & 0 deletions examples/with-ionic/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import "@ionic/core/css/core.css";
import "@ionic/core/css/normalize.css";
import "@ionic/core/css/structure.css";
import "@ionic/core/css/typography.css";
import "@ionic/core/css/padding.css";
import "@ionic/core/css/float-elements.css";
import "@ionic/core/css/text-alignment.css";
import "@ionic/core/css/text-transformation.css";
import "@ionic/core/css/flex-utils.css";
import "@ionic/core/css/display.css";

export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en">
<body>{children}</body>
</html>
);
}
31 changes: 31 additions & 0 deletions examples/with-ionic/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import IonicLayout from "@/_components/IonicLayout";
import CardComponent from "@/_components/Card";

export default function Home() {
const destinations = new Array(8).fill({
imageSrc: "/img/cat.jpg",
title: "Madison, WI",
subtitle: "Destination",
content:
"Keep close to Nature's heart... and break clear away, once in awhile, and climb a mountain or spend a week in the woods. Wash your spirit clean.",
});

return (
<IonicLayout>
<ion-grid>
<ion-row>
{destinations.map((destination, i) => (
<ion-col key={i} size="3">
<CardComponent
imageSrc={destination.imageSrc}
title={destination.title}
subtitle={destination.subtitle}
content={destination.content}
/>
</ion-col>
))}
</ion-row>
</ion-grid>
</IonicLayout>
);
}
File renamed without changes.
7 changes: 7 additions & 0 deletions examples/with-ionic/next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
/* config options here */
};

export default nextConfig;
Loading

0 comments on commit df3b24c

Please sign in to comment.