Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tools): knobs #2781

Draft
wants to merge 64 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
e4460fe
fix(avatar)!: remove BaseAvatar (#2630)
bennypowers Mar 31, 2024
cf4723b
fix(avatar)!: rename AvatarLoadEvent => PfAvatarLoadEvent
bennypowers Mar 31, 2024
9a6e651
fix(clipboard-copy)!: remove BaseClipboardCopy (#2635)
bennypowers Mar 31, 2024
caacefc
Merge branch 'main' into staging/4.0
bennypowers Apr 11, 2024
294e7f4
fix(switch)!: remove BaseSwitch (#2634)
bennypowers Apr 11, 2024
b48870e
fix(code-block)!: remove BaseCodeBlock (#2633)
bennypowers Apr 11, 2024
75b5958
fix(label)!: remove BaseLabel (#2632)
bennypowers Apr 11, 2024
a28c712
fix(badge)!: remove BaseBadge (#2629)
bennypowers Apr 11, 2024
a28644b
fix(spinner)!: remove BaseSpinner (#2627)
bennypowers Apr 11, 2024
e78612f
fix(tile)!: remove BaseTile (#2625)
bennypowers Apr 11, 2024
25ff447
fix(tooltip)!: remove BaseTooltip (#2628)
bennypowers Apr 11, 2024
71107fd
feat(card)!: remove BaseCard (#2586)
brianferry Apr 11, 2024
9fbd4da
fix(button)!: remove BaseButton (#2631)
bennypowers Apr 11, 2024
a61be2f
fix(tabs)!: remove BaseTabs (#2745)
bennypowers Apr 11, 2024
c411d2a
fix(button): keyboard focus
bennypowers Apr 11, 2024
8fc29fa
fix(switch): revert bad merge from BaseSwitch
bennypowers Apr 11, 2024
9f2cdc6
Merge branch 'main' into staging/4.0
bennypowers Apr 11, 2024
b8c226c
Merge branch 'main' into staging/4.0
bennypowers Apr 11, 2024
59fe87b
Merge branch 'main' into staging/4.0
bennypowers Apr 11, 2024
55b9a16
Merge branch 'main' into staging/4.0
bennypowers May 19, 2024
6e96eb2
fix(icon)!: remove svg files (#2763)
bennypowers May 23, 2024
222975b
fix(icon)!: remove BaseIcon (#2636)
bennypowers Jun 2, 2024
77dff66
Merge branch 'main' into staging/4.0
bennypowers Jun 6, 2024
b1df8fa
feat(tools): knobs elements
bennypowers Jun 20, 2024
0c68761
fix(select): work in shadow roots
bennypowers Jun 20, 2024
0e52679
fix(text-input): show helper text
bennypowers Jun 20, 2024
8190f8a
Merge branch 'main' into staging/4.0
bennypowers Jun 21, 2024
a17d490
fix(accordion)!: remove BaseAccordion (#2764)
bennypowers Jun 25, 2024
6d5743f
feat(tools): ts transform to add static version to elements (#2768)
bennypowers Jun 25, 2024
7901999
fix(icon)!: remove getIconUrl for webpack's sake (#2766)
bennypowers Jun 25, 2024
25eaebc
Merge branch 'main' into staging/4.0
bennypowers Jun 25, 2024
5091c5c
feat!: ssr (#2762)
bennypowers Jun 25, 2024
6f0a178
fix: remove BaseAccordion from bad merge
bennypowers Jun 25, 2024
e82d8ec
chore: remove references to Base*
bennypowers Jun 25, 2024
b414786
refactor: attribute renderer
bennypowers Jun 25, 2024
b5bdd32
Merge branch 'main' into staging/4.0
bennypowers Jun 25, 2024
64832b0
Merge branch 'main' into feat/tools/knobs
bennypowers Jun 25, 2024
bb938e5
fix: wip knobs
bennypowers Jun 25, 2024
571add5
feat(tools): more knobs wip
bennypowers Jun 26, 2024
dc7175e
fix(tools): codemirror wip
bennypowers Jun 26, 2024
8c2fd99
fix(core): ariaDescribedByElements, etc types
bennypowers Jun 28, 2024
c687880
Merge branch 'main' into staging/4.0
bennypowers Jun 28, 2024
6927cd5
Merge branch 'main' into staging/4.0
bennypowers Jul 1, 2024
83f7c1b
chore: lint
bennypowers Jul 7, 2024
40b3403
chore: update typescript
bennypowers Jul 7, 2024
50baeb3
fix(tools): knobs improvements
bennypowers Jul 8, 2024
3aa5be5
docs(accordion): demo improvements
bennypowers Jul 8, 2024
7d17d52
chore: appease cupertino
bennypowers Jul 9, 2024
b18d34c
chore: pkg lock
bennypowers Jul 9, 2024
4e34f03
refactor(core): clarify the guts of InternalsController
bennypowers Jul 9, 2024
237ee26
docs(button): demo of custom roles
bennypowers Jul 9, 2024
b5cfcaa
docs(button): a wee bit of style
bennypowers Jul 9, 2024
6bbecf1
chore: typescript 5.5 (#2801)
bennypowers Jul 9, 2024
f777fe2
Merge branch 'staging/4.0' into docs/button/custom-roles
bennypowers Jul 9, 2024
d7459d7
Merge pull request #2806 from patternfly/docs/button/custom-roles
kelsS Jul 9, 2024
7979a2e
fix(tools): less chatty tests
bennypowers Jul 10, 2024
4eb2d9f
Merge branch 'main' into staging/4.0
bennypowers Jul 10, 2024
6488258
chore: deps
bennypowers Jul 10, 2024
5b1b63d
chore: lint
bennypowers Jul 10, 2024
e7b3eee
test: lint
bennypowers Jul 10, 2024
dd2e0b1
chore: update playwright in ci
bennypowers Jul 10, 2024
a486b90
fix(tools): dev server config watcher regexp
bennypowers Jul 11, 2024
eaacde2
Merge branch 'staging/4.0' into feat/tools/knobs
bennypowers Jul 14, 2024
9e64b3a
fix(tools): property knobs, layouts
bennypowers Jul 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .changeset/clever-places-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@patternfly/eslint-config": patch
"@patternfly/create-element": patch
"@patternfly/pfe-core": patch
"@patternfly/pfe-tools": patch
"@patternfly/elements": patch
---
updated dependencies
4 changes: 4 additions & 0 deletions .changeset/clever-yaks-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/elements": minor
---
`<pf-card>`: added `title` slot, for when the title is not inline with any slotted header actions
34 changes: 34 additions & 0 deletions .changeset/dirty-bears-win.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
"@patternfly/elements": major
---
`<pf-icon>`: removed the `getIconUrl` static method, and replaced it with the
`resolve` static method

The steps for overriding icon loading behaviour have changed. Before, you had to
return a string from the `getIconUrl` method, or the second argument to
`addIconSet`. Now, both of those functions must return a Node, or any lit-html
renderable value, or a Promise thereof.

BEFORE:

```js
PfIcon.addIconSet('local', (set, icon) =>
new URL(`/assets/icons/${set}-${icon}.js`));

// or
PfIcon.getIconUrl = (set, icon) =>
new URL(`/assets/icons/${set}-${icon}.js`))
```

AFTER
```js
PfIcon.addIconSet('local', (set, icon) =>
import(`/assets/icons/${set}-${icon}.js`))
.then(mod => mod.default);

// or
PfIcon.resolve = (set, icon) =>
import(`/assets/icons/${set}-${icon}.js`))
.then(mod => mod.default);
```

4 changes: 4 additions & 0 deletions .changeset/few-lands-feel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/pfe-core": major
---
Removed global `pfeLog` feature
4 changes: 4 additions & 0 deletions .changeset/free-ideas-fry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/pfe-core": patch
---
`InternalsController`: corrected the types for aria IDL list attributes
4 changes: 4 additions & 0 deletions .changeset/fresh-shrimps-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/elements": major
---
`<pf-icon>`: removed the `defaultIconSet` static field.
18 changes: 18 additions & 0 deletions .changeset/heavy-peas-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
"@patternfly/pfe-tools": minor
---
Added `querySnapshot` accessibility testing helper

```ts

describe('then clicking the toggle', function() {
beforeEach(async function() {
await clickElementAtCenter(toggle);
});
it('expands the disclosure panel', async function() {
const snapshot = await a11ySnapshot();
const expanded = querySnapshot(snapshot, { expanded: true });
expect(expanded).to.be.ok;
});
});
```
32 changes: 32 additions & 0 deletions .changeset/hip-coins-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
"@patternfly/elements": major
---
`<pf-accordion>`: Removed `BaseAccordion*` classes, as well as static `isPanel`, `isHeader`, and `isAccordion` methods. Removed the optional `parentAccordion` parameter to `PfAccordion#expand(index)`. Renamed accordion event classes by adding the `Pf` prefix:

**Before**:

```js
import {
AccordionHeaderChangeEvent
} from '@patternfly/elements/pf-accordion/pf-accordion.js';

addEventListener('change', function(event) {
if (event instanceof AccordionHeaderChangeEvent) {
// ...
}
});
```

**After**:

```js
import {
PfAccordionHeaderChangeEvent
} from '@patternfly/elements/pf-accordion/pf-accordion.js';

addEventListener('change', function(event) {
if (event instanceof PfAccordionHeaderChangeEvent) {
// ...
}
});
```
4 changes: 4 additions & 0 deletions .changeset/khaki-regions-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/elements": major
---
`<pf-icon>`: removed svg files, use `@patternfly/icons` instead
17 changes: 17 additions & 0 deletions .changeset/label-close-remove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
"@patternfly/elements": major
---
`<pf-label>`: when clicking close button, `close` event is fired.
Now, if that event is not cancelled, the label will remove itself from the document.

To restore previous behaviour:

```js
import { LabelCloseEvent } from '@patternfly/elements/pf-label/pf-label.js';
label.addEventListener('close', function(event) {
if (event instanceof LabelCloseEvent) {
event.preventDefault();
return false;
}
});
```
4 changes: 4 additions & 0 deletions .changeset/mean-tires-ask.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/pfe-core": major
---
Removed `window.PfeConfig` global config object
4 changes: 4 additions & 0 deletions .changeset/polite-rules-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/pfe-core": major
---
Removed global `auto-reveal` feature
4 changes: 4 additions & 0 deletions .changeset/public-yaks-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/pfe-core": patch
---
Context: `makeContextRoot` no longer crashes SSR processes
35 changes: 35 additions & 0 deletions .changeset/remove-base-clipboard-copy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
"@patternfly/elements": major
---
`<pf-clipboard-copy>`: Removed `BaseClipboardCopy` class.
Reimplement (recommended) or extend `PfClipboardCopy`.
Renames `AvatarLoadEvent` to `PfAvatarLoadEvent` and moves it to `pf-avatar.js`.

**Before**:

```js
import {
ClipboardCopyCopiedEvent
} from '@patternfly/elements/pf-clipboard-copy/BaseClipboardCopy.js';

addEventListener('copy', function(event) {
if (event instanceof ClipboardCopyCopiedEvent) {
// ...
}
});
```

**After**:

```js
import {
PfClipboardCopyCopiedEvent
} from '@patternfly/elements/pf-clipboard-copy/pf-clipboard-copy.js';

addEventListener('copy', function(event) {
if (event instanceof PfClipboardCopyCopiedEvent) {
// ...
}
});
```

4 changes: 4 additions & 0 deletions .changeset/remove-base-icon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/elements": major
---
`<pf-icon>`: Removed `BaseIcon` class. Reimplement (recommended) or extend `PfIcon`.
4 changes: 4 additions & 0 deletions .changeset/remove-base-label.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/elements": major
---
`<pf-label>`: Removed `BaseLabel` class. Reimplement (recommended) or extend `PfLabel`.
4 changes: 4 additions & 0 deletions .changeset/remove-base-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/elements": major
---
`<pf-switch>`: Removed `BaseSwitch` class. Reimplement (recommended) or extend `PfSwitch`.
29 changes: 29 additions & 0 deletions .changeset/remove-baseavatar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
"@patternfly/elements": major
---
`<pf-avatar>`: Removed `BaseAvatar` class. Reimplement (recommended) or extend `PfAvatar`.
Renames `AvatarLoadEvent` to `PfAvatarLoadEvent` and moves it to `pf-avatar.js`.

**Before**:

```js
import { AvatarLoadEvent } from '@patternfly/elements/pf-avatar/BaseAvatar.js';

addEventListener('load', function(event) {
if (event instanceof AvatarLoadEvent) {
// ...
}
});
```

**After**:

```js
import { PfAvatarLoadEvent } from '@patternfly/elements/pf-avatar/pf-avatar.js';

addEventListener('load', function(event) {
if (event instanceof PfAvatarLoadEvent) {
// ...
}
});
```
4 changes: 4 additions & 0 deletions .changeset/remove-basebadge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/elements": major
---
`<pf-badge>`: Removed `BaseBadge` class. Reimplement (recommended) or extend `PfBadge`.
4 changes: 4 additions & 0 deletions .changeset/remove-basebutton.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/elements": major
---
`<pf-button>`: Removed `BaseButton` class. Reimplement (recommended) or extend `PfButton`.
4 changes: 4 additions & 0 deletions .changeset/remove-basecodeblock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/elements": major
---
`<pf-code-block>`: Removed `BaseCodeBlock` class. Reimplement (recommended) or extend `PfCodeBlock`.
4 changes: 4 additions & 0 deletions .changeset/remove-basespinner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/elements": major
---
`<pf-spinner>`: Removed `BaseSpinner` class. Reimplement (recommended) or extend `PfSpinner`.
5 changes: 5 additions & 0 deletions .changeset/remove-basetabs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@patternfly/elements": major
---
`<pf-tabs>`: Remove `BaseTabs`. Use `TabsAriaController`, etc. to reimplement
your elements which extend it, or extend from `PfTabs` instead.
4 changes: 4 additions & 0 deletions .changeset/remove-basetile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/elements": major
---
`<pf-tile>`: Removed `BaseTile` class. Reimplement (recommended) or extend `PfTile`.
4 changes: 4 additions & 0 deletions .changeset/remove-basetooltip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/elements": major
---
`<pf-tooltip>`: Removed `BaseTooltip` class. Reimplement (recommended) or extend `PfTooltip`.
5 changes: 5 additions & 0 deletions .changeset/sharp-spiders-float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@patternfly/elements": major
---

`<pf-card>`: Removes `BaseCard` base class. If your project extends `BaseCard`, we recommend extending `LitElement` instead and re-implementing card's properties. Alternately, extend from `PfCard`.
12 changes: 12 additions & 0 deletions .changeset/slick-bats-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@patternfly/pfe-tools": minor
---
**TypeScript**: Add static version transformer. This adds a runtime-only
static `version` field to custom element classes.

```js
import '@patternfly/elements/pf-button/pf-button.js';
const PFE_VERSION =
await customElements.whenDefined('pf-button')
.then(PfButton => PfButton.version);
```
4 changes: 4 additions & 0 deletions .changeset/thirty-hounds-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/pfe-core": major
---
Removed global `trackPerformance` feature
5 changes: 5 additions & 0 deletions .changeset/weak-turtles-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@patternfly/pfe-tools": patch
---
**Test Runner Config**: import the production version of Lit for tests, reducing
console chatter during test runs
4 changes: 4 additions & 0 deletions .changeset/wide-guests-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@patternfly/eslint-config-elements": major
---
Require `@typescript-eslint` ^8.0.0
4 changes: 2 additions & 2 deletions .github/workflows/bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
if: github.repository == 'patternfly/patternfly-elements'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- uses: actions/setup-node@v3
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
if: github.repository == 'patternfly/patternfly-elements'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
Expand Down
Loading
Loading