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
fix(demo): add empty and loading state table demos #2254
Merged
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e8196dd
fix(demo): add empty and loading state table demos
mcoker 29a0c8f
refactor(demo): update table loading state demo to use empty state
mcoker 9e4b9a0
fix(table): add pf-m-height-auto modifier for table rows
mcoker c58372c
Update src/patternfly/demos/Table/examples/table-loading-demo.hbs
mcoker 285422d
Update src/patternfly/demos/Table/table-loading-table.hbs
mcoker 1b0acb3
Update src/patternfly/demos/Table/examples/table-empty-state-demo.hbs
mcoker 0e0655b
Update src/patternfly/demos/Table/table-loading-table.hbs
mcoker File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
{{#if @partial-block}} | ||
<div class="pf-c-empty-state__icon{{#if empty-state-icon--modifier}} {{empty-state-icon--modifier}}{{/if}}" | ||
{{#if empty-state-icon--attribute}} | ||
{{{empty-state-icon--attribute}}} | ||
{{/if}}> | ||
{{> @partial-block}} | ||
</div> | ||
{{else}} | ||
<i class="fas fa-{{#if empty-state-icon--type}} fa-{{empty-state-icon--type}}{{else}}cubes{{/if}} pf-c-empty-state__icon{{#if empty-state-icon--modifier}} {{empty-state-icon--modifier}}{{/if}}" | ||
aria-hidden="true" | ||
{{#if empty-state-icon--attribute}} | ||
{{{empty-state-icon--attribute}}} | ||
{{/if}}></i> | ||
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<div class="pf-c-empty-state__primary{{#if empty-state-primary--modifier}} {{empty-state-primary--modifier}}{{/if}}" | ||
{{#if empty-state-primary--attribute}} | ||
{{{empty-state-primary--attribute}}} | ||
{{/if}}> | ||
{{> @partial-block}} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/patternfly/components/EmptyState/examples/empty-state-primary-example.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{{#> empty-state}} | ||
{{#> empty-state-icon}}{{/empty-state-icon}} | ||
{{#> title titleType="h1" title--modifier="pf-m-lg"}} | ||
Empty State | ||
{{/title}} | ||
{{#> empty-state-body}} | ||
This represents an the empty state pattern in PatternFly 4. Hopefully it's simple enough to use but flexible enough to meet a variety of needs. | ||
{{/empty-state-body}} | ||
{{#> empty-state-primary}} | ||
{{#> button button--modifier="pf-m-link"}} | ||
Action buttons | ||
{{/button}} | ||
{{/empty-state-primary}} | ||
{{/empty-state}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/patternfly/demos/Table/examples/table-empty-state-demo.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{{#> page page--id="page-layout-table-simple"}} | ||
mcoker marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{{#> skip-to-content skip-to-content--attribute=(concat 'href="#main-content-' page--id '"')}} | ||
Skip to content | ||
{{/skip-to-content}} | ||
{{#> page-header}} | ||
{{> table-page-header}} | ||
{{/page-header}} | ||
{{#> page-sidebar page-sidebar--modifier="pf-m-dark"}} | ||
{{> table-page-nav}} | ||
{{/page-sidebar}} | ||
{{#> page-main page-main--attribute=(concat 'id="main-content-' page--id '"')}} | ||
{{#> page-main-nav}} | ||
{{> table-main-section-nav}} | ||
{{/page-main-nav}} | ||
{{#> page-main-section page-main-section--modifier="pf-m-light"}} | ||
{{> table-main-section-content}} | ||
{{/page-main-section}} | ||
{{#> page-main-section page-main-section--modifier="pf-m-no-padding-mobile"}} | ||
{{#> card}} | ||
{{> table-toolbar}} | ||
{{> table-empty-state-table}} | ||
{{> table-pagination}} | ||
{{/card}} | ||
{{/page-main-section}} | ||
{{/page-main}} | ||
{{/page}} |
26 changes: 26 additions & 0 deletions
26
src/patternfly/demos/Table/examples/table-loading-demo.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{{#> page page--id="page-layout-table-simple"}} | ||
mcoker marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{{#> skip-to-content skip-to-content--attribute=(concat 'href="#main-content-' page--id '"')}} | ||
Skip to content | ||
{{/skip-to-content}} | ||
{{#> page-header}} | ||
{{> table-page-header}} | ||
{{/page-header}} | ||
{{#> page-sidebar page-sidebar--modifier="pf-m-dark"}} | ||
{{> table-page-nav}} | ||
{{/page-sidebar}} | ||
{{#> page-main page-main--attribute=(concat 'id="main-content-' page--id '"')}} | ||
{{#> page-main-nav}} | ||
{{> table-main-section-nav}} | ||
{{/page-main-nav}} | ||
{{#> page-main-section page-main-section--modifier="pf-m-light"}} | ||
{{> table-main-section-content}} | ||
{{/page-main-section}} | ||
{{#> page-main-section page-main-section--modifier="pf-m-no-padding-mobile"}} | ||
{{#> card}} | ||
{{> table-toolbar}} | ||
{{> table-loading-table}} | ||
{{> table-pagination}} | ||
{{/card}} | ||
{{/page-main-section}} | ||
{{/page-main}} | ||
{{/page}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{{#> table table--id="empty-state-table-demo" table--grid="true" table--modifier="pf-m-grid-xl" table--attribute='aria-label="This is a table showing an empty state"'}} | ||
{{#> table-thead}} | ||
{{#> table-tr}} | ||
{{#> table-td table-td--check="true"}} | ||
<input type="checkbox" name="check-all" aria-label="Select all rows"> | ||
{{/table-td}} | ||
{{#> table-th table-th--attribute='scope="col"'}} | ||
Repositories | ||
{{/table-th}} | ||
{{#> table-th table-th--attribute='scope="col"'}} | ||
Branches | ||
{{/table-th}} | ||
{{#> table-th table-th--attribute='scope="col"'}} | ||
Pull requests | ||
{{/table-th}} | ||
{{#> table-th table-th--attribute='scope="col"'}} | ||
Workspaces | ||
{{/table-th}} | ||
{{#> table-th table-th--attribute='scope="col"'}} | ||
Last commit | ||
{{/table-th}} | ||
{{#> table-td}}{{/table-td}} | ||
{{#> table-td}}{{/table-td}} | ||
{{/table-tr}} | ||
{{/table-thead}} | ||
|
||
{{#> table-tbody}} | ||
{{#> table-tr table-tr--modifier="pf-m-height-auto"}} | ||
{{#> table-td table-td--attribute='colspan="8"'}} | ||
{{#> bullseye}} | ||
{{#> empty-state empty-state--modifier="pf-m-sm"}} | ||
{{#> empty-state-icon empty-state-icon--type="search"}}{{/empty-state-icon}} | ||
{{#> title titleType="h2" title--modifier="pf-m-lg"}} | ||
No results found | ||
{{/title}} | ||
{{#> empty-state-body}} | ||
No results match the filter criteria. Remove all filters or clear all filters to show results. | ||
{{/empty-state-body}} | ||
{{#> empty-state-primary}} | ||
{{#> button button--modifier="pf-m-link"}} | ||
Clear all filters | ||
{{/button}} | ||
{{/empty-state-primary}} | ||
{{/empty-state}} | ||
{{/bullseye}} | ||
{{/table-td}} | ||
{{/table-tr}} | ||
{{/table-tbody}} | ||
{{/table}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{{#> table table--id="empty-loading-demo" table--grid="true" table--modifier="pf-m-grid-xl" table--attribute='aria-label="This is a table showing a loading state"'}} | ||
mcoker marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{{#> table-thead}} | ||
{{#> table-tr}} | ||
{{#> table-td table-td--check="true"}} | ||
<input type="checkbox" name="check-all" aria-label="Select all rows"> | ||
{{/table-td}} | ||
{{#> table-th table-th--attribute='scope="col"'}} | ||
Repositories | ||
{{/table-th}} | ||
{{#> table-th table-th--attribute='scope="col"'}} | ||
Branches | ||
{{/table-th}} | ||
{{#> table-th table-th--attribute='scope="col"'}} | ||
Pull requests | ||
{{/table-th}} | ||
{{#> table-th table-th--attribute='scope="col"'}} | ||
Workspaces | ||
{{/table-th}} | ||
{{#> table-th table-th--attribute='scope="col"'}} | ||
Last commit | ||
{{/table-th}} | ||
{{#> table-td}}{{/table-td}} | ||
{{#> table-td}}{{/table-td}} | ||
{{/table-tr}} | ||
{{/table-thead}} | ||
|
||
{{#> table-tbody}} | ||
{{#> table-tr table-tr--modifier="pf-m-height-auto"}} | ||
{{#> table-td table-td--attribute='colspan="8"'}} | ||
{{#> bullseye}} | ||
{{#> empty-state empty-state--modifier="pf-m-sm"}} | ||
{{#> empty-state-icon}} | ||
{{#> spinner}}{{/spinner}} | ||
mcoker marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{{/empty-state-icon}} | ||
{{#> title titleType="h2" title--modifier="pf-m-lg"}} | ||
No results found | ||
{{/title}} | ||
{{/empty-state}} | ||
{{/bullseye}} | ||
{{/table-td}} | ||
{{/table-tr}} | ||
{{/table-tbody}} | ||
{{/table}} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