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

[terra-dev-site] Terra dev site v7 #255

Merged
merged 50 commits into from
Aug 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
2b32c26
first pass
mjhenkes Aug 4, 2021
4c2fc70
remove unsaved changes prompt
mjhenkes Aug 4, 2021
efe7bba
clean up
mjhenkes Aug 4, 2021
bc25baf
Downgrade modals to use modal manager, update doc.
mjhenkes Aug 4, 2021
0458d06
kaiju 404 page
mjhenkes Aug 5, 2021
dc6897c
lint fixes
mjhenkes Aug 5, 2021
7510f1e
some more lint fixes
mjhenkes Aug 9, 2021
2f9bb36
build plz
mjhenkes Aug 9, 2021
7667b8f
Adding side nav button back and overlay.
mjhenkes Aug 10, 2021
3293a2c
temporarily disable eslint false positives
mjhenkes Aug 10, 2021
de0b1f9
translations and theming
mjhenkes Aug 10, 2021
2889f4c
Fix lint
mjhenkes Aug 10, 2021
70f0887
terra-docs translations
mjhenkes Aug 10, 2021
7fd50d4
Updated screenshots
mjhenkes Aug 10, 2021
592e7b5
remove extra whitespace from the end of the codeblocks
mjhenkes Aug 11, 2021
a268df9
Themes and allow for custom app base and app nav
mjhenkes Aug 11, 2021
5c8b2e8
Offer reload button on chuck load failure
mjhenkes Aug 11, 2021
572d402
Re-organized files
mjhenkes Aug 11, 2021
dc8d5cf
updated screenshots
mjhenkes Aug 11, 2021
714dd22
fix link, move up side effect imports
mjhenkes Aug 11, 2021
72e525f
Merge branch 'main' into terra-dev-site-v7
mjhenkes Aug 11, 2021
01ad973
Merge branch 'main' into terra-dev-site-v7
mjhenkes Aug 11, 2021
1cb56ef
Change logs
mjhenkes Aug 11, 2021
8479db3
polyfills
mjhenkes Aug 12, 2021
233988c
fix
mjhenkes Aug 12, 2021
78a555a
test fixes, and other fixes
mjhenkes Aug 12, 2021
8976e98
use the 'isFilterStyle' option for the native select in settings.
mjhenkes Aug 12, 2021
3498c27
Add an faq on sizing
mjhenkes Aug 13, 2021
ae97318
Updated screenshots, added doc for webpack 4 no entry case.
mjhenkes Aug 16, 2021
208dc7e
Apply suggestions from code review
mjhenkes Aug 16, 2021
a475993
Apply suggestions from code review
mjhenkes Aug 16, 2021
25036c5
Update packages/terra-dev-site/README.md
mjhenkes Aug 16, 2021
7080ca7
CR fixes and updates to proptypes
mjhenkes Aug 17, 2021
161846f
Apply suggestions from code review
mjhenkes Aug 17, 2021
808dd45
add in test extension, updates tests
mjhenkes Aug 17, 2021
5aaa5e2
Doc updates
mjhenkes Aug 17, 2021
6c507c9
routing should be case insensitive
mjhenkes Aug 18, 2021
dcd6176
Fix graphs examples, Remove portaling for pages, update portaling for…
mjhenkes Aug 19, 2021
7ddf504
Update packages/terra-application-docs/src/terra-dev-site/tool/terra-…
mjhenkes Aug 19, 2021
bf369a7
whoops flip this back
mjhenkes Aug 20, 2021
5d3a275
no scrolling when secondary nav is open
mjhenkes Aug 20, 2021
905159f
Merge branch 'main' into terra-dev-site-v7
mjhenkes Aug 27, 2021
78876e6
Updating translations
mjhenkes Aug 27, 2021
d32f3ca
Apply suggestions from code review
mjhenkes Aug 27, 2021
6fcb78c
remove commented code
mjhenkes Aug 27, 2021
4cb711f
Merge branch 'main' into terra-dev-site-v7
mjhenkes Aug 30, 2021
a0341a9
only add the entry loader once for all site plugins.
mjhenkes Aug 30, 2021
c04bd4b
Apply suggestions from code review
mjhenkes Aug 30, 2021
256fae2
update tests
mjhenkes Aug 31, 2021
efe955e
doc update
mjhenkes Aug 31, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ const jestConfig = require('@cerner/jest-config-terra');
module.exports = {
...jestConfig,
globalSetup: './jest.globalSetup.js',
coveragePathIgnorePatterns: [
...jestConfig.coveragePathIgnorePatterns,
'/packages/terra-polyfill/src/index.js',
],
setupFiles: [
'./jest.enzymeSetup.js',
],
Expand Down
26 changes: 11 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
"compile:build": "lerna ls -a | sed 's/@cerner\\///g' | cut -d ' ' -f1 | xargs -I {} babel packages/{}/src --out-dir packages/{}/lib --copy-files",
"compile:clean": "rm -rf packages/**/lib",
"compile:src": "lerna run compile",
"compile:prod": "rm -rf ./build; NODE_ENV=production webpack -p",
"compile:lowlight": "rm -rf ./build; THEME=clinical-lowlight-theme webpack -p",
"compile:fusion": "rm -rf ./build; THEME=orion-fusion-theme webpack -p",
"compile:prod": "rm -rf ./build; NODE_ENV=production webpack --mode=production",
"compile:lowlight": "rm -rf ./build; THEME=clinical-lowlight-theme webpack --mode=production",
"compile:fusion": "rm -rf ./build; THEME=orion-fusion-theme webpack --mode=production",
"danger": "danger ci",
"deploy": "npm run compile:prod && gh-pages -d build",
"heroku-postbuild": "npm install --only=dev && npm run compile:prod",
Expand All @@ -70,8 +70,8 @@
"prepare-for-release": "terra prepare-for-release",
"pretest": "npm run lint",
"postinstall": "link-parent-bin && npm run compile && npm run bootstrap:hoist",
"start": "webpack-dev-server",
"start-prod": "webpack-dev-server --env.disableHotReloading -p",
"start": "webpack serve",
"start-prod": "webpack serve --mode=production",
"start-heroku": "terra express-server --port $PORT --site './build' ",
"start-static": "npm run compile:prod && terra express-server --site ./build",
"test": "npm run lint && npm run jest && npm run wdio",
Expand All @@ -82,8 +82,7 @@
},
"devDependencies": {
"@babel/cli": "^7.13.14",
"@babel/core": "7.10.5",
"@babel/parser": "7.10.5",
"@babel/core": "^7.13.14",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-object-rest-spread": "^7.13.8",
"@babel/plugin-transform-async-to-generator": "^7.13.0",
Expand All @@ -105,32 +104,29 @@
"@testing-library/react": "^10.0.4",
"@testing-library/react-hooks": "^5.0.0",
"@testing-library/user-event": "^12.6.0",
"core-js": "^3.15.4",
"core-js": "^3.15.2",
"danger": "^9.1.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
"enzyme-to-json": "^3.4.4",
"eslint": "^7.19.0",
"gh-pages": "^3.1.0",
"html-webpack-plugin": "^3.1.0",
"html-webpack-plugin": "^4.5.0",
"intl": "^1.2.5",
"jest": "^26.6.3",
"lerna": "^3.16.4",
"link-parent-bin": "^1.0.0",
"loader-runner": "^4.1.0",
"postcss": "^8.2.10",
"postcss-assets-webpack-plugin": "^4.0.0",
"postcss-custom-properties": "^10.0.0",
"postcss-loader": "^4.1.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-intl": "^2.9.0",
"regenerator-runtime": "^0.13.9",
"stylelint": "^13.0.0",
"terra-collapsible-menu-view": "^6.29.0",
"terra-dev-site": "^6.15.0",
"terra-enzyme-intl": "^3.3.0",
"webpack": "^4.42.0",
"webpack-cli": "^3.3.11",
"webpack": "^5.28.0",
"webpack-cli": "^4.6.0",
"webpack-dev-server": "^3.10.3",
"webpack-merge": "^5.7.3"
}
Expand Down
3 changes: 3 additions & 0 deletions packages/terra-application-docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Added
* terra-dev-site v7 docs

