-
Notifications
You must be signed in to change notification settings - Fork 72
[terra-folder-tree] Initial component setup #1855
Conversation
d5850bf
to
a435975
Compare
@@ -0,0 +1,3 @@ | |||
{ | |||
"Terra.folder-tree.placeholder": "Placeholder" | |||
} |
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.
nit: no newline.
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.
@@ -0,0 +1,7 @@ | |||
@import '~terra-mixins/lib/Mixins'; |
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.
Do we need Terra mixins?
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 sure, this is just a placeholder file to get started on FolderTree development and the content of this file was copied from the equivalent setup for file path: https://github.com/cerner/terra-framework/pull/1771/files#diff-213a5eefceecea61e9ec5bbdb472d503d5193b21a7f7e655af877752445bd241R1
@@ -0,0 +1,10 @@ | |||
module.exports = { |
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 have noticed that in that and FilePath component we have .eslintrc.js
and jest.config.js
on package level rather than use them from terra-framework level and then use as in older components:
"jest": "jest --config ../../jest.config.js"
"lint:js": "eslint --ext .js,.jsx . --ignore-path ../../.eslintignore"
I was wondering why we switched to that?
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 we are following the pattern established in cerner/terra-toolkit#811, although I'm not sure why we are adding the configs at the package level rather than using the ones at the root level. @sdadn Do you have any insight on this?
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 the idea at the time was to make each package fully independent, so if a package needed a custom config, it will stay within that package. But I can also see that it's overly redundant and results in dozens of duplicate config files. In the last component that got created, @artpark utilized the root level configs (#1771 (comment)). So I'm not opposed to updating the pattern if you guys think using the root configs is cleaner.
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.
Either way works for me. I am just creating a new component set up for Compact Interactive List and was wondering which approach to use, and if separate config - in what cases, hence asked that question. Thank you for taking a look into it!
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 tried removing the package-level .eslintrc.js
and running eslint from the package level, and it errors due to not having an eslint config. I think this is because the root eslint config is defined in the root package.json, so it can't be resolved from the package level?
We could probably define a root-level .eslintrc.js
to fix this; for now I'm going to leave the files as they are so the Folder Tree package can be merged into main, but I'm open to changing this in a future PR.
@@ -524,6 +524,7 @@ exports[`Menu correctly applies the theme context className 1`] = ` | |||
"timeZone": null, | |||
} | |||
} | |||
isTabFocusDisabled={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.
Thank you for taking care of that! Came across the same problem in other PR, glad to see it's taken care of!
Summary
This PR sets up the base terra-folder-tree component to prepare for development on terra-folder-tree.
These changes are based on the Terra File Path changes from #1771.
Testing
This change was tested using:
Reviews
In addition to engineering reviews, this PR needs:
Additional Details
This PR resolves:
UXPLATFORM-9679
Thank you for contributing to Terra.
@cerner/terra