diff --git a/packages/terra-application/CHANGELOG.md b/packages/terra-application/CHANGELOG.md index 6b2ba99da..5f977e19c 100644 --- a/packages/terra-application/CHANGELOG.md +++ b/packages/terra-application/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +* Added + * Added user action utility button. + ## 1.53.1 - (June 22, 2022) * Changed diff --git a/packages/terra-application/src/application-navigation/ApplicationNavigation.jsx b/packages/terra-application/src/application-navigation/ApplicationNavigation.jsx index 966a898ad..7306b7a79 100644 --- a/packages/terra-application/src/application-navigation/ApplicationNavigation.jsx +++ b/packages/terra-application/src/application-navigation/ApplicationNavigation.jsx @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'; import uuidv4 from 'uuid/v4'; import TerraApplicationNavigation from './private/ApplicationNavigation'; import { - titleConfigPropType, navigationItemsPropType, extensionItemsPropType, utilityItemsPropType, userConfigPropType, + titleConfigPropType, navigationItemsPropType, extensionItemsPropType, utilityItemsPropType, userConfigPropType, userActionConfigPropType, } from './private/utils/propTypes'; import ApplicationErrorBoundary from '../application-error-boundary'; @@ -113,6 +113,10 @@ const propTypes = { * A configuration object that defines the strings rendered within the ApplicationNavigation header. */ titleConfig: titleConfigPropType, + /** + * A configuration object to render an action button for user Config. + */ + userActionConfig: userActionConfigPropType, /** * A configuration object with information pertaining to the application's user. */ @@ -150,6 +154,7 @@ const ApplicationNavigation = ({ userConfig, utilityItems, workspace, + userActionConfig, }) => { const applicationIntl = React.useContext(ApplicationIntlContext); const navigationPromptCheckpointRef = useRef(); @@ -187,6 +192,7 @@ const ApplicationNavigation = ({ onSelectNavigationItem={propOnSelectNavigationItem && onSelectNavigationItem} activeNavigationItemKey={activeNavigationItemKey} userConfig={userConfig} + userActionConfig={userActionConfig} extensionItems={extensionItems} onSelectExtensionItem={onSelectExtensionItem} utilityItems={utilityItems} diff --git a/packages/terra-application/src/application-navigation/private/ApplicationNavigation.jsx b/packages/terra-application/src/application-navigation/private/ApplicationNavigation.jsx index ce88b8aef..f3c5b2dfa 100644 --- a/packages/terra-application/src/application-navigation/private/ApplicationNavigation.jsx +++ b/packages/terra-application/src/application-navigation/private/ApplicationNavigation.jsx @@ -15,7 +15,7 @@ import DrawerMenu from './drawer-menu/_DrawerMenu'; import UtilityMenu from './utility-menu/_UtilityMenu'; import { shouldRenderCompactNavigation } from './utils/helpers'; import { - titleConfigPropType, userConfigPropType, navigationItemsPropType, extensionItemsPropType, utilityItemsPropType, + titleConfigPropType, userConfigPropType, navigationItemsPropType, extensionItemsPropType, utilityItemsPropType, userActionConfigPropType, } from './utils/propTypes'; import WorkspaceLayout from './workspace-layout/WorkspaceLayout'; @@ -95,6 +95,10 @@ const propTypes = { * Ex: `onSelectLogout()` */ onSelectLogout: PropTypes.func, + /** + * A configuration object to render an action button for user Config. + */ + userActionConfig: userActionConfigPropType, /** * An array of configuration objects with information specifying the creation of additional utility menu items. * These items are rendered within the popup utility menu at larger breakpoints and within the drawer menu at smaller breakpoints. @@ -140,6 +144,7 @@ const ApplicationNavigation = ({ notifications, children, workspace, + userActionConfig, }) => { const drawerMenuRef = useRef(); const contentLayoutRef = useRef(); @@ -235,6 +240,7 @@ const ApplicationNavigation = ({ { const listRef = useRef(); const buttonRef = useRef(); @@ -120,6 +125,9 @@ const PopupMenu = ({ function setButtonRef(node) { buttonRef.current = node; } + useEffect(() => { + listRef.current.focus(); + }, []); function handleArrowDown(event) { if (listRef.current.hasChildNodes()) { @@ -201,7 +209,7 @@ const PopupMenu = ({ {customContent} ) : undefined} - {userConfig ? : null} + {userConfig ? : null}
    {menuItems.map(item => ( { +const PopupMenuUser = ({ userConfig, userActionConfig, id }) => { const theme = React.useContext(ThemeContext); return ( @@ -32,6 +42,17 @@ const PopupMenuUser = ({ userConfig }) => {
    {userConfig.name}
    {userConfig.detail ?
    {userConfig.detail}
    : null} + { userActionConfig && ( +
    ); diff --git a/packages/terra-application/src/application-navigation/private/drawer-menu/DrawerMenuUser.module.scss b/packages/terra-application/src/application-navigation/private/drawer-menu/DrawerMenuUser.module.scss index 6a5201f89..e7b365eb0 100644 --- a/packages/terra-application/src/application-navigation/private/drawer-menu/DrawerMenuUser.module.scss +++ b/packages/terra-application/src/application-navigation/private/drawer-menu/DrawerMenuUser.module.scss @@ -12,6 +12,40 @@ .avatar-inner { z-index: 0; } + + .drawer-menu-action-button { + background-color: var(--terra-application-navigation-drawer-menu-action-button-background-color, #004c76); + border: var(--terra-application-navigation-drawer-menu-action-button-border, 1px solid #a7aaab); + border-radius: var(--terra-application-navigation-drawer-menu-action-button-border-radius, 3px); + color: var(--terra-application-navigation-drawer-menu-action-button-color, #dedfe0); + font-size: 1rem; + outline: none; + overflow-wrap: break-word; /* Modern browsers */ + padding: 3px 0.7142857143rem; + text-align: center; + text-decoration: none; + text-transform: none; + touch-action: manipulation; // Enable fast tap interaction in webkit browsers; see https://webkit.org/blog/5610/more-responsive-tapping-on-ios/ + user-select: none; // Prevent text selection on buttons on mobile devices + white-space: normal; + width: 100%; + word-wrap: break-word; /* For IE 10 and IE 11 */ + + &[data-focus-styles-enabled='true']:focus { + outline: var(--terra-application-navigation-drawer-menu-action-button-focus-outline, 2px dashed #fff); + outline-offset: var(--terra-application-navigation-drawer-menu-action-button-focus-outline-offset, 1px); + } + + &:hover { + background-color: var(--terra-application-navigation-drawer-menu-action-button-hover-background-color, #005685); + color: var(--terra-application-navigation-drawer-menu-action-button-hover-color, #dedfe0); + } + + &:active { + background-color: var(--terra-application-navigation-drawer-menu-action-button-active-background-color, #0065a3); + color: var(--terra-application-navigation-drawer-menu-action-button-active-color, #dedfe0); + } + } } .large-user-layout { @@ -68,7 +102,11 @@ white-space: normal; word-break: break-word; word-wrap: break-word; - } + } + + .drawer-menu-action-button { + margin-top: 12px; + } } .small-user-layout { @@ -121,7 +159,11 @@ white-space: normal; word-break: break-word; word-wrap: break-word; - } + } + + .drawer-menu-action-button { + margin-top: 6px; + } } } /* stylelint-enable selector-max-compound-selectors */ diff --git a/packages/terra-application/src/application-navigation/private/drawer-menu/_DrawerMenu.jsx b/packages/terra-application/src/application-navigation/private/drawer-menu/_DrawerMenu.jsx index 650593890..2744620b5 100644 --- a/packages/terra-application/src/application-navigation/private/drawer-menu/_DrawerMenu.jsx +++ b/packages/terra-application/src/application-navigation/private/drawer-menu/_DrawerMenu.jsx @@ -12,10 +12,10 @@ import DrawerMenuListItem from './_DrawerMenuListItem'; import DrawerMenuUser from './_DrawerMenuUser'; import DrawerMenuFooterButton from './_DrawerMenuFooterButton'; import { - titleConfigPropType, userConfigPropType, navigationItemsPropType, utilityItemsPropType, + titleConfigPropType, userConfigPropType, navigationItemsPropType, utilityItemsPropType, userActionConfigPropType, } from '../utils/propTypes'; import { - navigationItemId, utilityItemId, settingsUtilityItemId, helpUtilityItemId, logoutUtilityItemId, + navigationItemId, utilityItemId, settingsUtilityItemId, helpUtilityItemId, logoutUtilityItemId, userActionItemId, } from '../utils/helpers'; import styles from './DrawerMenu.module.scss'; @@ -89,6 +89,10 @@ const propTypes = { * Object containing intl APIs */ intl: PropTypes.shape({ formatMessage: PropTypes.func }), + /** + * A configuration object to render an action button for user Config. + */ + userActionConfig: userActionConfigPropType, }; const defaultProps = { @@ -111,9 +115,10 @@ const DrawerMenu = ({ onSelectUtilityItem, notifications, intl, + userActionConfig, }) => { const titleComponent = titleConfig && !(titleConfig.element || titleConfig.hideTitleWithinDrawerMenu) ? : undefined; - const userComponent = userConfig ? : undefined; + const userComponent = userConfig ? : undefined; const logoutButton = onSelectLogout ? (
    { +const DrawerMenuUser = ({ + userConfig, variant, userActionConfig, id, +}) => { const theme = React.useContext(ThemeContext); return ( @@ -42,6 +53,19 @@ const DrawerMenuUser = ({ userConfig, variant }) => {
    {userConfig.name}
    {userConfig.detail ?
    {userConfig.detail}
    : null} + { userActionConfig && ( + + )}
    ); diff --git a/packages/terra-application/src/application-navigation/private/orion-fusion-theme/DrawerMenuCommon.module.scss b/packages/terra-application/src/application-navigation/private/orion-fusion-theme/DrawerMenuCommon.module.scss index 94cab7269..558ad1c9c 100644 --- a/packages/terra-application/src/application-navigation/private/orion-fusion-theme/DrawerMenuCommon.module.scss +++ b/packages/terra-application/src/application-navigation/private/orion-fusion-theme/DrawerMenuCommon.module.scss @@ -4,6 +4,17 @@ --terra-application-navigation-drawer-count-background-color: #ffda6c; --terra-application-navigation-drawer-count-border: 1px solid #ffb20b; --terra-application-navigation-drawer-count-color: #000; + + --terra-application-navigation-drawer-menu-action-button-background-color: #004c76; + --terra-application-navigation-drawer-menu-action-button-border: 1px solid #a7aaab; + --terra-application-navigation-drawer-menu-action-button-border-radius: 3px; + --terra-application-navigation-drawer-menu-action-button-color: #dedfe0; + --terra-application-navigation-drawer-menu-action-button-active-background-color: #0065a3; + --terra-application-navigation-drawer-menu-action-button-active-color: #dedfe0; + --terra-application-navigation-drawer-menu-action-button-focus-outline: 2px dashed #fff; + --terra-application-navigation-drawer-menu-action-button-focus-outline-offset: 1px; + --terra-application-navigation-drawer-menu-action-button-hover-background-color: #005685; + --terra-application-navigation-drawer-menu-action-button-hover-color: #dedfe0; --terra-application-navigation-drawer-menu-user-large-avatar-inner-font-size: 1.6521rem; --terra-application-navigation-drawer-menu-avatar-outline-border: 0.1429rem solid rgba(255, 255, 255, 0.1); diff --git a/packages/terra-application/src/application-navigation/private/utility-menu/_UtilityMenu.jsx b/packages/terra-application/src/application-navigation/private/utility-menu/_UtilityMenu.jsx index 4053a77a6..00ec93a23 100644 --- a/packages/terra-application/src/application-navigation/private/utility-menu/_UtilityMenu.jsx +++ b/packages/terra-application/src/application-navigation/private/utility-menu/_UtilityMenu.jsx @@ -4,7 +4,7 @@ import { injectIntl } from 'react-intl'; import IconSettings from 'terra-icon/lib/icon/IconSettings'; import IconQuestionOutline from 'terra-icon/lib/icon/IconQuestionOutline'; import PopupMenu from '../common/_PopupMenu'; -import { userConfigPropType, utilityItemsPropType } from '../utils/propTypes'; +import { userConfigPropType, utilityItemsPropType, userActionConfigPropType } from '../utils/propTypes'; import { utilityItemId, helpUtilityItemId, settingsUtilityItemId } from '../utils/helpers'; const propTypes = { @@ -57,6 +57,10 @@ const propTypes = { * Object containing intl APIs */ intl: PropTypes.shape({ formatMessage: PropTypes.func }), + /** + * A configuration object to render an action button for user Config. + */ + userActionConfig: userActionConfigPropType, }; const defaultProps = { @@ -67,7 +71,7 @@ const utilityMenuSettingsKey = 'terra-application-navigation.utility-menu.settin const utilityMenuHelpKey = 'terra-application-navigation.utility-menu.help'; const UtilityMenu = ({ - userConfig, hero, onSelectSettings, onSelectHelp, onSelectLogout, utilityItems, id, onSelectUtilityItem, isHeightBounded, intl, + userConfig, hero, onSelectSettings, onSelectHelp, onSelectLogout, utilityItems, id, onSelectUtilityItem, isHeightBounded, intl, userActionConfig, }) => { let menuItems = []; menuItems = utilityItems.map(item => ({ @@ -106,6 +110,7 @@ const UtilityMenu = ({ footerText={intl.formatMessage({ id: 'terraApplication.navigation.utilityMenu.logout' })} onSelectFooterItem={onSelectLogout} userConfig={userConfig} + userActionConfig={userActionConfig} customContent={hero} menuItems={menuItems} id={id} diff --git a/packages/terra-application/src/application-navigation/private/utils/helpers.js b/packages/terra-application/src/application-navigation/private/utils/helpers.js index 653e36309..fd1663c8d 100644 --- a/packages/terra-application/src/application-navigation/private/utils/helpers.js +++ b/packages/terra-application/src/application-navigation/private/utils/helpers.js @@ -90,6 +90,10 @@ function extensionItemId(appNavId, extensionItemKey) { return itemId(appNavId, 'ExtensionItem', extensionItemKey); } +function userActionItemId(appNavId) { + return utilityItemId(appNavId, 'TerraAction'); +} + export default { shouldRenderCompactNavigation, enableFocusStyles, @@ -110,4 +114,5 @@ export { helpUtilityItemId, settingsUtilityItemId, logoutUtilityItemId, + userActionItemId, }; diff --git a/packages/terra-application/src/application-navigation/private/utils/propTypes.js b/packages/terra-application/src/application-navigation/private/utils/propTypes.js index ab16fc2da..c008da81f 100644 --- a/packages/terra-application/src/application-navigation/private/utils/propTypes.js +++ b/packages/terra-application/src/application-navigation/private/utils/propTypes.js @@ -95,10 +95,23 @@ const extensionItemsPropType = PropTypes.arrayOf(PropTypes.shape({ metaData: PropTypes.object, })); +const userActionConfigPropType = PropTypes.shape({ + /** + * Text to be displayed on user action button. + */ + text: PropTypes.string.isRequired, + + /** + * A function to be executed on user action button click. + * If `userActionCallback` is not provided, the user action button will not be rendered. + */ + userActionCallback: PropTypes.func.isRequired, +}); + export default { - titleConfigPropType, userConfigPropType, navigationItemsPropType, utilityItemsPropType, extensionItemsPropType, + titleConfigPropType, userConfigPropType, navigationItemsPropType, utilityItemsPropType, extensionItemsPropType, userActionConfigPropType, }; export { - titleConfigPropType, userConfigPropType, navigationItemsPropType, utilityItemsPropType, extensionItemsPropType, + titleConfigPropType, userConfigPropType, navigationItemsPropType, utilityItemsPropType, extensionItemsPropType, userActionConfigPropType, }; diff --git a/packages/terra-application/src/terra-dev-site/app/components.2/ApplicationNavigation.app.mdx b/packages/terra-application/src/terra-dev-site/app/components.2/ApplicationNavigation.app.mdx index 1f7e8840d..29427ee5d 100644 --- a/packages/terra-application/src/terra-dev-site/app/components.2/ApplicationNavigation.app.mdx +++ b/packages/terra-application/src/terra-dev-site/app/components.2/ApplicationNavigation.app.mdx @@ -206,12 +206,29 @@ It is recommended that `initials` prop be provided for all cases if `userConfig` ```jsx const myUserConfig = { name: 'Name, User', - detail: 'Is a User', + detail: 'DomainName123', initials: 'UN', imageSrc: 'imageSrc', } ``` +### `userActionConfig` +#### Is Required: `false` + +The `userActionConfig` prop allows consumers to add an additional item to the `userConfig` section where it is displayed within the application. If a specific action related to a User's information or details, consumers can use this prop which will add a button along with the user name, detail, and avatar. Note: if the `userConfig` prop is not set, the user action button will not be displayed. + +|Key Name|Type|Is Required|Description| +|---|---|---|---| +|`text`|String|**required**|Text to be displayed on user action button. +|`userActionCallback`|Function|**required**|A function to be executed on user action button click.| + +```jsx +const userActionConfig = { + text: 'User Specific Action', + userActionCallback: () => console.log('Button Clicked'), +}; +``` + ### `hero` #### Is Required: `false` @@ -292,6 +309,7 @@ The ApplicationNavigation has two rendering modes: `standard` and `compact`. |`utilityItems`|Content is rendered within ApplicationNavigation's utility popup (as provided by `terra-popup`).|Content is rendered within ApplicationNavigation's navigation drawer.| |`navigationItems`|Content is rendered within the ApplicationNavigation's header as tabs.|Content is rendered within ApplicationNavigation's navigation drawer.| |`extensionItems`|Content is rendered within ApplicationNavigation's header.|Same as `standard`.| +|`userActionConfig`|Content is rendered within ApplicationNavigation's utility popup (as provided by `terra-popup`).|Content is rendered within ApplicationNavigation's navigation drawer.| ## Example diff --git a/packages/terra-application/src/terra-dev-site/app/components.2/example/ApplicationNavigationExample.jsx b/packages/terra-application/src/terra-dev-site/app/components.2/example/ApplicationNavigationExample.jsx index 9178625b3..20feb801e 100644 --- a/packages/terra-application/src/terra-dev-site/app/components.2/example/ApplicationNavigationExample.jsx +++ b/packages/terra-application/src/terra-dev-site/app/components.2/example/ApplicationNavigationExample.jsx @@ -50,6 +50,13 @@ const navigationItems = [{ const userConfig = { name: 'Example User', initials: 'EU', + detail: 'Is a User', +}; + +const userActionConfig = { + text: 'Edit Photo', + // eslint-disable-next-line no-alert + userActionCallback: () => alert('Edit Photo Clicked'), }; const ApplicationNavigationTest = () => { @@ -69,6 +76,7 @@ const ApplicationNavigationTest = () => { title: 'ApplicationNavigation Example', }} userConfig={userConfig} + userActionConfig={userActionConfig} navigationItems={navigationItems} activeNavigationItemKey={activeNavItem} onSelectNavigationItem={(key) => { setActiveNavItem(key); }} diff --git a/packages/terra-application/src/terra-dev-site/test/application-navigation/private/application-navigation/ApplicationNavigation.test.jsx b/packages/terra-application/src/terra-dev-site/test/application-navigation/private/application-navigation/ApplicationNavigation.test.jsx index 8f51ffa91..f2a1360fe 100644 --- a/packages/terra-application/src/terra-dev-site/test/application-navigation/private/application-navigation/ApplicationNavigation.test.jsx +++ b/packages/terra-application/src/terra-dev-site/test/application-navigation/private/application-navigation/ApplicationNavigation.test.jsx @@ -14,6 +14,12 @@ const userConfig = { initials: 'TN', }; +const userActionConfig = { + text: 'Edit Photo', + // eslint-disable-next-line no-console + userActionCallback: () => console.log('Button Clicked'), +}; + const extensionItems = [ { icon: , @@ -149,6 +155,7 @@ function ApplicationNavigationTest() { { initials: 'user-initials', imageSrc: 'user-src', }} + userActionConfig={{ + text: 'Edit Photo', + userActionCallback: () => jest.fn(), + }} navigationItems={[{ text: 'test-text', key: 'my-test-key' }]} extensionItems={[{ text: 'test-text-1', key: 'my-test-key-1', icon: my icon }]} utilityItems={[{ text: 'test-text-2', key: 'my-test-key-2', icon: my icon }]} diff --git a/packages/terra-application/tests/jest/application-navigation/__snapshots__/ApplicationNavigation.test.jsx.snap b/packages/terra-application/tests/jest/application-navigation/__snapshots__/ApplicationNavigation.test.jsx.snap index ed55d9b79..4e0d1b117 100644 --- a/packages/terra-application/tests/jest/application-navigation/__snapshots__/ApplicationNavigation.test.jsx.snap +++ b/packages/terra-application/tests/jest/application-navigation/__snapshots__/ApplicationNavigation.test.jsx.snap @@ -70,6 +70,12 @@ exports[`ApplicationNavigation should render with all props 1`] = ` "title": "test-title", } } + userActionConfig={ + Object { + "text": "Edit Photo", + "userActionCallback": [Function], + } + } userConfig={ Object { "detail": "user-detail", diff --git a/packages/terra-application/tests/jest/application-navigation/private/drawer-menu/DrawerMenuUser.test.jsx b/packages/terra-application/tests/jest/application-navigation/private/drawer-menu/DrawerMenuUser.test.jsx index 312dfdfa8..bac3bab82 100644 --- a/packages/terra-application/tests/jest/application-navigation/private/drawer-menu/DrawerMenuUser.test.jsx +++ b/packages/terra-application/tests/jest/application-navigation/private/drawer-menu/DrawerMenuUser.test.jsx @@ -1,6 +1,11 @@ import React from 'react'; import DrawerMenuUser from '../../../../../src/application-navigation/private/drawer-menu/_DrawerMenuUser'; +const userActionConfig = { + text: 'Edit Photo', + userActionCallback: () => jest.fn(), +}; + describe('DrawerMenuUser', () => { it('should render default element', () => { const shallowComponent = shallow( @@ -11,6 +16,7 @@ describe('DrawerMenuUser', () => { initials: 'user-initials', imageSrc: 'user-src', }} + userActionConfig={userActionConfig} />, ); @@ -27,6 +33,7 @@ describe('DrawerMenuUser', () => { imageSrc: 'user-src', }} variant="small" + userActionConfig={userActionConfig} />, ); @@ -43,6 +50,7 @@ describe('DrawerMenuUser', () => { imageSrc: 'user-src', }} variant="large" + userActionConfig={userActionConfig} />, ); diff --git a/packages/terra-application/tests/jest/application-navigation/private/drawer-menu/__snapshots__/DrawerMenu.test.jsx.snap b/packages/terra-application/tests/jest/application-navigation/private/drawer-menu/__snapshots__/DrawerMenu.test.jsx.snap index 87c05af8f..de22df9b3 100644 --- a/packages/terra-application/tests/jest/application-navigation/private/drawer-menu/__snapshots__/DrawerMenu.test.jsx.snap +++ b/packages/terra-application/tests/jest/application-navigation/private/drawer-menu/__snapshots__/DrawerMenu.test.jsx.snap @@ -241,6 +241,7 @@ exports[`DrawerMenu should render with navigation and utility item ids 1`] = ` my test hero user-detail + `; @@ -78,6 +88,16 @@ exports[`DrawerMenuUser should render with large variant 1`] = ` > user-detail + `; @@ -119,6 +139,16 @@ exports[`DrawerMenuUser should render with small variant 1`] = ` > user-detail + `; diff --git a/packages/terra-application/tests/jest/application-navigation/private/utility-menu/UtilityMenu.test.jsx b/packages/terra-application/tests/jest/application-navigation/private/utility-menu/UtilityMenu.test.jsx index 90dcaf2a1..82624f154 100644 --- a/packages/terra-application/tests/jest/application-navigation/private/utility-menu/UtilityMenu.test.jsx +++ b/packages/terra-application/tests/jest/application-navigation/private/utility-menu/UtilityMenu.test.jsx @@ -22,6 +22,10 @@ describe('UtilityMenu', () => { initials: 'user-initials', imageSrc: 'user-src', }} + userActionConfig={{ + text: 'Edit Photo', + userActionCallback: () => jest.fn(), + }} utilityItems={[{ id: 'test-utility-2-id', text: 'test-text-2', key: 'my-test-key-2', icon: my icon, metaData: { meta: 'metaData' }, }]} diff --git a/packages/terra-application/tests/jest/application-navigation/private/utility-menu/__snapshots__/UtilityMenu.test.jsx.snap b/packages/terra-application/tests/jest/application-navigation/private/utility-menu/__snapshots__/UtilityMenu.test.jsx.snap index 5e8fa83b8..ccaadaef9 100644 --- a/packages/terra-application/tests/jest/application-navigation/private/utility-menu/__snapshots__/UtilityMenu.test.jsx.snap +++ b/packages/terra-application/tests/jest/application-navigation/private/utility-menu/__snapshots__/UtilityMenu.test.jsx.snap @@ -202,6 +202,12 @@ exports[`UtilityMenu should render with function callbacks 1`] = ` onSelectLogout={[MockFunction]} onSelectSettings={[MockFunction]} onSelectUtilityItem={[MockFunction]} + userActionConfig={ + Object { + "text": "Edit Photo", + "userActionCallback": [Function], + } + } userConfig={ Object { "detail": "user-detail", @@ -280,6 +286,12 @@ exports[`UtilityMenu should render with function callbacks 1`] = ` role="listbox" showSelections={false} title="terraApplication.navigation.utilityMenu.headerTitle" + userActionConfig={ + Object { + "text": "Edit Photo", + "userActionCallback": [Function], + } + } userConfig={ Object { "detail": "user-detail", @@ -410,6 +422,12 @@ exports[`UtilityMenu should render with function callbacks 1`] = ` user-detail + + diff --git a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/application-navigation-spec/1__Popup_Open.png b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/application-navigation-spec/1__Popup_Open.png index 87457aaef..6f27cb214 100644 Binary files a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/application-navigation-spec/1__Popup_Open.png and b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/application-navigation-spec/1__Popup_Open.png differ diff --git a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/application-navigation-spec/utilities_display_properly_and_onSelectLogout_called_on_clicking_logout.png b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/application-navigation-spec/utilities_display_properly_and_onSelectLogout_called_on_clicking_logout.png index 364dcb714..6f27cb214 100644 Binary files a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/application-navigation-spec/utilities_display_properly_and_onSelectLogout_called_on_clicking_logout.png and b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/clinical-lowlight-theme/en/chrome_large/application-navigation-spec/utilities_display_properly_and_onSelectLogout_called_on_clicking_logout.png differ diff --git a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/clinical-lowlight-theme/en/chrome_small/application-navigation-spec/1__Drawer_Open.png b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/clinical-lowlight-theme/en/chrome_small/application-navigation-spec/1__Drawer_Open.png index 588365342..0f70b6508 100644 Binary files a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/clinical-lowlight-theme/en/chrome_small/application-navigation-spec/1__Drawer_Open.png and b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/clinical-lowlight-theme/en/chrome_small/application-navigation-spec/1__Drawer_Open.png differ diff --git a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/clinical-lowlight-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer.png b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/clinical-lowlight-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer.png index 588365342..0f70b6508 100644 Binary files a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/clinical-lowlight-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer.png and b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/clinical-lowlight-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer.png differ diff --git a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/clinical-lowlight-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer_and_onDrawerMenuStateChange_callback_triggered.png b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/clinical-lowlight-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer_and_onDrawerMenuStateChange_callback_triggered.png index 588365342..0f70b6508 100644 Binary files a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/clinical-lowlight-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer_and_onDrawerMenuStateChange_callback_triggered.png and b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/clinical-lowlight-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer_and_onDrawerMenuStateChange_callback_triggered.png differ diff --git a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/orion-fusion-theme/en/chrome_large/application-navigation-spec/1__Popup_Open.png b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/orion-fusion-theme/en/chrome_large/application-navigation-spec/1__Popup_Open.png index 4ec9e9021..3271b5be0 100644 Binary files a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/orion-fusion-theme/en/chrome_large/application-navigation-spec/1__Popup_Open.png and b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/orion-fusion-theme/en/chrome_large/application-navigation-spec/1__Popup_Open.png differ diff --git a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/orion-fusion-theme/en/chrome_large/application-navigation-spec/utilities_display_properly_and_onSelectLogout_called_on_clicking_logout.png b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/orion-fusion-theme/en/chrome_large/application-navigation-spec/utilities_display_properly_and_onSelectLogout_called_on_clicking_logout.png index 1cab7218e..3271b5be0 100644 Binary files a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/orion-fusion-theme/en/chrome_large/application-navigation-spec/utilities_display_properly_and_onSelectLogout_called_on_clicking_logout.png and b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/orion-fusion-theme/en/chrome_large/application-navigation-spec/utilities_display_properly_and_onSelectLogout_called_on_clicking_logout.png differ diff --git a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/orion-fusion-theme/en/chrome_small/application-navigation-spec/1__Drawer_Open.png b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/orion-fusion-theme/en/chrome_small/application-navigation-spec/1__Drawer_Open.png index d282d2275..ceb807737 100644 Binary files a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/orion-fusion-theme/en/chrome_small/application-navigation-spec/1__Drawer_Open.png and b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/orion-fusion-theme/en/chrome_small/application-navigation-spec/1__Drawer_Open.png differ diff --git a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/orion-fusion-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer.png b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/orion-fusion-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer.png index d282d2275..ceb807737 100644 Binary files a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/orion-fusion-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer.png and b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/orion-fusion-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer.png differ diff --git a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/orion-fusion-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer_and_onDrawerMenuStateChange_callback_triggered.png b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/orion-fusion-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer_and_onDrawerMenuStateChange_callback_triggered.png index d282d2275..ceb807737 100644 Binary files a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/orion-fusion-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer_and_onDrawerMenuStateChange_callback_triggered.png and b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/orion-fusion-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer_and_onDrawerMenuStateChange_callback_triggered.png differ diff --git a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/terra-default-theme/en/chrome_large/application-navigation-spec/1__Popup_Open.png b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/terra-default-theme/en/chrome_large/application-navigation-spec/1__Popup_Open.png index 66bdd1ddc..b70dc448d 100644 Binary files a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/terra-default-theme/en/chrome_large/application-navigation-spec/1__Popup_Open.png and b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/terra-default-theme/en/chrome_large/application-navigation-spec/1__Popup_Open.png differ diff --git a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/terra-default-theme/en/chrome_large/application-navigation-spec/utilities_display_properly_and_onSelectLogout_called_on_clicking_logout.png b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/terra-default-theme/en/chrome_large/application-navigation-spec/utilities_display_properly_and_onSelectLogout_called_on_clicking_logout.png index 14199a136..b70dc448d 100644 Binary files a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/terra-default-theme/en/chrome_large/application-navigation-spec/utilities_display_properly_and_onSelectLogout_called_on_clicking_logout.png and b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/terra-default-theme/en/chrome_large/application-navigation-spec/utilities_display_properly_and_onSelectLogout_called_on_clicking_logout.png differ diff --git a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/terra-default-theme/en/chrome_small/application-navigation-spec/1__Drawer_Open.png b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/terra-default-theme/en/chrome_small/application-navigation-spec/1__Drawer_Open.png index 727ebbe93..19f345b91 100644 Binary files a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/terra-default-theme/en/chrome_small/application-navigation-spec/1__Drawer_Open.png and b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/terra-default-theme/en/chrome_small/application-navigation-spec/1__Drawer_Open.png differ diff --git a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/terra-default-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer.png b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/terra-default-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer.png index 727ebbe93..19f345b91 100644 Binary files a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/terra-default-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer.png and b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/terra-default-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer.png differ diff --git a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/terra-default-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer_and_onDrawerMenuStateChange_callback_triggered.png b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/terra-default-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer_and_onDrawerMenuStateChange_callback_triggered.png index 727ebbe93..19f345b91 100644 Binary files a/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/terra-default-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer_and_onDrawerMenuStateChange_callback_triggered.png and b/packages/terra-application/tests/wdio/application-navigation/private/__snapshots__/reference/terra-default-theme/en/chrome_small/application-navigation-spec/ApplicationNavigation_displays_nav_drawer_and_onDrawerMenuStateChange_callback_triggered.png differ diff --git a/packages/terra-dev-site/CHANGELOG.md b/packages/terra-dev-site/CHANGELOG.md index 69402d9fa..b7b9c6afd 100644 --- a/packages/terra-dev-site/CHANGELOG.md +++ b/packages/terra-dev-site/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +* Changed + * Update wdio snapshot to fix build. + ## 7.6.1 - (June 22, 2022) * Changed diff --git a/packages/terra-dev-site/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_huge/loaders-spec/props_table.png b/packages/terra-dev-site/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_huge/loaders-spec/props_table.png index a0fbc8a8e..0dfd50122 100644 Binary files a/packages/terra-dev-site/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_huge/loaders-spec/props_table.png and b/packages/terra-dev-site/tests/wdio/__snapshots__/reference/orion-fusion-theme/en/chrome_huge/loaders-spec/props_table.png differ