## 1.2.0 - (August 26, 2021)

* Changed
Expand Down
8 changes: 7 additions & 1 deletion packages/terra-application-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,15 @@
},
"dependencies": {
"@cerner/terra-docs": "^1.0.0",
"@cerner/terra-dev-site": "^6.30.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm rusty, will this bump with the release?

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'll get updated with the prepare for release script

"classnames": "^2.2.5",
"prop-types": "^15.5.8",
"terra-dev-site": "^6.39.2"
"react-router-dom": "^5.0.0",
"terra-button": "^3.42.0",
"terra-disclosure-manager": "^4.27.0",
"terra-icon": "^3.40.0",
"terra-mixins": "^1.33.0",
"terra-toolbar": "^1.22.0"
},
"peerDependencies": {
"react": "^16.8.5",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Additional Search Directory
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const ThemedComponent = () => {
Translated block below
</h1>
<h1>
{applicationIntl.formatMessage({ id: 'Terra.devSite.themed.help' })}
{applicationIntl.formatMessage({ id: 'Terra.applicationDocs.themed.help' })}
</h1>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//Themes
@import './clinical-lowlight-theme/ThemedComponent.module';
@import './orion-fusion-theme/ThemedComponent.module';
@import './terra-dev-site-test-theme/ThemedComponent.module';

:local {
.themed {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

Do files in this folder need to have .extended as a naming convention in the file name? At first glance extended/extended.extended.jsx appears repetitive.

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 does, this is just for testing purposes, we could rename things but it doesn't really matter since it's just for testing.
The config that has us use all this extended stuff comes from here: https://github.com/cerner/terra-application/blob/terra-dev-site-v7/webpack.config.js#L33


export default () => (
<h1 className="terra-dev-site-extended">
extended
</h1>
);
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@ const GoToButton = (props) => {
const {
path,
history,
...customProps
} = props;

let temp;
if (history) {
temp = (
<button type="button" onClick={() => { goToClick(path, history); }} {...customProps}>
<button type="button" onClick={() => { goToClick(path, history); }}>
Push me
</button>
);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const propTypes = {
* An object taking on a particular shape
*/
optionalObjectWithShape: PropTypes.shape({
color: PropTypes.string,
color: PropTypes.string.isRequired,
fontSize: PropTypes.number,
}),
/**
Expand Down Expand Up @@ -99,7 +99,7 @@ const propTypes = {
* ```jsx
* <div>
* <h1>
* {intl.formatMessage({ id: 'Terra.devSite.themed.help' })}
* {intl.formatMessage({ id: 'Terra.applicationDocs.themed.help' })}
* </h1>
* </div>
* ```
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
:global {
body,
h1 {
height: 100%;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ Inline `code` has `back-ticks around` it.

Inline `code` has `back-ticks around` it.

Blocks of code are either fenced by lines with three back-ticks <code>```</code>, or are indented with four spaces. I recommend only using the fenced code blocks -- they're easier and only they support syntax highlighting.
Blocks of code are either fenced by lines with three back-ticks, or are indented with four spaces. I recommend only using the fenced code blocks -- they're easier and only they support syntax highlighting.

<pre lang="no-highlight"><code>```javascript
var s = "JavaScript syntax highlighting";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Notice } from '@cerner/terra-docs';

# FAQ

## My components are visible in the raw test route but cut off when displayed in the dev site frame

When components are displayed in the raw route there is an unbroken chain of height 100%s set on the components such that test components with 100% height will fill the available area. With pages, for aesthetic reasons we do not provide a 100% height on all wrapping components. To ensure components display correctly in both raw routes and pages either use block layout or define a fixed hight above any components expecting 100% height.

## I get the webpack error: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

You can get this error when using webpack 4. Part of the TerraDevSite webpack plugin we inject an entry to build the site. Webpack requires an entry to function but when the check is performed changed between webpack 4 and 5. In webpack 4 an entry is checked prior to running the plugin where as in webpack 5 the check is performed after.

To solve this issue you have two options. Upgrade to webpack 5 or add a dummy entrypoint that TerraDevSite will remove before bundling. Upgrading to webpack 5 is recommended.
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 add a dummy entry point for teams? I'm not sure I like that idea, just throwing it out there.

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 thought about providing the entrypoint, but figured giving them the code snipit was good enough. My reasoning is that it's only needed for webpack 4 and my preferred solution would be for them to upgrade to webpack 5. I don't have a really strong opinion and would be open to offering the entrypoint if someone feels strongly about it.


<Notice variant="important" ariaLevel="3">

If you chose to add the dummy entry point it will have to resolve to a real file. It doesn't matter what file since TerraDevSite will remove it, but webpack 4 does check that the entrypoint file is real.

</Notice>

```js
entry: {
terraDevSiteDummy: './dummy.js',
},
```

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading