-
Notifications
You must be signed in to change notification settings - Fork 13
Conversation
...ra-application-docs/src/terra-dev-site/tool/terra-dev-site/UpgradeGuides.f/v7.0.0.s.tool.mdx
Outdated
Show resolved
Hide resolved
...ra-application-docs/src/terra-dev-site/tool/terra-dev-site/UpgradeGuides.f/v7.0.0.s.tool.mdx
Outdated
Show resolved
Hide resolved
...ra-application-docs/src/terra-dev-site/tool/terra-dev-site/UpgradeGuides.f/v7.0.0.s.tool.mdx
Outdated
Show resolved
Hide resolved
In addition the `TerraDevSiteEntrypoints` have been removed as well. Webpack 4 requires an entry point, but that requirement is generally satisfied by our reusable webpack configs. Webpack 5 will allow plugins to define entrypoints without being specified in the config. | ||
|
||
|
||
Below is an example webpack config setting up the `terra-dev-site` plugin. |
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.
This is for v7 correct? Would a diff of v6 to v7 be helpful for migration?
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 diff would just end up looking messy. See https://github.com/cerner/terra-core/pull/3271/files for an example.
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.
ahh it is a bit messy. Might be worth linking to that commit for teams to reference that?
|
||
<Notice variant="important" ariaLevel="3"> | ||
|
||
Note in the example where `env.defaultLocale` is passed to the `TerraDevSite` plugin. The `defaultLocale` env is set as a part of our WDIO test service and must be passed into the `TerraDevSite` plugin to ensure locale tests are run appropriately. |
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.
Might be helpful to add a commetn in the example to call it out there:'
new TerraDevSite({
+ // env.defaultLocale is set by the WDIO test service to enable local testing
defaultLocale: env.defaultLocale,
}),
also I don't remember, if env.defaultLocale
is not provided, does it fallback to english in the TerraDevSite plugin?
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.
The locale will default to en
if no locale is provided: documented here https://github.com/cerner/terra-application/blob/terra-dev-site-v7/packages/terra-application-docs/src/terra-dev-site/tool/terra-dev-site/configPropsTable.jsx#L173
(that gets turned into a props table)
|`navConfig.navigation.index`|**removed**|The site index page is now assumed to be the first `primaryNavigationItem` in the list.| | ||
|`navConfig.navigation.primaryNavigationItems`|`primaryNavigationItems`| PrimaryNavigationItems are no longer nested under the navigation object.| | ||
|`navConfig.navigation.primaryNavigationItems.path`|`primaryNavigationItems.path`|unchanged.| | ||
|`navConfig.navigation.primaryNavigationItems.text`|`primaryNavigationItems.label`|Changed to label to align with terra-application api naming.| |
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.
could you link the terra-application api you are referencing?
...ra-application-docs/src/terra-dev-site/tool/terra-dev-site/UpgradeGuides.f/v7.0.0.s.tool.mdx
Outdated
Show resolved
Hide resolved
|`appConfig.favicon`|`faviconFilePath`|No longer nested under appConfig. The name now includes 'filePaths' to better describe the expected input.| | ||
|`appConfig.themes`|**removed**|The available themes are now pulled from the terra-theme.config file via the webpack global variable `TERRA_THEME_CONFIG`.| | ||
|`appConfig.defaultTheme`|`defaultTheme`|No longer nested under appConfig.| | ||
|`appConfig.locales`|**removed**|Deprecated as of terra-dev-site 6.23, now removed.| |
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.
only one locale per site or will all terra locales be provided by default?
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.
all will be provided, en will be default unless otherwise specified.
|`appConfig.defaultTheme`|`defaultTheme`|No longer nested under appConfig.| | ||
|`appConfig.locales`|**removed**|Deprecated as of terra-dev-site 6.23, now removed.| | ||
|`appConfig.defaultLocale`|`defaultLocale`|No longer nested under appConfig.| | ||
|`appConfig.defaultDirection`|`defaultDirection`|No longer nested under appConfig.| |
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.
anyway to remove this configuration and rely on the default local's expected directionality? <-- is this available via the locale's meta-data?
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.
There doesn't seem to be a way to get rtl/ltr data from the locale, I could use a third part (rtl-detect) but i'm pleased enough with the current implementation
|`appConfig.themes`|**removed**|The available themes are now pulled from the terra-theme.config file via the webpack global variable `TERRA_THEME_CONFIG`.| | ||
|`appConfig.defaultTheme`|`defaultTheme`|No longer nested under appConfig.| | ||
|`appConfig.locales`|**removed**|Deprecated as of terra-dev-site 6.23, now removed.| | ||
|`appConfig.defaultLocale`|`defaultLocale`|No longer nested under appConfig.| |
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.
above comment, is there a default used?
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.
Defaults to en, This is documented on the config page, but not here because it hasn't changed from v6 to v7
|`appConfig.extensions.componentPath`|`extensionItems.modalFilePath`| Renamed to prepare for application v2 modals.| | ||
|`appConfig.extensions.size`|**removed**|One size fits all.| | ||
|`appConfig.headHtml`|`headHtml`|No longer nested under appConfig.| | ||
|`includeTestEvidence`|**removed**|Removed the ability to include test evidence, this should be covered now by a separate site report.| |
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.
Is this a terra-toolkit report that teams need to enable?
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.
It's automatically enabled for all 'orion' builds internally.
|
||
### Resulting Test changes | ||
|
||
The page introduces a new tab stop. Any tests using tabstops will have to be updated to include an additional tab stop. |
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 you have an example of what you mean?
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.
Honestly I don't think this is still true, I'll remove it.
...ra-application-docs/src/terra-dev-site/tool/terra-dev-site/UpgradeGuides.f/v7.0.0.s.tool.mdx
Outdated
Show resolved
Hide resolved
...ra-application-docs/src/terra-dev-site/tool/terra-dev-site/UpgradeGuides.f/v7.0.0.s.tool.mdx
Outdated
Show resolved
Hide resolved
<ApplicationStatusOverlay buttonAttrs={StatusViewButtons} message="Status View with all props" variant="no-data" /> | ||
</ApplicationStatusOverlayProvider> | ||
// eslint-disable-next-line react/forbid-dom-props | ||
<div style={{ height: '500px' }}> |
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.
should terra-dev-site provide a demo style?
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.
It would be impossible for us to guess what hight is appropriate for the example, So i think it's up to the creator of the example.
const [loadingFailed, setLoadingFailed] = React.useState(); | ||
|
||
if (!pageContentConfig || !ContentComponent) { | ||
return <Image src={kaiju404} width="100%" alt="404" />; |
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.
bringing back Kaiju?! 🎉
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.
ha, just reusing the 404 image.
/** | ||
* The PageAction elements to render for the Page. | ||
*/ | ||
children: PropTypes.node, |
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.
are these proptypes still needed?
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.
Yes and still accurate too!
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
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.
Looks good to me from a documentation perspective! 👍🏻
Summary
This is a big one approximately 70% of terra-dev-site has been rewritten. Pretty much everything except some of the loader components:
Highlights are:
Closes #
Deployment Link
https://terra-applic-.herokuapp.com/
Testing
Additional Details
Validation PRs:
terra-ui: cerner/terra-ui#319
terra-core: cerner/terra-core#3271
terra-framework: cerner/terra-framework#1359
terra-clinical: cerner/terra-clinical#740
terra-graphs: cerner/terra-graphs#220
terra-toolkit: n/a. We cant upgrade this one until terra-application supports react-intl v5
Thank you for contributing to Terra.
@cerner/terra