Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
3ee117e
feat: pfe-autocomplete - fire custom event when dropdown is shown (#1…
kylebuch8 Aug 18, 2020
3b60a6f
v1.0.0-prerelease.55
kylebuch8 Aug 19, 2020
2f77874
remove bundles after 1.0.0-prerelease.55 tag
kylebuch8 Aug 19, 2020
e661726
prerelease 55 changelog and docs updates
kylebuch8 Aug 19, 2020
6cf9cf6
removing docs from changelog updates
kylebuch8 Aug 19, 2020
57978b7
Merge pull request #1050 from patternfly/release/v1.0.0-prerelease.55
kylebuch8 Aug 19, 2020
c9e3ae4
test: framework testing (#1011)
kylebuch8 Aug 19, 2020
918e067
test: visual regression testing (#885)
kylebuch8 Aug 20, 2020
a56f268
feat: pfe-button component (#837)
kylebuch8 Aug 20, 2020
06a9b94
test: disabling visual regression testing in favor of manual running
kylebuch8 Aug 24, 2020
7aad6b4
feat: Remove build from postinstall (#1055)
castastrophe Aug 24, 2020
4520a30
fix: fix issue in new automerge scripts (#1056)
castastrophe Aug 24, 2020
2462e69
fix: pfe-tab design tweaks & support for local vars in non-light cont…
starryeyez024 Aug 26, 2020
efed861
v1.0.0-prerelease.56
kylebuch8 Aug 26, 2020
acdbb94
remove bundles after 1.0.0-prerelease.56 tag
kylebuch8 Aug 26, 2020
135fc98
prerelease 56 changelog and docs updates
kylebuch8 Aug 27, 2020
5a2da70
Update CHANGELOG-prerelease.md
castastrophe Aug 27, 2020
f5e53fa
Merge pull request #1060 from patternfly/release/v1.0.0-prerelease.56
kylebuch8 Aug 27, 2020
4cda080
feat: Add start to dev command; open to specific demo page (#1008)
castastrophe Sep 3, 2020
04c9d77
chore: extend prettier line length 120 #967 (#1092)
wesruv Sep 11, 2020
0354352
feat: Open a PR via command line (#932)
castastrophe Sep 11, 2020
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
  •  
  •  
  •  
7 changes: 4 additions & 3 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: automerge
name: Automerge PR
on:
pull_request:
types: [labeled, unlabeled, synchronize, edited, unlocked]
Expand All @@ -8,10 +8,11 @@ on:
types: [completed]
status: success
jobs:
automerge:
try_to_merge:
if: contains(github.event.pull_request.labels.*.name, 'ready to merge')
runs-on: ubuntu-latest
steps:
- name: automerge
- name: Try to automerge PR ${{ github.event.number }}
uses: "pascalgn/automerge-action@4536e8847eb62fe2f0ee52c8fa92d17aa97f932f"
env:
GITHUB_TOKEN: "${{ secrets.ACTIONS }}"
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/visualtests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Visual regression testing
on:
workflow_dispatch:
pull_request:
types: [labeled]
env:
BROWSERSTACK_KEY: ${{ secrets.BROWSERSTACK_KEY }}
BROWSERSTACK_USER: ${{ secrets.BROWSERSTACK_USER }}
jobs:
visual_regression_tests:
if: github.event.inputs.manual == true || contains(github.event.pull_request.labels.*.name, 'ready to merge') || contains(github.event.pull_request.labels.*.name, 'run e2e')
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- name: BrowserStackLocal env setup
uses: "browserstack/github-actions/setup-env@master"
with:
username: ${{ secrets.BROWSERSTACK_USER }}
access-key: ${{ secrets.BROWSERSTACK_KEY }}
build-name: BUILD_INFO
project-name: REPO_NAME

- uses: actions/checkout@v2

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- name: Start BrowserStackLocal
uses: "browserstack/github-actions/setup-local@master"
with:
local-testing: start
local-identifier: random
# local-logging-level: all-logs

- name: Install Dependencies
run: npm install

- name: Build
run: npm run build

- name: Visual regression tests
run: npm run e2e -- --verbose

- name: Stop BrowserStackLocal
uses: "browserstack/github-actions/setup-local@master"
with:
local-testing: stop
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Development files
node_modules
tmp
.tmp

# Generator config file
project.conf.json
Expand All @@ -16,6 +17,7 @@ doc/index.html
# Logs
lerna-debug.log
npm-debug.log*
local.log

# Local files
.env
Expand Down
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ os:
addons:
firefox: latest
chrome: stable
browserstack:
username: BROWSERSTACK_USER
access_key: BROWSERSTACK_KEY
script:
- npm test -- --verbose
# - npm run e2e -- --verbose
cache:
directories:
- node_modules
Expand Down
58 changes: 42 additions & 16 deletions CHANGELOG-prerelease.md

Large diffs are not rendered by default.

23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ Many commands have an optional argument of space-separated component name(s), if
### Compile

```shell
# Run, watch, and build all components
# Build and watch all components, run the server to preview demo pages
npm run dev

# Run, watch, and build one or more component(s)
# Build and watch on one or more components, run the server to preview demo pages
npm run dev [component-name(s)]
```

Expand All @@ -59,28 +59,35 @@ npm start

# Runs storybook preview tool
npm run storybook

# Runs build and server (but doesn't watch)
npm run demo
```

### Compile & Preview

```shell
# Runs build, watch, and server processes
# Runs build and server (but doesn't watch)
npm run demo [component-name(s)]

# Runs build, watch, and server processes, both demo pages and storybook
npm run live-demo [component-name(s)]
```

### Testing

```shell
# Run tests on all components
# Build and run tests on all components
npm run test

# Run tests on one component
# Build and run tests on one component
npm run test [component-name(s)]
```

### Open a new pull request

```shell
# Open a new pull request
npm run pr
```

## Support

Though we have tested and verified general usability within these frameworks, PFE makes no guarantees about compatibility within specific sites & applications. Please test accordingly. For more details, check out the [official status card per component](https://github.com/patternfly/patternfly-elements/issues?q=is%3Aopen+is%3Aissue+label%3A%22status+tracking+only%22) or visit the [status page on the documentation site](https://patternfly.github.io/patternfly-elements/getting-started/component-status/).
Expand Down
6 changes: 3 additions & 3 deletions docs/content/theme/color-palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ And finally, you’ll have colors for states such as error, warning, and success

```css
:root {
--pfe-color--feedback--critical: $pfe-color--red-600 !default;
--pfe-color--feedback--critical--lightest: $pfe-color--red-50 !default;
--pfe-color--feedback--critical--darkest: $pfe-color--red-800 !default;
--pfe-color--feedback--critical: $pf-color-red-200 !default;
--pfe-color--feedback--critical--lightest: $pf-color-red-50 !default;
--pfe-color--feedback--critical--darkest: $pf-color-red-400 !default;
}
```
2 changes: 1 addition & 1 deletion docs/layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<!-- Convert to a partial -->
<nav id="main-toc">
<section class="inner-toc">
<span class="label big" style="margin-bottom: 1.5rem;">Version 1.0.0-prerelease.53</span>
<span class="label big" style="margin-bottom: 1.5rem;">Version 1.0.0-prerelease.56</span>

<h3><a href="/getting-started">Getting Started</a></h3>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion docs/layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<!-- Convert to a partial -->
<nav id="main-toc">
<section class="inner-toc">
<span class="label big" style="margin-bottom: 1.5rem;">Version 1.0.0-prerelease.53</span>
<span class="label big" style="margin-bottom: 1.5rem;">Version 1.0.0-prerelease.56</span>

<h3><a href="/getting-started">Getting Started</a></h3>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion docs/layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<!-- Convert to a partial -->
<nav id="mobile-toc" class="hide">
<section class="inner-toc">
<span class="label big" style="margin-bottom: 1.5rem;">Version 1.0.0-prerelease.53</span>
<span class="label big" style="margin-bottom: 1.5rem;">Version 1.0.0-prerelease.56</span>

<h3><a href="/getting-started">Getting Started</a></h3>
<ul>
Expand Down
8 changes: 4 additions & 4 deletions elements/pfe-accordion/demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
<link rel="stylesheet" href="../../pfe-styles/dist/pfe-layouts.css" />

<!-- uncomment the es5-adapter if you're using the umd version -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/2.3.0/custom-elements-es5-adapter.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/2.3.0/webcomponents-bundle.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.5/require.min.js"></script>
<script src="/examples/node_modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js"></script>
<script src="/examples/node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js"></script>
<script src="/examples/node_modules/requirejs/require.js"></script>

<script>require([
'../dist/pfe-accordion.umd.js',
Expand Down Expand Up @@ -105,7 +105,7 @@ <h2>Accordion component</h2>
</header>
<article>
<pfe-accordion>
<pfe-accordion-header>
<pfe-accordion-header id="first-header">
<h3>Nested panel example</h3>
</pfe-accordion-header>
<pfe-accordion-panel>
Expand Down
12 changes: 2 additions & 10 deletions elements/pfe-accordion/demo/pfe-accordion.story.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,12 @@ stories.add(PfeAccordion.tag, () => {
});

// Ask user if they want to add any custom content
const customContent = storybookBridge.boolean(
"Use custom content?",
false,
"Content"
);
const customContent = storybookBridge.boolean("Use custom content?", false, "Content");

// Let the user customize the header + panel set
if (customContent) {
for (let i = 0; i < accordionCount; i++) {
headings[i] = storybookBridge.text(
`Heading ${i + 1}`,
"",
"accordion-set"
);
headings[i] = storybookBridge.text(`Heading ${i + 1}`, "", "accordion-set");
panels[i] = storybookBridge.text(`Panel ${i + 1}`, "", "accordion-set");
}
}
Expand Down
2 changes: 1 addition & 1 deletion elements/pfe-accordion/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions elements/pfe-accordion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"pfe-accordion-panel.js"
]
},
"version": "1.0.0-prerelease.54",
"version": "1.0.0-prerelease.56",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -50,10 +50,10 @@
],
"license": "MIT",
"dependencies": {
"@patternfly/pfelement": "^1.0.0-prerelease.51"
"@patternfly/pfelement": "^1.0.0-prerelease.56"
},
"devDependencies": {
"@patternfly/pfe-sass": "^1.0.0-prerelease.54"
"@patternfly/pfe-sass": "^1.0.0-prerelease.56"
},
"generator-pfelement-version": "0.5.5",
"bugs": {
Expand Down
39 changes: 10 additions & 29 deletions elements/pfe-accordion/src/pfe-accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,11 @@ class PfeAccordion extends PFElement {

if (attr === "pfe-disclosure") {
if (newVal === "true") {
this._allHeaders().forEach(header =>
header.setAttribute("pfe-disclosure", "true")
);
this._allPanels().forEach(panel =>
panel.setAttribute("pfe-disclosure", "true")
);
this._allHeaders().forEach(header => header.setAttribute("pfe-disclosure", "true"));
this._allPanels().forEach(panel => panel.setAttribute("pfe-disclosure", "true"));
} else {
this._allHeaders().forEach(header =>
header.setAttribute("pfe-disclosure", "false")
);
this._allPanels().forEach(panel =>
panel.setAttribute("pfe-disclosure", "false")
);
this._allHeaders().forEach(header => header.setAttribute("pfe-disclosure", "false"));
this._allPanels().forEach(panel => panel.setAttribute("pfe-disclosure", "false"));
}
}
}
Expand Down Expand Up @@ -180,10 +172,7 @@ class PfeAccordion extends PFElement {
});

if (headers.length === 1) {
if (
this.hasAttribute("pfe-disclosure") &&
this.getAttribute("pfe-disclosure") === "false"
) {
if (this.hasAttribute("pfe-disclosure") && this.getAttribute("pfe-disclosure") === "false") {
return;
}

Expand Down Expand Up @@ -222,9 +211,7 @@ class PfeAccordion extends PFElement {

_expandPanel(panel) {
if (!panel) {
console.error(
`${PfeAccordion.tag}: Trying to expand a panel that doesn't exist`
);
console.error(`${PfeAccordion.tag}: Trying to expand a panel that doesn't exist`);
return;
}

Expand All @@ -244,9 +231,7 @@ class PfeAccordion extends PFElement {

_collapsePanel(panel) {
if (!panel) {
console.error(
`${PfeAccordion.tag}: Trying to collapse a panel that doesn't exist`
);
console.error(`${PfeAccordion.tag}: Trying to collapse a panel that doesn't exist`);
return;
}

Expand Down Expand Up @@ -339,9 +324,7 @@ class PfeAccordion extends PFElement {
}

if (next.tagName.toLowerCase() !== PfeAccordionPanel.tag) {
console.error(
`${PfeAccordion.tag}: Sibling element to a header needs to be a panel`
);
console.error(`${PfeAccordion.tag}: Sibling element to a header needs to be a panel`);
return;
}

Expand All @@ -350,15 +333,13 @@ class PfeAccordion extends PFElement {

_previousHeader() {
const headers = this._allHeaders();
let newIndex =
headers.findIndex(header => header === document.activeElement) - 1;
let newIndex = headers.findIndex(header => header === document.activeElement) - 1;
return headers[(newIndex + headers.length) % headers.length];
}

_nextHeader() {
const headers = this._allHeaders();
let newIndex =
headers.findIndex(header => header === document.activeElement) + 1;
let newIndex = headers.findIndex(header => header === document.activeElement) + 1;
return headers[newIndex % headers.length];
}

Expand Down
4 changes: 3 additions & 1 deletion elements/pfe-accordion/test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
<script>
// Load and run all tests (.html, .js):
WCT.loadSuites([
'pfe-accordion_test.html'
'pfe-accordion_test.html',
'pfe-accordion_react_test.html',
'pfe-accordion_vue_test.html'
]);
</script>

Expand Down
Loading