-
Notifications
You must be signed in to change notification settings - Fork 72
Conversation
packages/terra-table/package.json
Outdated
"keycode-js": "^3.1.0", | ||
"prop-types": "^15.5.8", | ||
"resize-observer-polyfill": "^1.4.1", | ||
"terra-content-container": "^3.39.1", |
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.
We are not using a Terra ContentContainer component in the Terra Table project that I can see.
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.
Removed.
packages/terra-table/package.json
Outdated
"resize-observer-polyfill": "^1.4.1", | ||
"terra-content-container": "^3.39.1", | ||
"terra-icon": "^3.54.0", | ||
"terra-mixins": "^1.40.0", |
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.
Are we using terra-mixins in this project? If not, it should not be a dependency.
packages/terra-table/package.json
Outdated
"name": "terra-table", | ||
"main": "lib/index.js", | ||
"version": "4.36.0", | ||
"description": "The terra-table component provides user a way to render selectable data in a tabular format", |
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.
I don't think that the description should mention selectable data since this is the Table component. That would be the purpose of a grid not a table.
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.
Updated the description.
{ | ||
"name": "terra-table", | ||
"main": "lib/index.js", | ||
"version": "4.36.0", |
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.
I thought we were doing a major version bump with this update.
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.
This will be automatically updated once we do the release.
packages/terra-table/package.json
Outdated
"name": "terra-table", | ||
"main": "lib/index.js", | ||
"version": "4.36.0", | ||
"description": "The terra-table component provides user a way to render selectable data in a tabular format", |
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.
Should this be "The Terra Table component ..."
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.
Updated the description.
"Table", | ||
"UI" | ||
], | ||
"author": "Cerner Corporation", |
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.
Should this be Oracle instead of Cerner?
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.
We haven't been given guidance on changing this but if this needs to be changed, we can probably go ahead do it and and update the rest of the packages in a separate PR.
packages/terra-table/package.json
Outdated
"react-intl": "2 || 3 || 4 || 5" | ||
}, | ||
"dependencies": { | ||
"@cerner/terra-docs": "^1.9.0", |
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.
I don't believe that terra-docs should be a dependency. At most it is a devDependency, if needed.
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.
I don't think it should be needed at all.
"terra-theme-context": "^1.0.0", | ||
"terra-visually-hidden-text": "^2.36.0" |
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.
Should our Terra components be peer and dev dependencies?
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.
I think for now since this is used directly in Cell.jsx
(until we remove the cell dive logic) that we should probably keep this as a dependency. Once the Cell Dive logic is removed we could probably remove this package altogether.
packages/terra-table/CHANGELOG.md
Outdated
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.
Is this the correct changelog? We won't have this release history in this repository, correct?
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.
It will still point to the same package on NPM, so the version history is still valid for the doc site and npm page.
@@ -0,0 +1,13 @@ | |||
Copyright 2017 - 2019 Cerner Innovation, Inc. |
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.
Is this correct now that we are Oracle?
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.
We should update the year at least.
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.
You can use depcheck to find and remove unused dependencies.
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.
Done.
|
||
## Table Props | ||
|
||
<TablePropsTable /> |
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.
Your examples should not have the property table for the Terra Table or its dependencies. That would be part of the main About document.
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.
Removed from all examples.
You should have a separate example for the Default Terra Table based on similar component strategies. |
it('Validates the default table is not interactable', () => { | ||
browser.url('/raw/tests/cerner-terra-framework-docs/table/no-interaction-table'); | ||
browser.keys(['Tab']); | ||
$('#focused-button').isFocused(); |
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.
You should be doing an expect on this, right? This code does not actually validate that this button is focused.
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.
Fixed.
…r default table. Remove obsolete packages. Fix wdio test.
@kenk2 It was hard to fully verify this for accessibility and functionally based on how early in the development of Table we are. Functionally with what was there looked good, my only issue was not being able to scroll the examples via keyboard that as you mentioned that is addressed via UXPLATFORM-9729. I feel like it's too early to fully perform accessibility test so I went ahead removed those labels. I did try testing it with Jaws. One issue I will call out that I encountered is the values of each cell are being communicated as 1 value rather than 3 values. For example, the Default Table example the Heart Rate Monitor row has values 68, 66, and 67 the screen reader will read it as 686,667. If you think this is unexpected at this point and we can explore how best to account for this, whether it's a part of this story or I create a new story specifically to get the AT stuff ironed out. |
@chrismichalewicz I think for now given how early everything is, we can create another story to get the screen reader functionality up to par. |
I would not expect the screen reader to be off in the initial release. We don't have this issue in the DataGrid, right? |
|
||
# Terra Table | ||
|
||
Terra Table is a structural component used to create data tables. Table provides means to handle row selection and hooks for sortable columns. |
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.
Terra Table is a structural component used to create data tables. Table provides means to handle row selection and hooks for sortable columns. | |
Terra Table is a structural component used to display tabular data. Table provides means to handle row selection and hooks for sortable columns. |
{ content: '' }, | ||
{ content: 'Quinzell, Harleen' }, | ||
{ content: '' }, | ||
{ isMasked: true }, |
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.
Table examples shouldn't include masked cells. That feature should only be advertised for Worklist Data Grid unless a need for masking in ordinary tables is established.
{ id: 'Column-7', displayName: 'Patient Age' }, | ||
{ id: 'Column-8', displayName: 'Medication History' }, | ||
{ id: 'Column-9', displayName: 'My Relationship' }, | ||
{ id: 'Column-10', displayName: 'Not Selectable' }, |
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.
Selectable/Not selectable isn't a feature of table and shouldn't be in the examples. I know this data is likely to change anyway to reflect typical use for a table, but better to catch this early.
isSelectable: false, | ||
isMasked: false, |
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.
Not needed
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.
Why would consumers not be able to mask a cell for a Terra Table? That should not break any accessibility, right?
/** | ||
* Boolean indicating if cell contents are masked. | ||
*/ | ||
isMasked: PropTypes.bool, | ||
|
||
/** | ||
* Boolean value indicating whether or not the column header is selectable. | ||
*/ | ||
isSelectable: PropTypes.bool, | ||
|
||
/** | ||
* Boolean indicating whether the Cell is currently selected. | ||
*/ | ||
isSelected: PropTypes.bool, |
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.
Not needed
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.
We need this prop for grid support. The subcomponents are reused.
isMasked: PropTypes.bool, | ||
/** | ||
* Boolean value indicating whether or not the column header is selectable. | ||
*/ | ||
isSelectable: PropTypes.bool, | ||
/** | ||
* Boolean value indicating whether or not the cell should render as selected. | ||
*/ | ||
isSelected: PropTypes.bool, |
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.
Not needed
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.
This will be needed because it is reused by the grid components. However, we do not have to publicize in the Table API documentation.
I agree with this statement. "onCellSelect" should not be part of the "public API". I am not certain removing masked cells is necessary though. If a team desires to use it for some reason, it would still be accessible. |
…table examples. Private grid-only props in cell shape.
Summary
What was changed:
Migrate New Terra Table to Framework from feature branch in Terra Core.
Why it was changed:
We want the Terra Table package to live inside Terra Framework as it will be consumed by Data Grid.
Testing
This change was tested using:
Reviews
In addition to engineering reviews, this PR needs:
Additional Details
This PR resolves:
UXPLATFORM-9540
Thank you for contributing to Terra.
@cerner/terra