Skip to content
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

Move Related Table to iot-app-kit #3

Merged
merged 1 commit into from
Nov 19, 2021
Merged

Move Related Table to iot-app-kit #3

merged 1 commit into from
Nov 19, 2021

Conversation

fpauer
Copy link
Contributor

@fpauer fpauer commented Nov 16, 2021

Description of changes:

Move Related Table Component to iot-app-kit

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@fpauer fpauer requested a review from diehbria November 16, 2021 21:44
"singleQuote": true,
"trailingComma": "es5"
},
"eslintConfig": {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should emit all the eslint-config and just utilize what we have in the mono-repo. Goal is to not have every package contain repetive build related stuff

"react-dom": "^16.14.0",
"styled-components": "^5.3.0"
},
"prettier": {
Copy link
Contributor

Choose a reason for hiding this comment

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

can omit prettier config, already have a repo wide prettier config

{
"name": "@iot-app-kit/related-table",
"version": "1.0.0",
"description": "IoT Application Kit core",
Copy link
Contributor

Choose a reason for hiding this comment

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

update description

"@awsui/collection-hooks": "^1.0.0",
"@awsui/components-react": "^3.0.0",
"@awsui/design-tokens": "^3.0.0",
"react": "^16.14.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

could we have a looser declaration of the react peer dep, similar as what's done https://github.com/react-bootstrap/react-bootstrap/blob/master/package.json#L147-L150

};

if (onReady) {
onReady({
Copy link
Contributor

Choose a reason for hiding this comment

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

onReady is called on every render?

);
expect(nodesFiltered.length).toEqual(6);
});
it('sort by name and priority', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

need some line breaks between all these test cases

import { TableProps } from '@awsui/components-react/table';
import { ExpandableTableNodeStatus, ITreeNode, TreeMap, TreeNode } from './TreeNode';

export class TreeUtility {
Copy link
Contributor

Choose a reason for hiding this comment

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

unnecessary class wrapper

if (value1 < value2) {
return -1;
}
// use loose comparison to handle inconsistent data types: https://issues.amazon.com/issues/AWSUI-9232
Copy link
Contributor

Choose a reason for hiding this comment

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

reference to amzn internal documentation, need to remove internal references

const node = new TreeNode({ name: 'Parent' });
node.getChildren().push(childNode);

describe('ButtonWithTreeLines', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

unnecessary describe wrapper - if a developer runs this test suite with jest, the CLI output will already provide the context that these are the 'button with tree lines' test suite, the end effect is all test descriptions are just indented one extra level adding more noise to the developer experience

alwaysExpanded
node={node}
content={content(node)}
onClick={() => jest.fn()}
Copy link
Contributor

Choose a reason for hiding this comment

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

why use jest.fn() here? looks this should just be () => {}

@fpauer fpauer force-pushed the related-table-move branch from 7695874 to ad53a09 Compare November 18, 2021 18:55
@@ -0,0 +1,113 @@
import { TreeLineModes } from './TreeLineModes';
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is TreeLineModes in its own file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Eventually we had some utility functions on this file but as I moved things around, it does not make sense to keep it. I will move it.

@fpauer fpauer force-pushed the related-table-move branch from ad53a09 to 99c486d Compare November 19, 2021 04:18
@fpauer fpauer merged commit e29540e into main Nov 19, 2021
@diehbria diehbria deleted the related-table-move branch May 5, 2022 16:27
sheilaXu pushed a commit that referenced this pull request Sep 23, 2022
* Release 1.2.1 (#85)

* fix: unsubrscribe data provider on component updates

* Release 1.2.1

Co-authored-by: Norbert Nader <nnader@amazon.com>

* fix: resolves #83 (#87)

* fix: resolves #83

* Update index.ts

Co-authored-by: Norbert Nader <nnader@amazon.com>

Co-authored-by: Norbert Nader <Norbert.Nader@gmail.com>
Co-authored-by: Norbert Nader <nnader@amazon.com>
TheEvilDev pushed a commit that referenced this pull request Nov 2, 2022
Co-authored-by: Fernando Pauer <pauerf@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants