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

Commit

Permalink
Upgrade terra-framework to terra-dev-site v7 (#1359)
Browse files Browse the repository at this point in the history
* upgrade terra-framework to terra-dev-site v7

* remove old dev-site config, fix providers tests

* update screenshots for the fusion theme

* change log

* use terra-dev-site-v7

* fix build

* Test fixes

* add some style ignores

* update clinical theme screens

* update to released package
  • Loading branch information
mjhenkes authored Sep 1, 2021
1 parent 13d4ebb commit 0754dc9
Show file tree
Hide file tree
Showing 20 changed files with 121 additions and 126 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- npm run lint
- npm run jest
# These can't be built in parallel because the cache is a single object and you can't add to it in parallel
- npm run compile:prod -- --env.disableAggregateThemes --output-path $TRAVIS_BUILD_DIR/travis-build/default
- npm run compile:prod -- --output-path $TRAVIS_BUILD_DIR/travis-build/default
- npm run compile:lowlight -- --output-path $TRAVIS_BUILD_DIR/travis-build/lowlight
- npm run compile:fusion -- --output-path $TRAVIS_BUILD_DIR/travis-build/fusion
# Prime the docker cache
Expand Down
13 changes: 0 additions & 13 deletions dev-site-config/navigation.config.js

This file was deleted.

18 changes: 0 additions & 18 deletions dev-site-config/site.config.js

This file was deleted.

File renamed without changes.
20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,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",
"dependency-markdown": "node scripts/dependency-markdown-generator/DependencyMarkdownGenerator.js",
Expand All @@ -63,15 +63,15 @@
"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": "webpack serve",
"start-heroku": "terra express-server --port $PORT --site build",
"start-prod": "webpack-dev-server --env.disableHotReloading -p",
"start-prod": "webpack serve --env disableHotReloading --mode=production",
"start-static": "npm run compile:prod && terra express-server --site build",
"test": "npm run lint && npm run jest && npm run wdio",
"wdio-default": "terra wdio",
"wdio-lowlight": "NODE_OPTIONS=--max-old-space-size=2048 terra wdio --themes clinical-lowlight-theme",
"wdio-fusion": "terra wdio --themes orion-fusion-theme",
"wdio": "npm run wdio-default && npm run wdio-lowlight && npm run wdio-fusion"
"wdio": "terra wdio --themes terra-default-theme clinical-lowlight-theme orion-fusion-theme"
},
"devDependencies": {
"@babel/cli": "^7.5.0",
Expand All @@ -88,6 +88,7 @@
"@cerner/jest-config-terra": "^1.0.0",
"@cerner/stylelint-config-terra": "^4.0.0",
"@cerner/terra-cli": "^1.1.0",
"@cerner/terra-dev-site": "^7.0.0",
"@cerner/terra-functional-testing": "^2.1.0",
"@cerner/terra-open-source-scripts": "^1.1.0",
"@cerner/webpack-config-terra": "^1.0.0",
Expand All @@ -107,14 +108,15 @@
"postcss": "^8.2.1",
"react": "^16.8.5",
"react-dom": "^16.8.5",
"react-intl": "^2.9.0",
"regenerator-runtime": "^0.13.2",
"stylelint": "^13.0.0",
"terra-aggregate-translations": "^1.0.0",
"terra-dev-site": "^6.5.0",
"terra-application": "^1.48.0",
"terra-disclosure-manager": "^4.9.0",
"terra-enzyme-intl": "^3.0.0",
"webpack": "^4.30.0",
"webpack-cli": "^3.3.2",
"webpack": "^5.28.0",
"webpack-cli": "^4.6.0",
"webpack-dev-server": "^3.3.1",
"webpack-merge": "^5.1.4",
"xfc": "^1.2.1"
Expand Down
3 changes: 3 additions & 0 deletions packages/terra-date-input/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Changed
* Check NODE_ENV for the current development environment.

## 1.30.0 - (July 21, 2021)

* Changed
Expand Down
2 changes: 1 addition & 1 deletion packages/terra-date-input/src/DateInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class DateInput extends React.Component {
let { value } = this.props;

if (value && !DateInputUtil.acceptedDateValue(value)) {
if (process.env !== 'production') {
if (process.env.NODE_ENV !== 'production') {
// eslint-disable-next-line no-console
console.warn(
`An invalid date value, ${value}, has been passed to the terra-date-input. `
Expand Down
3 changes: 3 additions & 0 deletions packages/terra-theme-provider/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Changed
* Updated fusion wdio tests to align with other tests

## 4.9.0 - (June 8, 2021)

* Changed
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions packages/terra-time-input/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

* Changed
* Improved specificity of meridiem button group.
* Check NODE_ENV for the current development environment.

## 4.42.0 - (July 21, 2021)

* Changed
Expand Down
4 changes: 2 additions & 2 deletions packages/terra-time-input/src/TimeInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class TimeInput extends React.Component {
const { showSeconds } = this.props;

if (value && !TimeUtil.validateTime(value, showSeconds)) {
if (process.env !== 'production') {
if (process.env.NODE_ENV !== 'production') {
// eslint-disable-next-line no-console
console.warn(
`An invalid time value, ${value}, has been passed to the terra-time-picker. `
Expand Down Expand Up @@ -170,7 +170,7 @@ class TimeInput extends React.Component {
}
}
if (this.props.variant === TimeUtil.FORMAT_12_HOUR && TimeUtil.getVariantFromLocale(props) === TimeUtil.FORMAT_24_HOUR) {
if (process.env !== 'production') {
if (process.env.NODE_ENV !== 'production') {
// eslint-disable-next-line no-console
console.warn('This locale only uses 24 hour clock. The ante meridiem and post meridiem will not be displayed');
}
Expand Down
91 changes: 47 additions & 44 deletions packages/terra-time-input/src/TimeInput.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

.time-input-container {
display: inline-block;

.format-text {
color: var(--terra-time-input-format-text-color, rgba(0, 0, 0, 0.55));
font-size: var(--terra-time-input-format-text-font-size, 0.857rem);
Expand Down Expand Up @@ -249,57 +249,60 @@

.meridiem-button-group {
margin-right: var(--terra-time-input-meridiem-button-group-margin-right, 0.5rem);
}

.meridiem-button {
background-color: var(--terra-time-input-meridiem-button-background-color, transparent);
border-color: var(--terra-time-input-meridiem-button-border-color, #c8cacb);
color: var(--terra-time-input-meridiem-button-color, #1c1f21);
font-size: var(--terra-time-input-meridiem-button-font-size, 1rem);
height: var(--terra-time-input-meridiem-button-height, 2.1428571429rem);
line-height: var(--terra-time-input-meridiem-button-line-height, 1);
outline: none;
padding-bottom: var(--terra-time-input-meridiem-button-padding-bottom, 0.286rem);
padding-top: var(--terra-time-input-meridiem-button-padding-top, 0.286rem);
.meridiem-button {
background-color: var(--terra-time-input-meridiem-button-background-color, transparent);
border-color: var(--terra-time-input-meridiem-button-border-color, #c8cacb);
color: var(--terra-time-input-meridiem-button-color, #1c1f21);
font-size: var(--terra-time-input-meridiem-button-font-size, 1rem);
height: var(--terra-time-input-meridiem-button-height, 2.1428571429rem);
line-height: var(--terra-time-input-meridiem-button-line-height, 1);
outline: none;
padding-bottom: var(--terra-time-input-meridiem-button-padding-bottom, 0.286rem);
padding-top: var(--terra-time-input-meridiem-button-padding-top, 0.286rem);

&:hover {
background-color: var(--terra-time-input-meridiem-button-hover-background-color, #b9bbbc);
border-color: var(--terra-time-input-meridiem-button-hover-border-color, #c8cacb);
color: var(--terra-time-input-meridiem-button-hover-color, #000);
}
&:hover {
background-color: var(--terra-time-input-meridiem-button-hover-background-color, #b9bbbc);
border-color: var(--terra-time-input-meridiem-button-hover-border-color, #c8cacb);
color: var(--terra-time-input-meridiem-button-hover-color, #000);
}

&[aria-pressed='true'] {
background-color: var(--terra-time-input-meridiem-button-selected-background-color, #52585b);
border-color: var(--terra-time-input-meridiem-button-selected-border-color, #52585b);
color: var(--terra-time-input-meridiem-button-selected-color, #fff);
}
&[aria-pressed='true'] {
background-color: var(--terra-time-input-meridiem-button-selected-background-color, #52585b);
border-color: var(--terra-time-input-meridiem-button-selected-border-color, #52585b);
color: var(--terra-time-input-meridiem-button-selected-color, #fff);
}

&[aria-pressed='true']:hover {
background-color: var(--terra-time-input-meridiem-button-selected-hover-background-color, #40474a);
border-color: var(--terra-time-input-meridiem-button-selected-hover-border-color, #40474a);
color: var(--terra-time-input-meridiem-button-selected-hover-color, #fff);
}
&[aria-pressed='true']:hover {
background-color: var(--terra-time-input-meridiem-button-selected-hover-background-color, #40474a);
border-color: var(--terra-time-input-meridiem-button-selected-hover-border-color, #40474a);
color: var(--terra-time-input-meridiem-button-selected-hover-color, #fff);
}

&.is-invalid {
border: var(--terra-time-input-invalid-border, 1px solid #e50000);
box-shadow: var(--terra-time-input-invalid-box-shadow, 0 0 0 1px #e50000);
z-index: 1;
&.is-invalid {
border: var(--terra-time-input-invalid-border, 1px solid #e50000);
box-shadow: var(--terra-time-input-invalid-box-shadow, 0 0 0 1px #e50000);
z-index: 1;

&:focus {
border: var(--terra-time-input-invalid-focus-border, 1px solid #e50000);
box-shadow: var(--terra-time-input-invalid-focus-box-shadow, 0 0 0 1px #e50000, 0 0 4px 3px rgba(229, 0, 0, 0.35));
}
// stylelint-disable-next-line max-nesting-depth
&:focus {
border: var(--terra-time-input-invalid-focus-border, 1px solid #e50000);
box-shadow: var(--terra-time-input-invalid-focus-box-shadow, 0 0 0 1px #e50000, 0 0 4px 3px rgba(229, 0, 0, 0.35));
}

&:hover {
border: var(--terra-time-input-invalid-hover-border, 1px solid #e50000);
box-shadow: var(--terra-time-input-invalid-hover-box-shadow, 0 0 0 1px #e50000);
}
// stylelint-disable-next-line max-nesting-depth
&:hover {
border: var(--terra-time-input-invalid-hover-border, 1px solid #e50000);
box-shadow: var(--terra-time-input-invalid-hover-box-shadow, 0 0 0 1px #e50000);
}

&.disabled {
background-color: var(--terra-time-input-invalid-disabled-background-color, rgba(111, 116, 119, 0.2));
border: var(--terra-time-input-invalid-disabled-border, 1px solid #e50000);
color: var(--terra-time-input-invalid-disabled-color, #1c1f21);
opacity: var(--terra-time-input-invalid-disabled-opacity, 0.25);
// stylelint-disable-next-line max-nesting-depth
&.disabled {
background-color: var(--terra-time-input-invalid-disabled-background-color, rgba(111, 116, 119, 0.2));
border: var(--terra-time-input-invalid-disabled-border, 1px solid #e50000);
color: var(--terra-time-input-invalid-disabled-color, #1c1f21);
opacity: var(--terra-time-input-invalid-disabled-opacity, 0.25);
}
}
}
}
Expand Down
87 changes: 49 additions & 38 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,48 +1,59 @@
/* eslint-disable import/no-extraneous-dependencies */
const { merge } = require('webpack-merge');
const path = require('path');
const { merge } = require('webpack-merge');
const {
TerraDevSite,
TerraDevSiteEntrypoints,
DirectorySwitcherPlugin,
LocalPackageAliasPlugin,
} = require('terra-dev-site');
} = require('@cerner/terra-dev-site');

const WebpackConfigTerra = require('@cerner/webpack-config-terra');
/**
* Generates the file representing app name configuration.
*/
const devSiteConfig = (env = {}, argv = { p: false }) => {
const production = argv.p;
const processPath = process.cwd();

return {
entry: TerraDevSiteEntrypoints,
plugins: [
new TerraDevSite({ env }),
],
resolve: {
plugins: [
new DirectorySwitcherPlugin({
shouldSwitch: !production,
rootDirectories: [
processPath,
path.resolve(processPath, 'packages', '*'),
],
}),
new LocalPackageAliasPlugin({
rootDirectories: [
processPath,
path.resolve(processPath, 'packages', '*'),
],
}),
const coreConfig = (env = {}) => ({
plugins: [
new TerraDevSite({
defaultLocale: env.defaultLocale,
primaryNavigationItems: [{
path: '/home',
label: 'Home',
contentExtension: 'home',
additionalContent: [
{
title: 'Home',
filePath: path.resolve(process.cwd(), 'README.md'),
},
],
}, {
path: '/application',
label: 'Application',
contentExtension: 'app',
}, {
path: '/components',
label: 'Components',
contentExtension: 'doc',
}, {
path: '/dev_tools',
label: 'Developer Tools',
contentExtension: 'tool',
}, {
path: '/guides',
label: 'Guides',
contentExtension: 'guide',
}, {
path: '/tests',
label: 'Tests',
contentExtension: 'test',
}, {
path: '/provider',
label: 'Provider',
contentExtension: 'provider',
}],
sideEffectImportFilePaths: [
path.resolve(process.cwd(), 'initalizeXFC.js'),
],
},
};
};
}),
],
});

const webpackConfig = (env, argv) => (
merge(WebpackConfigTerra(env, argv), devSiteConfig(env, argv))
const mergedConfig = (env, argv) => (
merge(WebpackConfigTerra(env, argv), coreConfig())
);

module.exports = webpackConfig;
module.exports = mergedConfig;

0 comments on commit 0754dc9

Please sign in to comment.