Commit graph

2436 commits

Author SHA1 Message Date
Dongho
d6fb8337ba
feat: add correct type to with-styled-coponents (#37816)
There's a missing type in with-styled-coponents example's _document.tsx file



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-06-19 16:58:08 +00:00
Max Proske
1ccf894501
Convert amp example to TypeScript (#37744)
Converted AMP example over to TypeScript to match the Contribution guidelines, updated all dependencies, and made some necessary changes to allow AMP apps to build in TypeScript.

I added an additional .d.ts file, and referenced it in the tsconfig.json include array, as per the [Next.js docs](https://nextjs.org/docs/basic-features/typescript#existing-projects). These additional types are required to allow lowercase AMP elements to be a property on JSX.IntrinsicElements.

Fixes: 
> Property 'amp-img' does not exist on type 'JSX.IntrinsicElements'.ts

I also replaced all occurrences of styled JSX with [@ijjk's workaround](https://github.com/vercel/next.js/issues/7584#issuecomment-503376412) to get styles in the head at build time for AMP-only pages, hybrid AMP pages, and normal pages (non-AMP). 

I tried using the useAmp hook first with multiple `<style jsx>` like this [Next.js discussion](https://github.com/vercel/next.js/discussions/16755), however AMP expects a [single `<style amp-custom>` tag in the head](https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml/#stylesheets).

Fixes: 
> The parent tag of tag 'style amp-custom' is 'body', but it can only be 'head'

## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-06-18 17:18:21 +00:00
Qiushi Pan
455b74fe54
fix: markdown format for the blog-starter example (#37792)
## Documentation / Examples

The markdown format for blog-starter example was broken, so fixed it.


- [x] Make sure the linting passes by running `pnpm lint`
  It failed, without my changes.
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-06-17 17:06:22 +00:00
dfelsie
e4b1fb0793
Update Chakra-UI dependencies for React 18 (#37772)
Title self-explanatory: the package.json inside of the with-chakra-ui example template has been updated to newer versions


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-06-17 03:21:06 +00:00
Frankie
ea89854e32
Update Ghost CMS Example: Accept-Version Header API requirement, typo (#37737)
* Update next.config.js

Fix typo on next config

* Update api.js

Update Ghost's content-api version `Accept-Version: v{major}.{minor}` requirement

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-06-15 21:21:31 -05:00
Max Proske
007d186b78
Convert hello-world example to TypeScript (#37706)
TypeScript is being leveraged for new examples going forward, so I'm converting this example over. 😂

## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-06-15 11:33:35 +00:00
Max Proske
78809a3d68
Add with-docker-compose example (#32668)
`with-docker-compose` contains everything needed to get Next.js up and running with Docker Compose.

This example aims to provide an easy-to-use, Next.js app development and production environment, **all without Node.js being installed** on the host machine. This ensures a consistent development environment across Windows, MacOS, and Linux teams.

I was inspired to create this, because the existing [with-docker](https://github.com/vercel/next.js/tree/canary/examples/with-docker) example only uses Docker to build the final production artifacts, not provide a development environment. Docker Compose easily syncs changes with containers for Hot Reloading, parallel builds, and networking, making it a powerful and consistent development tool.

Developers can **easily extend this example** by modifying the YAML files to include Nginx, Postgres, and other Docker images. 

This example takes advantage of Docker multistage builds combined with the Next 12.1 [Output Standalone](https://nextjs.org/docs/advanced-features/output-file-tracing#automatically-copying-traced-files-experimental) feature, to create up to **80% smaller apps** (Approximately 110 MB compared to 1 GB with create-next-app). I also included an example without multistage builds, for developers who don't want to get into the weeds.

I have been tweaking this Docker Compose setup over 3 years of real world use, but please let me know if anything can be improved.
2022-06-14 11:13:55 +00:00
Max Proske
3a22c4c554
Convert active-class-name example to TypeScript (#37676)
The Contributing guidelines say TypeScript should be leveraged for new examples, so I thought I'd convert this example over. 

I also:
- Upgraded all dependencies
- Replaced the `prop-types` package with TypeScript types

## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-06-14 08:49:09 +00:00
Thuy Doan
748cc51c34
Update with-mux-video to use latest upchunk and replace video player with mux-player-react (#37621)
* Update upchunk to latest (2.3.1).

* Add mux-player package to package.json

* WIP: Make VideoPlayer return mux-player

* Remove unused code from prev video player

* Use mux-player-react directly

* Fix import line for mux-player-react

* chore: fix lint issues
2022-06-13 10:06:07 -05:00
Adam Sobotka
89b961e191
Request library required by setup (#37658)
In my last PR I removed the request library as it is obsolete and the application does not use it. The database setup utility does though, so I am reverting this change.  


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-06-13 11:00:50 +00:00
Adam Sobotka
31c8b97a45
Update with-faunadb dependencies (#37650)
This is just a bump of tech stack used in the example and small rewrite of swr functionality.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ x ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-06-13 02:57:56 +00:00
You Nguyen
2daa4117c6
Bump version tailwindcss example to 3.1 (#37633) 2022-06-11 23:53:30 +00:00
Alabhya Jindal
30150e449c
Changed _app.js to a functional component (#37635)
Changed the class component to a functional component of the _app.js file. This is for the Context API example.
2022-06-11 23:47:23 +00:00
Joseph
085ee96577
Fix with mux video example (#37434)
* fix: On error upchunk dispatches an object

* chore: Typo on contribution guide, `unverfied`

* Update contributing.md

Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-06-10 19:50:28 -05:00
Bel
2acac8ad8f
Update for CMS Wordpress Example. (#37402)
This PR updates cms-wordpress example:
- updated dependencies
- image domain handling
- new image domains
- error handling for lack of env variables
- minor code updates (isr)

Demo here: https://example-cms-wordpress.vercel.app/ -> should replace https://next-blog-wordpress.vercel.app/ that's using a buggy wpengine instance.

Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-06-03 06:34:29 +00:00
Dany Gagnon
5384171bb6
Remove extra prettier config from tailwindcss example (#37351)
Prettier should be a dev dependency.

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-06-01 00:50:47 +00:00
ArianHamdi
0d2121db1f
change map function to forEach function (#37284)
close #37283
2022-05-29 20:23:04 +00:00
Lee Robinson
c4fdfcb7f1
Update GitHub Pages deployment example. (#37282)
Verified it's working: https://leerob.github.io/gh-pages-test/
2022-05-29 20:12:37 +00:00
Cozy Indigo
c7ab218db2
Updated graphql API to support v1.7.2 (#35896)
## Documentation / Examples
- [X] Make sure the linting passes by running `yarn lint`
Graphql API has updated with use of nodes, this bugfix updates these specifications.


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-29 02:49:59 +00:00
Saullo Almeida
69cc9b3633
chore: update with-tailwindcss example to TypeScript (#37208)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-29 01:54:04 +00:00
Imad Atyat-Allah
3c295f0017
Fix with-contentlayer example build error (#37257)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-05-27 22:11:50 +00:00
Steven
57dcc9d329
Update pnpm create next-app for latest pnpm 6 and 7 (#37254)
This command changed in pnpm [6.32.13](https://github.com/pnpm/pnpm/releases/tag/v6.32.13) and [7.1.1](https://github.com/pnpm/pnpm/releases/tag/v7.1.1) so lets update it since its been a few weeks and we can expect pnpm users to update more regularly than npm users.

- Fixes https://github.com/vercel/next.js/pull/37240 
- Fixes https://github.com/vercel/next.js/pull/37045
- Fixes https://github.com/vercel/next.js/pull/37032
- Fixes https://github.com/vercel/next.js/pull/36602
- Fixes https://github.com/vercel/next.js/pull/36496
2022-05-27 21:21:40 +00:00
Tom
3e178bb801
add pnpm link to docs (#37221)
## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: Steven <steven@ceriously.com>
2022-05-27 15:46:38 -04:00
Balázs Orbán
7ac7ae62b0
chore: simplify with-styled-components (#37237)
Fixes https://github.com/vercel/next.js/issues/37230

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-05-27 15:27:35 +00:00
Tom Marshall
6a5bdb5d80
Update cms-kontent example to action PR feedback (#37206)
* Updates the `cms-kontent` example `Image` component to implement the
  suggested improvements from @styfle in #37188.
* Simplifies the Kontent loader host checking.
* Reduces the default image quality to from `100` to `75`.
* Add `tslib` dependency to fix `Module not found: Can't resolve 'tslib'`
  error when importing `transformImageUrl` in the `Image` component.
  It looks like this might be a bug in v11 of the Kontent Delivery SDK,
  as it appears `tslib` needs to be included as dependency, rather than
  dev dependency. I missed this originally as the example runs fine in
  the Next repo as the root `yarn.lock` has `tslib`. It's only when the
  example is used via `yarn create next-app` that the issue occurs. We
  can likely remove this in future alongside an upgrade to the SDK
  package once this issue has been fixed and released there.

https://github.com/vercel/next.js/pull/37188
2022-05-26 10:29:16 -05:00
Tom Marshall
82a9d21809
Fix cms-kontent example Next/Image domain error (#37188)
* Fixes the following error in the `cms-kontent` example by implementing
  an `Image` component to wrap `Next/Image` with a custom loader.

```
Invalid src prop ... hostname "assets-eu-01.kc-usercontent.com" is not configured under images in your `next.config.js`
```

* This error is affecting both the `pages/index.js` and
  `pages/posts/[slug].js` routes.
* Uses a custom loader rather than adding the Kontent asset domains to
  `next.config.js` as we can transform the images using the Kontent
  Delivery API directly rather than delegating this to the Next app web
  server.

Ref:
* https://nextjs.org/docs/messages/next-image-unconfigured-host
* https://nextjs.org/docs/basic-features/image-optimization
* https://meeg.dev/blog/using-the-next-image-component-with-kentico-kontent-assets
* b7c9ef588c/components/Image.js
* https://kontent.ai/learn/reference/image-transformation/
2022-05-25 10:40:18 -05:00
Tom Marshall
d9b6d99625
Update cms-kontent example SDK package to v11 (#37187)
* Updates the Kontent Delivery SDK from v9 to v11.
* Updates the `lib/api.js` code that utilises the SDK accordingly.
* Removes `rxjs` as this is no longer a dependency of the Kontent
  Delivery SDK in v11.
* Updates other packages to the latest versions, including `react`.

Ref:
* https://kontent.ai/blog/news-in-javascript-sdks/

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-05-25 15:36:40 +00:00
Charly POLY
565a2fafac
refactor(examples/with-typescript-graphql): use codegen TypedDocumentNode and GraphQL Yoga for better DX and smaller bundle size (#36240)
Improve the Next.js with TypeScript + GraphQL example:

- [x] use GraphQL Code Generator instead of `graphql-let`: more widespread tool and smaller bundle size (types only generation vs code generation)
- [x] use GraphQL Yoga instead of Apollo Server Micro: for lighter bundle size as [stated here](https://github.com/vercel/next.js/pull/36155)
- [x] introduces GraphQL Code Generator on the API side for Resolvers typing

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-23 16:58:27 +00:00
Charly POLY
874957e767
feat(examples): refactor api-routes-graphql to GraphQL Yoga (#36155)
GraphQL Yoga provides a more extensible experience ([Envelop plugins](https://envelop.dev/)) and lighter bundle than the previously showcased `apollo-server-micro` ([64.5kB](https://bundlephobia.com/package/@graphql-yoga/node@2.2.1) vs [196.2kB](https://bundlephobia.com/package/apollo-server-micro@3.6.7) - min & GZiped)

Similar to Next.js, GraphQL Yoga comes with strong defaults and out-of-the-box support for modern GraphQL features (File uploads, subscriptions, and more).

Strong of many years of existence and a large community, GraphQL Yoga 2.0 comes with Next.js support with no additional package or configuration 📦 

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-23 16:27:41 +00:00
Charly POLY
cf0158ce8d
feat(examples): build a GraphQL Gateway with GraphQL Mesh and Next.js API routes (#36439)
* feat(examples): GraphQL Mesh Gateway example

* doc(examples/with-graphql-gateway): README

* fix(examples/with-graphql-gateway): ignore `.mesh/`

* Apply suggestions from code review

* lint-fix

Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-05-23 11:02:21 -05:00
Kamil Ogórek
241c510e5b
docs(with-sentry): Add note regarding replacing wizardcopy.js config files (#37039) 2022-05-22 21:55:12 -05:00
Herman
25a4c00559
[EXAMPLES] fix apollo client cache hydration (#27799)
Current implementation causes bugs when navigating between SSG,SSR and 
Client Side pages as cache gets overwritten.

Reusing more appropriate implementation used in example 
api-routes-apollo-server-and-client-auth introduced with commit 
4bbdd09097
2022-05-22 21:47:25 -05:00
Fabien Le Frapper
e04d293da3
Use apollo onError in with-apollo example (#25051)
Use Apollo onError in order to flag GraphQL errors in the next.js server logs in the with-apollo example
https://www.apollographql.com/docs/react/api/link/apollo-link-error/

## Documentation / Examples

- [x] Make sure the linting passes

~⚠️ I lazily created this PR from Github directly as I don't have a local build of next.js on my current machine. 
If ever linting does not pass, I will update this later today (sorry for the noise). 
EDIT: it does not, I will update this PR shortly.~
2022-05-22 23:55:56 +00:00
Woochul Lee
f467bf2e3a
Fix gh-pages example for windows user (#35169)
Windows users cannot use the `rm` and `touch` commands. So I replaced it with `rimraf` and `touch` package.

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-22 21:16:15 +00:00
Rubens Armôa Lopes
9ceccbcf82
docs: svg as component example leveraging swc instead of babeljs (#36410)
## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-22 21:01:16 +00:00
Imad Atyat-Allah
99b017e5cb
example: Added with-contentlayer example (#30045)
## Documentation / Examples

- [x] Make sure the linting passes


Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
2022-05-22 15:19:10 +00:00
Munawwar
bb7b75809d
update zustand example (#35022)
Made SSG and SSR code similar. Comments and variable renames on store.js

Checklist:

## Documentation / Examples

- [✓] Make sure the linting passes by running `yarn lint`
2022-05-22 04:57:40 +00:00
irvile
53eb046790
fix(with-tailwindcss-emotion): 'theme' of undefined (#35588)
Closes [#26337](https://github.com/vercel/next.js/issues/26337).
This PR fixes #26337.

The issue is just the version of xwind basically.
Not compatible with newer versions and jit mode.



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-05-22 04:42:51 +00:00
Don Morrison
3c001aaae9
fix(examples/with-segment-analytics): Update README (#35387)
Update the README for `examples/with-segment-analytics`:

- Update reference from `_document.js` (removed in 92d87870af) to `_app.js`.
- Update reference links
- Make small language tweaks

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-22 04:33:01 +00:00
Igor Loskutov
87e93a275d
custom-server-express fix type definition and eliminate dead code (#37054)
Hi, this signature confused me a bit when I was porting it in typescript. Turns out there's dead code: there's no Error object passed to this function. Details of this signature are in this answer: https://stackoverflow.com/a/56291567/2123547, and in `@types/express-server-static-core` it is `listen(port: number, callback?: () => void): http.Server;`. Types definitions: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/express-serve-static-core/index.d.ts#L1198

fixes #37053

## Bug

- [x ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ x] Make sure the linting passes by running `yarn lint`
2022-05-22 02:34:08 +00:00
LongYinan
33c837b115
Stabilize SWC emotion transform plugin (#37058) 2022-05-21 04:09:30 +00:00
Mike Fix
91c75b6c1f
Add with-markdoc/ example (#36867)
* add with-markdoc/ example

* rename as markdoc/

* use latest

* update README

* add .gitignore

* typescript changes

* update .gitignore

* make folders files

* update next.config.js

* fix prettier

* rename _app.ts -> _app.tsx
2022-05-18 18:52:45 -05:00
Rishabh Poddar
4ff459730a
Update to with-supertokens example (#36906)
Update version of supertokens-auth-react to add react 18 support.

Co-authored-by: Bhumil Sarvaiya <21988812+bhumilsarvaiya@users.noreply.github.com>
Co-authored-by: Joel Coutinho <6310783+jscyo@users.noreply.github.com>
2022-05-15 15:53:02 +00:00
JJ Kasper
167a91b73e
Remove un-helpful error in with-sentry example (#36902)
The error reported here is unclear and un-helpful so we shouldn't be recommending to report this by default. 

x-ref: [slack thread](https://vercel.slack.com/archives/CGU8HUTUH/p1652466540356879) 

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-05-13 23:15:09 +00:00
Balázs Orbán
2ed5b3d5f0
chore: update Jest example snapshots (#36884)
Follow-up: https://github.com/vercel/next.js/pull/36858#pullrequestreview-971074854

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
2022-05-13 16:18:06 +00:00
Gregor Adams
6582ecc348
fix(examples): maxlength was inconsistent (#36840)
the value and help-text were irritating
the value of the help-text is now used as value



## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-05-13 14:32:08 +00:00
Luke Shumard
2b88467dd9
Example/facebook pixel script (#34417)
The [with-facebook-pixel](https://github.com/vercel/next.js/tree/canary/examples/with-facebook-pixel) example attempts to run the <Script /> loading the Facebook Pixel on every request. This results in a warning stating `[Meta Pixel] - Duplicate Pixel ID: xxx`. According to the Next.js docs, by using an [id on the inline script](https://nextjs.org/docs/basic-features/script#inline-scripts) Next is able to track and optimize the script. Since this is absent on the present example, the inline script is continuously loaded on every request.

I've added an id to this inline script, and the warning from facebook is no longer present.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`

Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-05-13 14:17:15 +00:00
Balázs Orbán
b596ce9d6a
chore: upgrade dependencies in Jest examples (#36858)
Ref: https://github.com/vercel/next.js/issues/36842, https://github.com/vercel/next.js/pull/36632, https://github.com/vercel/next.js/pull/36787

Upgrading to Jest 28, and aligning Babel example with `with-jest`


## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
2022-05-12 15:37:37 +00:00
JJ Kasper
e05a95a844
Update moduleNameMapper jest config and remove extra deps (#36787)
* Update moduleNameMapper jest config and remove extra deps

* move svg mock to its own entry for easier overriding

* remove package script
2022-05-10 16:36:10 -05:00
James Perkins
22c0b65eb5
Fixing Tina + Adding a demo URL (#35480)
## Documentation / Examples

- Updating Tina Demo URL
- Adding Tina to blog-starter example
- Adding Tina to Basic features section
- Updating Tina to actually work again
2022-05-10 17:52:54 +00:00