Skip to content

Commit 2006a2f

Browse files
authored
Merge pull request #7 from aferd/adjustments
chore: add pr-preview and some styling issues
2 parents b919783 + 1515a97 commit 2006a2f

File tree

3 files changed

+67
-9
lines changed

3 files changed

+67
-9
lines changed

.github/workflows/pr-preview.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
2+
### WARNING -- this file was generated by generate-workflows
3+
name: pr-preview
4+
on: pull_request_target
5+
jobs:
6+
build-upload:
7+
runs-on: ubuntu-latest
8+
env:
9+
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
10+
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
11+
GH_PR_TOKEN: ${{ secrets.GH_PR_TOKEN }}
12+
GH_PR_NUM: ${{ github.event.number }}
13+
steps:
14+
- uses: actions/checkout@v4
15+
# Yes, we really want to checkout the PR
16+
- run: |
17+
git fetch origin pull/$GH_PR_NUM/head:tmp
18+
git checkout tmp
19+
20+
- run: |
21+
git rev-parse origin/main
22+
git rev-parse HEAD
23+
git rev-parse origin/main..HEAD
24+
git log origin/main..HEAD --format="%b"
25+
26+
# Yes, we really want to checkout the PR
27+
# Injected by generate-workflows.js
28+
- uses: actions/setup-node@v4
29+
with:
30+
node-version: '20'
31+
- uses: actions/cache@v4
32+
id: npm-cache
33+
name: Load npm deps from cache
34+
with:
35+
path: '**/node_modules'
36+
key: ${{ runner.os }}-npm-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('package-lock.json') }}
37+
- run: npm install --frozen-lockfile --legacy-peer-deps
38+
if: steps.yarn-cache.outputs.cache-hit != 'true'
39+
- run: npm run build
40+
name: Build component groups
41+
- uses: actions/cache@v4
42+
id: docs-cache
43+
name: Load webpack cache
44+
with:
45+
path: '.cache'
46+
key: ${{ runner.os }}-v4-${{ hashFiles('yarn.lock') }}
47+
- run: npm run build:docs
48+
name: Build docs
49+
- run: node .github/upload-preview.js packages/module/public
50+
name: Upload docs
51+
if: always()
52+
- run: npx puppeteer browsers install chrome
53+
name: Install Chrome for Puppeteer
54+
- run: npm run serve:docs & npm run test:a11y
55+
name: a11y tests
56+
- run: node .github/upload-preview.js packages/module/coverage
57+
name: Upload a11y report
58+
if: always()

packages/module/patternfly-docs/content/examples/basic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The WidgetLayout component provides a complete drag-and-drop dashboard experienc
2525

2626
### Interactive example
2727

28-
```js file="./BasicExample.tsx"
28+
```js file="./BasicExample.tsx" isFullscreen
2929
3030
```
3131

packages/module/src/WidgetLayout/styles.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ export const gridLayoutStyles = `
3131
3232
.react-grid-item.react-grid-placeholder {
3333
background-color: var(--pf-t--color--gray--60);
34-
border-radius: 12px;
34+
border-radius: var(--pf-t--global--border--radius--medium);
3535
}
3636
3737
.react-grid-item .react-resizable-handle::after {
3838
display: none;
3939
}
4040
4141
.react-grid-item .react-resizable-handle img {
42-
padding: 3px;
42+
padding: var(--pf-t--global--spacer--xs);
4343
}
4444
4545
#widget-layout-container {
@@ -78,21 +78,21 @@ export const gridLayoutStyles = `
7878
}
7979
8080
.grid-tile .widg-c-icon--header .service-icon {
81-
height: 28px;
82-
width: 28px;
81+
height: var(--pf-t--global--icon--size--lg);
82+
width: var(--pf-t--global--icon--size--lg);
8383
}
8484
8585
.grid-tile .widg-c-icon--header .pf-v6-svg {
8686
color: var(--pf-t--color--blue--50);
87-
height: 22px;
88-
width: 22px;
87+
height: var(--pf-t--global--icon--size--md);
88+
width: var(--pf-t--global--icon--size--md);
8989
margin-bottom: var(--pf-t--global--spacer--sm);
9090
}
9191
9292
.grid-tile .widg-card-header-text {
9393
gap: 0;
9494
line-height: 0;
95-
padding-top: 2px;
95+
padding-top: var(--pf-t--global--spacer--xs);
9696
}
9797
9898
.grid-tile .pf-v6-c-card__header .pf-v6-c-menu-toggle {
@@ -117,7 +117,7 @@ export const gridLayoutStyles = `
117117
}
118118
119119
.widg-l-gallery {
120-
--pf-v6-l-gallery--m-gutter--GridGap: 8px;
120+
--pf-v6-l-gallery--m-gutter--GridGap: var(--pf-t--global--spacer--sm);
121121
}
122122
`;
123123

0 commit comments

Comments
 (0)