FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Inline edit for Table by seanforyou23 · Pull Request #3581 · patternfly/patternfly-react · GitHub

Inline edit for Table - #3581

Merged
tlabaj merged 1 commit into
patternfly:masterfrom
seanforyou23:inline-edit
Feb 14, 2020
Merged

Inline edit for Table#3581
tlabaj merged 1 commit into
patternfly:masterfrom
seanforyou23:inline-edit

Conversation

seanforyou23 commented Jan 24, 2020
edited
Loading

Copy link
Copy Markdown
Contributor

What: This PR adds row-level inline edit feature and supporting tests to react-table and react-integration packages. It also fixes an issue where rows used non-unique react keys by default and a type issue in RowWrapper, along with some other type enhancements that (hopefully) don't introduce any breaking changes. We've also added a row-level validation hook which can be used to apply arbitrary rulesets for any given row as defined by the user. This validation hook only runs on submission of the row edit, not onChange of the individual inputs, there are plans to add validation onBlur in a future effort.

Should help close #3367 #2679 #3357 and #3058

patternfly-build commented Jan 24, 2020
edited
Loading

Copy link
Copy Markdown
Collaborator

codecov-io commented Jan 24, 2020
edited
Loading

Copy link
Copy Markdown

Codecov Report

Merging #3581 into master will decrease coverage by 0.39%.
The diff coverage is 39.81%.

@@            Coverage Diff            @@
##           master    #3581     +/-   ##
=========================================
- Coverage   71.29%   70.89%   -0.4%     
=========================================
  Files         782      782             
  Lines       10527    10599     +72     
  Branches     2279     2299     +20     
=========================================
+ Hits         7505     7514      +9     
- Misses       2596     2654     +58     
- Partials      426      431      +5
Flag Coverage Δ
#misc 95.45% <ø> (ø) ⬆️
#patternfly3 85.89% <ø> (ø) ⬆️
#patternfly4 59.75% <39.81%> (-0.57%) ⬇️
Impacted Files Coverage Δ
...ly-4/react-table/src/components/Table/BodyCell.tsx 80% <ø> (ø) ⬆️
...-table/src/components/Table/utils/transformers.tsx 100% <ø> (ø) ⬆️
...react-table/src/components/Table/base/body-row.tsx 45.45% <ø> (ø) ⬆️
...ernfly-4/react-table/src/components/Table/Body.tsx 79.54% <100%> (+0.97%) ⬆️
...-4/react-table/src/components/Table/RowWrapper.tsx 65.62% <100%> (+1.1%) ⬆️
...rnfly-4/react-table/src/test-helpers/data-sets.tsx 81.25% <100%> (+31.25%) ⬆️
...t-table/src/components/Table/utils/headerUtils.tsx 96.22% <100%> (+0.14%) ⬆️
...-4/react-table/src/components/Table/EditColumn.tsx 42.85% <42.85%> (ø)
...src/components/Table/utils/decorators/editable.tsx 43.33% <43.33%> (ø)
...ct-table/src/components/Table/EditableTextCell.tsx 50% <50%> (ø)
... and 41 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9911480...6761de2. Read the comment docs.

mcarrano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I did not test extensively, but from what I can see, the behavior looks good @seanforyou23 There was just one visual thing I'm questioning. Why doesn't the edit (pencil) icon align vertically with the kabob in the normal state?

Also, I think the example would make more sense if all of the rows were initialized to non-edit state since that's normally how the table would be presented. A user could then click the edit icon to place any or all rows into edit mode.

mattnolting previously approved these changes Jan 24, 2020

mattnolting left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM! Great work @seanforyou23!

tlabaj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

So looking at this

dlabaj previously requested changes Jan 27, 2020

dlabaj left a comment
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Took a look what was done in core... this doesn't seem like it maps easily to a react component. Might want to go back to core to reevaluate the implementation. Seems more like a modifier then a component... or some combination of both.

seanforyou23 force-pushed the inline-edit branch 2 times, most recently from 96e0bf6 to 2801f0b Compare February 4, 2020 18:57

mcarrano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I am still seeing the Edit icon bottom justified in the row. Should be top-justified like the Kabob icon.

dlabrecq left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The edit icon position still appears to be off a bit

seanforyou23 force-pushed the inline-edit branch 2 times, most recently from 001317c to 5e5e7d7 Compare February 13, 2020 19:35
mcarrano previously approved these changes Feb 13, 2020

mcarrano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks great @seanforyou23 !

kmcfaul previously approved these changes Feb 14, 2020
mcarrano previously approved these changes Feb 14, 2020

mcarrano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Still looks good!

mcarrano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

One more time...

tlabaj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

tlabaj dismissed dlabaj’s stale review February 14, 2020 17:53

Comments have been addressed

tlabaj merged commit 498d49f into patternfly:master Feb 14, 2020

Copy link
Copy Markdown
Collaborator

Your changes have been released in:

  • @patternfly/react-catalog-view-extension@1.4.0
  • @patternfly/react-charts@5.3.0
  • @patternfly/react-core@3.140.0
  • @patternfly/react-docs@4.20.0
  • @patternfly/react-inline-edit-extension@2.17.0
  • demo-app-ts@3.24.0
  • @patternfly/react-integration@3.24.0
  • @patternfly/react-styled-system@3.8.0
  • @patternfly/react-styles@3.7.0
  • @patternfly/react-table@2.27.0
  • @patternfly/react-tokens@2.8.0
  • @patternfly/react-topology@2.14.0
  • @patternfly/react-virtualized-extension@1.4.0
  • @patternfly/react-icons@3.15.0

Thanks for your contribution! 🎉

codecov-commenter commented Apr 3, 2026
edited
Loading

Copy link
Copy Markdown

⚠️ Please install the to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 39.81481% with 65 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.96%. Comparing base (4bba16c) to head (6761de2).

Files with missing lines Patch % Lines
...4/react-table/src/components/Table/utils/utils.tsx 9.09% 40 Missing ⚠️
...src/components/Table/utils/decorators/editable.tsx 43.33% 14 Missing and 3 partials ⚠️
...-4/react-table/src/components/Table/EditColumn.tsx 42.85% 4 Missing ⚠️
...ct-table/src/components/Table/EditableTextCell.tsx 50.00% 1 Missing and 1 partial ⚠️
...rnfly-4/react-table/src/components/Table/Table.tsx 60.00% 1 Missing and 1 partial ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files

@@            Coverage Diff             @@
##           master    #3581      +/-   ##
==========================================
- Coverage   71.29%   70.96%   -0.33%     
==========================================
  Files         782      785       +3     
  Lines       10527    10632     +105     
  Branches     2279     2313      +34     
==========================================
+ Hits         7505     7545      +40     
- Misses       2596     2656      +60     
- Partials      426      431       +5     
Flag Coverage Δ
misc 95.45% <ø> (ø)
patternfly3 85.89% <ø> (ø)
patternfly4 59.94% <39.81%> (-0.38%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ernfly-4/react-table/src/components/Table/Body.tsx 79.54% <100.00%> (+0.97%) ⬆️
...ly-4/react-table/src/components/Table/BodyCell.tsx 80.00% <ø> (ø)
...-4/react-table/src/components/Table/RowWrapper.tsx 65.62% <100.00%> (+1.10%) ⬆️
...react-table/src/components/Table/base/body-row.tsx 45.45% <ø> (ø)
...t-table/src/components/Table/utils/headerUtils.tsx 96.22% <100.00%> (+0.14%) ⬆️
...-table/src/components/Table/utils/transformers.tsx 100.00% <ø> (ø)
...rnfly-4/react-table/src/test-helpers/data-sets.tsx 81.25% <100.00%> (+31.25%) ⬆️
...ct-table/src/components/Table/EditableTextCell.tsx 50.00% <50.00%> (ø)
...rnfly-4/react-table/src/components/Table/Table.tsx 67.85% <60.00%> (-1.71%) ⬇️
...-4/react-table/src/components/Table/EditColumn.tsx 42.85% <42.85%> (ø)
... and 2 more

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9911480...6761de2. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This file contains hidden or 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type mismatch in RowWrapper

Back | FazBrowse Home | New Git URL