Skip to content

Commit 6cbc508

Browse files
docs(nextjs-pages): fix app shell layout (#4727)
1 parent 87ff169 commit 6cbc508

File tree

6 files changed

+47
-12
lines changed

6 files changed

+47
-12
lines changed

.github/workflows/examples.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Examples
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
paths:
8+
- 'examples/**/*'
9+
pull_request:
10+
paths:
11+
- 'examples/**/*'
12+
13+
jobs:
14+
ci:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
path:
19+
- nextjs-pages
20+
- vite-ts
21+
fail-fast: false
22+
steps:
23+
- uses: actions/checkout@v3
24+
25+
- uses: actions/[email protected]
26+
with:
27+
node-version-file: '.nvmrc'
28+
29+
- name: Install
30+
run: npm ci
31+
working-directory: examples/${{ matrix.path }}
32+
33+
- name: Build
34+
run: npm run build
35+
working-directory: examples/${{ matrix.path }}
36+
37+
- name: Test
38+
run: npm run test --if-present
39+
working-directory: examples/${{ matrix.path }}

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
- charts
2020
- cypress-commands
2121
- main/src/components
22+
fail-fast: false
2223

2324
steps:
2425
- name: Checkout

examples/nextjs-pages/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## UI5 Web Components React - Next.js Pages Router Example
22

33
This example shows how to use the [Next.js](https://nextjs.org/) Pages Router with UI5 Web Components for React.
4-
It includes the required adjustments in `src/pages/_app.tsx` and `src/pages/_document.tsx` as well as a very simple Todo
4+
It includes the required adjustments in `pages/_app.tsx` and `pages/_document.tsx` as well as a very simple Todo
55
App.
66

77
## How to use this template
@@ -35,13 +35,13 @@ pnpm dev
3535

3636
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
3737

38-
You can start editing the page by modifying `src/pages/index.tsx`. The page auto-updates as you edit the file.
38+
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
3939

4040
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed
4141
on [http://localhost:3000/api/todods](http://localhost:3000/api/todos). This endpoint can be edited
42-
in `src/pages/api/todos.ts`.
42+
in `pages/api/todos.ts`.
4343

44-
The `src/pages/api` directory is mapped to `/api/*`. Files in this directory are treated
44+
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated
4545
as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
4646

4747
## Learn More

examples/nextjs-pages/components/AppShell/AppShell.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
}
66

77
.scrollContainer {
8-
height: calc(100vh - var(--_ui5_shellbar_root_height));
8+
height: calc(100vh - 3.25rem);
99
overflow-y: auto;
1010
position: relative;
1111
}

examples/nextjs-pages/pages/todos/[id].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default function TodoDetails({ todo }: Props) {
2929
<>
3030
<DynamicPage showHideHeaderButton={false} headerTitle={<DynamicPageTitle header={todo?.title} />}>
3131
<MessageStrip design={MessageStripDesign.Information}>
32-
Since this is only a demo app, adjustments made here on this page won't be reflected in the todo list.
32+
{`Since this is only a demo app, adjustments made here on this page won't be reflected in the todo list.`}
3333
</MessageStrip>
3434
<Form>
3535
<FormItem label={'Title'}>

examples/nextjs-pages/styles/globals.css

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,4 @@ body {
88
overflow-x: hidden;
99
padding: 0;
1010
margin: 0;
11-
}
12-
13-
a {
14-
color: inherit;
15-
text-decoration: none;
16-
}
11+
}

0 commit comments

Comments
 (0)