-
Notifications
You must be signed in to change notification settings - Fork 13
Migrating the NotificationDialog and integrating with LayerManager #238
Migrating the NotificationDialog and integrating with LayerManager #238
Conversation
@@ -2,14 +2,13 @@ import React from 'react'; | |||
import PropTypes from 'prop-types'; |
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 recommend viewing this entire file. Git has treated this as change+move of the temporary dev-site file, but the temporary files weren't ever reviewed.
Edit: Seems I finally changed enough for git to treat this as new.
@@ -1,5 +1,5 @@ | |||
import React, { useState } from 'react'; | |||
import UnsavedChangesPrompt from '@cerner/terra-dev-site/lib/terra-application-temporary/unsaved-changes-prompt'; | |||
import UnsavedChangesPrompt from '@cerner/terra-application/lib/unsaved-changes-prompt'; |
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.
Pointing to the official code now, temporary files have been removed.
packages/terra-application/src/notification-dialog/NotificationDialog.jsx
Outdated
Show resolved
Hide resolved
<div className={cx('overlay')} /> | ||
<div className={cx('notification-dialog')}> | ||
<div tabIndex="-1" ref={initialFocusAnchorRef} /> | ||
<div className={cx('notification-dialog-inner-wrapper')}> | ||
<div className={cx('notification-dialog-container')}> | ||
<div className={cx('floating-header-background', variant)} /> | ||
<div className={cx('header')}> | ||
<div className={cx('header-content')}> |
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.
thats alot of divs
…ation into story-204-notification-dialog-migration # Conflicts: # packages/terra-application-docs/src/terra-dev-site/test/terra-application/shared/TestPage.jsx # packages/terra-application/CHANGELOG.md
* The button text and onclick values of the accept button. | ||
*/ | ||
acceptAction: PropTypes.shape({ | ||
text: PropTypes.string, |
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.
Nit. Should these sub-items be doc'd?
* @param {Object} containerRef React ref object containing current value of | ||
* the element to trap focus within. | ||
*/ | ||
const useFocusTrap = (containerRef) => { |
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 like this. Good work. 👍
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.
Using inert everywhere allows us to keep this pretty simple. Should be able to put it in the new modals as well, I can externalize the hook when that is the case.
Summary
Closes #204
Deployment Link
https://terra-applic-.herokuapp.com/
Testing
Additional Details
Thank you for contributing to Terra.
@cerner/terra