patternfly-elements icon indicating copy to clipboard operation
patternfly-elements copied to clipboard

[NEW] pfe-table component

Open markcaron opened this issue 7 years ago • 20 comments

Using a web component would be a good way to add in all the table goodies we'd need for apps as well as content writers, like:

  • DataTables or something similar for sorting and paging tables
  • TablesawJS for responsive tables
  • Auto-correcting poorly constructed tables, and providing the necessary IDs and headers attributes for accessibility

Could be as simple as

<rh-table responsive sorting paging ...>
  <table>
    ...
  </table>
</rh-table>

Keeping the <table> element inside the lightDOM / slot, we'd ensure that this is enhanced progressively.

markcaron avatar Oct 12 '18 16:10 markcaron

@starryeyez024 Do we still need this issue? Tables are now in the design kit using these specs from PatternFly.

https://www.patternfly.org/v4/documentation/react/components/table/

coreyvickery avatar Jun 19 '20 21:06 coreyvickery

cc @kylebuch8 @markcaron please see Corey's question

starryeyez024 avatar Jun 23 '20 14:06 starryeyez024

@kylebuch8 @markcaron Checking back, do we still need this?

coreyvickery avatar Jun 30 '20 22:06 coreyvickery

https://www.patternfly.org/v4/components/table

castastrophe avatar Feb 05 '21 18:02 castastrophe

@heyMP The kit is using PatternFly's Table component 1:1, but regardless, let me know if you had any questions.

coreyvickery avatar Feb 15 '21 16:02 coreyvickery

Thanks @coreyvickery!

heyMP avatar Feb 15 '21 17:02 heyMP

Just to confirm, we do need a web component for tables - this will allow us to enhance the table with sortability and filters.

castastrophe avatar Apr 27 '21 14:04 castastrophe

We can look here for functionality options: https://www.webcomponents.org/element/HTMLElements/smart-table

castastrophe avatar Apr 27 '21 14:04 castastrophe

PF4 tables include designs for:

general

  • empty state

headers

  • tooltips
  • sortable

rows

  • selectable with checkbox
  • selectable with radio button
  • actions
  • expandable
  • editable
  • favoritable

castastrophe avatar Apr 27 '21 14:04 castastrophe

@coreyvickery cc @ajacobs21e I think we might need designs for:

general

  • pagination (we can use existing pagination designs just want to confirm their relationship and positioning to the table)
  • draggable columns/rows
  • export symbol
  • loading state

headers

  • filters (dropdown)

castastrophe avatar Apr 27 '21 14:04 castastrophe

  • Pagination footer https://www.patternfly.org/v4/components/table/design-guidelines#table-elements
  • Draggable row https://www.patternfly.org/v4/components/data-list#draggable
  • Draggable columns https://www.patternfly.org/v4/components/table/react-demos/#column-management-with-draggable
  • Export symbol https://www.patternfly.org/v4/guidelines/icons#all-icons pf-icon-export
  • Loading state https://www.patternfly.org/v4/components/toolbar/design-guidelines#filter-group
  • Filters https://www.patternfly.org/v4/components/table/react-demos/#filterable or https://www.patternfly.org/v4/components/toolbar/design-guidelines#filter-group

ajacobs21e avatar Apr 27 '21 15:04 ajacobs21e

@castastrophe Let me know if you need to see any designs beyond what Allie has shared.

coreyvickery avatar Apr 28 '21 16:04 coreyvickery

Thanks @ajacobs21e!

Can you help me with where on this page the details of how to manage a loading state for a table is?

Loading state https://www.patternfly.org/v4/components/toolbar/design-guidelines#filter-group

castastrophe avatar Apr 29 '21 15:04 castastrophe

@castastrophe sorry I pasted the wrong link. Are you searching PatternFly.org for these designs? That's how I found all of these. https://www.patternfly.org/v4/components/table/react-demos/#loading

ajacobs21e avatar Apr 29 '21 15:04 ajacobs21e

@ajacobs21e Yup, that's where my list PF4 tables include designs for: above came from.

castastrophe avatar Apr 29 '21 15:04 castastrophe

@ajacobs21e I see however that some of them only exist in the React documentation which is likely why they were difficult to find. I assume because no similar functionality exists for the HTML versions.

castastrophe avatar Apr 29 '21 15:04 castastrophe

Hi,

Is a web components table still on the roadmap for Patternfly? If so, is it being developed and when will it land? Thanks!

andre-lockhart-lab49 avatar Aug 28 '21 15:08 andre-lockhart-lab49

@kylebuch8 @markcaron Should we discuss this in a future meeting? PatternFly has done a lot of work on this component already that we could adopt and turn into a web component for PFE.

coreyvickery avatar Sep 01 '21 17:09 coreyvickery

@coreyvickery, yeah. We should prioritize this component, though we need to determine how we're going to tackle the styling, since there will likely be a majority of it done in the lightDOM. That's a separate discussion from the design, of course.

markcaron avatar Oct 13 '21 18:10 markcaron

@coreyvickery we should bump this in our priority. Perhaps we can check the status cp-table with @rlahoda and/or @wesruv so we can migrate to PFE and then to RHDS.

We'll need rh-table for ux.redhat.com

CC: @bennypowers @heyMP @zeroedin

markcaron avatar Oct 10 '22 19:10 markcaron

We received a request to implement expandable table rows

bennypowers avatar Jul 20 '23 06:07 bennypowers

Closed by #2564. please open new issues for adding more features to pf-table

bennypowers avatar Oct 18 '23 05:10 bennypowers