Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

[terra-core-docs] Introducing terra-core-docs #3431

Merged
merged 8 commits into from
May 4, 2021
Merged

Conversation

mjhenkes
Copy link
Contributor

Summary

This PR introduces the terra-core-docs package and migrates doc and test pages from terra-action-footer and terra-action-header.

Goals:

  1. Allow terra doc to be written using all terra components in examples.
  2. Minimize package dependencies by removing doc only dependencies
  3. Do not require a release of a component for doc updates.

Considerations:

  1. The url for the tests/doc will change
  2. Higher possibility for merge conflicts between projects.
  3. SRC still needs to be included in the released package for props table to function.
  4. Harder to delist a specific doc in terra-ui since we pull in a single package for terra-core docs.

Closes #

Deployment Link

https://terra-core-deployed-pr-#.herokuapp.com/

Testing

Additional Details

Thank you for contributing to Terra.
@cerner/terra

Comment on lines -31 to -33
"terra-button": "^3.55.0",
"terra-hyperlink": "^2.47.0",
"terra-spacer": "^3.54.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This right here is awesome, fewer dependencies, smaller component footprints.

"precompile": "rm -rf lib"
},
"dependencies": {
"terra-action-footer": "^2.60.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

i don't need all these dependencies for this package out of the gate, but we will need them all once we've migrated. These are just dependencies from terra-core but we can easily add any terra dependencies here.

@mjhenkes mjhenkes temporarily deployed to terra-core-terra-core-d-uzbq7m April 30, 2021 15:33 Inactive
@mjhenkes mjhenkes temporarily deployed to terra-core-terra-core-d-uzbq7m April 30, 2021 15:35 Inactive
@mjhenkes mjhenkes temporarily deployed to terra-core-terra-core-d-uzbq7m April 30, 2021 15:45 Inactive
@mjhenkes mjhenkes temporarily deployed to terra-core-terra-core-d-uzbq7m April 30, 2021 16:22 Inactive
@mjhenkes mjhenkes temporarily deployed to terra-core-terra-core-d-uzbq7m April 30, 2021 16:37 Inactive
@@ -40,7 +40,7 @@
"clean:obsolete-snapshots": "npm test -- -u",
"create-props-markdown": "node scripts/props-table-gen/generatePropsTables.js",
"compile": "npm run compile:clean && npm run compile:build",
"compile:build": "lerna ls | sed 's/@cerner\\///g' | cut -d ' ' -f1 | xargs -I {} babel packages/{}/src --out-dir packages/{}/lib --copy-files",
"compile:build": "lerna ls -a | sed 's/@cerner\\///g' | cut -d ' ' -f1 | xargs -I {} babel packages/{}/src --out-dir packages/{}/lib --copy-files",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this change will allow lerna ls to pickup private packages, which we want for compiling. we just don't want to release it yet.

@@ -1,30 +1,30 @@
Terra.describeViewports('ActionFooter', ['small', 'medium'], () => {
it('displays ActionFooter with multiple end actions', () => {
browser.url('/#/raw/tests/terra-action-footer/action-footer/multiple-end-action-footer');
browser.url('/raw/tests/terra-core-docs/action-footer/multiple-end-action-footer');
Copy link
Contributor

Choose a reason for hiding this comment

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

Since tests are shipped with the component, does this mean terra-core-docs is expected to be installed for testing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you'd need to yes, but i think we should discontinue the practice of shipping tests with components.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had considered moving the wdio tests to the docs package as well, but I ended up not wanting to mess with how we currently can run just the tests for a specific package.

Co-authored-by: Ben Cai <bcai@cerner.com>
@mjhenkes mjhenkes temporarily deployed to terra-core-terra-core-d-uzbq7m May 3, 2021 20:31 Inactive
@@ -0,0 +1,6 @@
import { Badge } from 'terra-action-header/package.json?dev-site-package';
Copy link
Contributor

@benbcai benbcai May 3, 2021

Choose a reason for hiding this comment

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

Not sure why this ChangeLog.3.dooc.mdx file shows up as a new file being added. I would think it should be shown as a file that is just moved to a different location similar to https://github.com/cerner/terra-core/pull/3431/files#diff-3ed4d041ad6d8833ce057565742867826eec7fef430f2f612042149c25337704?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah it was moved, but i changed it just enough for git to not want to mark it as moved.

Copy link
Contributor

@yuderekyu yuderekyu left a comment

Choose a reason for hiding this comment

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

I like the switch to absolute paths 👍🏼

@mjhenkes mjhenkes temporarily deployed to terra-core-terra-core-d-uzbq7m May 4, 2021 13:45 Inactive
@mjhenkes mjhenkes merged commit 8cdd992 into main May 4, 2021
@mjhenkes mjhenkes deleted the terra-core-docs branch May 4, 2021 16:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants