Skip to content

Commit b938366

Browse files
authored
Merge branch 'main' into fix/tools/dev-server-config
2 parents c0a4146 + d50f48a commit b938366

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+9978
-5653
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
"@patternfly/pfe-tools": minor
3+
---
4+
**Test Helpers**: Added `allUpdates` test helper, which waits until an element
5+
completely finishes updating.
6+
7+
```js
8+
const element = await fixture(html`<my-el></my-el>`);
9+
await allUpdates(element);
10+
```

.github/workflows/commitlint.yml

Lines changed: 6 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ jobs:
3030
with:
3131
fetch-depth: 0
3232

33+
# https://github.com/wagoid/commitlint-github-action/issues/560#issuecomment-1277659864
34+
- run: rm tsconfig.json
35+
3336
- uses: wagoid/commitlint-github-action@v5
3437
id: commitlint
3538
continue-on-error: true
@@ -58,48 +61,8 @@ jobs:
5861
script: |
5962
const results = ${{ steps.commitlint.outputs.results }};
6063
const titleGood = ${{ steps.prTitle.outputs.success }};
61-
62-
const totalErrors = results.reduce((a, r) => a + r.errors.length, 0);
63-
const totalWarnings = results.reduce((a, r) => a + r.warnings.length, 0);
64-
65-
const header = `
66-
## 👕 Commitlint Problems for this PR: ${!titleGood ? '' : `
67-
68-
**The PR title conforms to conventional commit style**
69-
70-
👉 **Make sure the PR is squashed into a single commit using the PR title** 👈`}
71-
72-
🔎 found ${totalErrors} errors, ${totalWarnings} warnings
73-
ℹ️ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint
74-
`;
75-
76-
const comment = results.reduce((acc, result) => {
77-
if (!result.errors.length && !result.warnings.length) {
78-
return acc;
79-
}
80-
81-
const [firstLine, ...rest] = result.message.split('\n');
82-
83-
const body = rest.join('\n').trim();
84-
const icon = result.errors.length ? '❌' : '⚠️';
85-
const hash = result.hash.substring(0, 8);
86-
87-
return `${acc} ${!body.length ? '\n\n' : `
88-
89-
<details><summary>`}
90-
${hash} - ${firstLine} ${!body.length ? '\n\n' : `\
91-
</summary>
92-
93-
${body}
94-
95-
</details>
96-
97-
`}${result.errors.map(error => `
98-
- ❌ ${error}`).join('')} ${result.warnings.map(warn => `
99-
- ⚠️ ${warn}`).join('')}`;
100-
}, header);
101-
102-
core.setOutput('comment', comment);
64+
const { format } = await import('${{ github.workspace }}/scripts/format-commitlint-messages.js');
65+
return format({ core, results, titleGood });
10366
10467
- name: Notify PR
10568
if: ${{ steps.commitlint.outcome == 'failure' && steps.prTitle.outputs.success == 'false' }}
@@ -109,7 +72,7 @@ jobs:
10972
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11073
header: commitlint
11174
message: |
112-
${{ steps.format.outputs.comment }}
75+
${{ steps.format.outputs.result }}
11376
11477
- name: Fail Job on Error
11578
if: ${{ steps.commitlint.outcome == 'failure' && steps.prTitle.outputs.success == 'false' }}

.github/workflows/tests.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,10 @@ jobs:
7979
strategy:
8080
matrix:
8181
node:
82-
- 18
83-
- 19
82+
- '18'
83+
- '19'
84+
# https://github.com/TypeStrong/ts-node/issues/1997
85+
# - '20'
8486
if: |
8587
github.event_name == 'workflow_dispatch'
8688
|| github.event_name == 'push'

core/pfe-core/controllers/floating-dom-controller.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import type { ReactiveController, ReactiveElement } from 'lit';
33
import type { StyleInfo } from 'lit/directives/style-map.js';
44
import type { Options as Offset } from '@floating-ui/core/src/middleware/offset';
55

6-
7-
export { Placement };
6+
export type { Placement };
87

98
import {
109
autoUpdate,

core/pfe-core/controllers/internals-controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class InternalsController implements ReactiveController, ARIAMixin {
1212
declare ariaChecked: ARIAMixin['ariaChecked'];
1313
declare ariaColCount: ARIAMixin['ariaColCount'];
1414
declare ariaColIndex: ARIAMixin['ariaColIndex'];
15-
declare ariaColIndexText: ARIAMixin['ariaColIndexText'];
15+
declare ariaColIndexText: string | null;
1616
declare ariaColSpan: ARIAMixin['ariaColSpan'];
1717
declare ariaCurrent: ARIAMixin['ariaCurrent'];
1818
declare ariaDisabled: ARIAMixin['ariaDisabled'];
@@ -36,7 +36,7 @@ export class InternalsController implements ReactiveController, ARIAMixin {
3636
declare ariaRoleDescription: ARIAMixin['ariaRoleDescription'];
3737
declare ariaRowCount: ARIAMixin['ariaRowCount'];
3838
declare ariaRowIndex: ARIAMixin['ariaRowIndex'];
39-
declare ariaRowIndexText: ARIAMixin['ariaRowIndexText'];
39+
declare ariaRowIndexText: string | null;
4040
declare ariaRowSpan: ARIAMixin['ariaRowSpan'];
4141
declare ariaSelected: ARIAMixin['ariaSelected'];
4242
declare ariaSetSize: ARIAMixin['ariaSetSize'];

core/pfe-core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
"test": "wtr --files './test/*.spec.ts' --config ../../web-test-runner.config.js"
5151
},
5252
"dependencies": {
53-
"@floating-ui/dom": "^1.2.3",
54-
"lit": "2.6.1"
53+
"@floating-ui/dom": "^1.2.6",
54+
"lit": "^2.7.2"
5555
},
5656
"repository": {
5757
"type": "git",

docs/components/components.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717

1818
<header class="band">
1919
<h1>{{element.title}}</h1>
20+
21+
{{ element.description | safe}}
22+
2023
</header>
2124

2225
{% renderFile element.docsTemplatePath, element %}

docs/main.css

Lines changed: 51 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,7 @@ strong {
7878
}
7979

8080
header.band {
81-
background-color:
82-
var(
83-
--pf-c-page__main-section--BackgroundColor,
84-
var(
85-
--pf-c-page__main-section--m-light-100--BackgroundColor,
86-
var(--pf-global--BackgroundColor--150, #fafafa)));
81+
background-color: var(--pf-global--BackgroundColor--100, #fff);
8782
padding: var(--pf-global--spacer--md, 1rem) var(--pf-global--spacer--md, 1rem);
8883
box-shadow: var(--pf-c-page--section--m-sticky-top--BoxShadow, var(--pf-global--BoxShadow--sm-bottom, 0 0.125rem 0.25rem -0.0625rem rgba(3, 3, 3, 0.16)));
8984
}
@@ -278,11 +273,33 @@ header.band h1 {
278273
margin-top: 0;
279274
}
280275

276+
.example-preview {
277+
padding: var(--pf-global--spacer--md, 1rem);
278+
background-color: var(--pf-global--BackgroundColor--100, #fff);
279+
border-bottom: var(--pf-global--BorderWidth--sm, 1px) solid var(--pf-global--BorderColor--300, #f0f0f0);
280+
transition: width .2s ease-in-out;
281+
}
282+
283+
section.api.band.api-properties dl {
284+
padding: var(--pf-global--spacer--md, 1rem);
285+
background-color: var(--pf-global--BackgroundColor--100, #fff);
286+
}
287+
288+
section.api.band.api-properties table {
289+
background-color: var(--pf-global--BackgroundColor--100, #fff);
290+
}
291+
281292
main.basic,
282293
main.blog {
283294
margin-top: 6.5rem;
284295
margin-bottom: 3.75rem;
285296
flex-grow: 1;
297+
background-color:
298+
var(
299+
--pf-c-page__main-section--BackgroundColor,
300+
var(
301+
--pf-c-page__main-section--m-light-100--BackgroundColor,
302+
var(--pf-global--BackgroundColor--150, #fafafa)));
286303
}
287304

288305
#home-title img {
@@ -673,7 +690,6 @@ th, td {
673690
}
674691

675692
code:not([class*="language-"]) {
676-
background-color: rgba(27,31,35,.05);
677693
padding: .2em .4em;
678694
border-radius: 6px;
679695
font-family: "Overpass Mono", monospace;
@@ -702,10 +718,38 @@ code {
702718

703719
.html-example {
704720
display: flex;
721+
padding-block: 6px;
722+
}
723+
724+
.html-example:hover summary {
725+
color: var(--pf-c-expandable-section__toggle--hover--Color, var(--pf-global--link--Color--hover, #004080));
705726
}
706727

707728
.html-example summary {
729+
display: flex;
708730
cursor: pointer;
731+
align-items: center;
732+
gap: 0.5rem;
733+
color: var(--pf-c-expandable-section__toggle--Color, var(--pf-global--link--Color, #06c));
734+
}
735+
736+
.html-example > summary::-webkit-details-marker,
737+
.html-example > summary::marker {
738+
display: none;
739+
}
740+
741+
.html-example > summary::before {
742+
content: "";
743+
display: inline-block;
744+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' viewBox='0 0 256 512' aria-hidden='true' role='img' style='vertical-align: -0.125em;'%3E%3Cpath d='M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z'%3E%3C/path%3E%3C/svg%3E");
745+
background-size: 1rem 1rem;
746+
height: 1rem;
747+
width: 1rem;
748+
transition: all .2s ease-in;
749+
}
750+
751+
.html-example[open] > summary::before {
752+
transform: rotate(90deg);
709753
}
710754

711755
.html-example p:empty {

elements/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
},
6969
"wireit": {
7070
"build": {
71-
"command": "ttsc -b . --pretty",
71+
"command": "tspc -b . --pretty",
7272
"dependencies": [
7373
"analyze"
7474
]

elements/pf-accordion/docs/pf-accordion.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@
8484

8585
{% renderCssCustomProperties %}{% endrenderCssCustomProperties %}
8686

87-
{% renderCssParts %}{% endrenderCssParts %}
87+
{% renderCssParts %}{% endrenderCssParts %}

0 commit comments

Comments
 (0)