Skip to content

Commit

Permalink
TASK: Move component FlashMessages to neos-ui-error package
Browse files Browse the repository at this point in the history
  • Loading branch information
grebaldi committed Jun 11, 2024
1 parent 492f0cd commit 7cd6b2d
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 30 deletions.
4 changes: 3 additions & 1 deletion packages/neos-ui-error/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
"main": "./src/index.ts",
"dependencies": {
"@neos-project/neos-ui-i18n": "workspace:*",
"@neos-project/neos-ui-redux-store": "workspace:*",
"@neos-project/react-ui-components": "workspace:*",
"classnames": "^2.2.3",
"react": "^16.12.0"
"react": "^16.12.0",
"react-redux": "^7.1.3"
},
"license": "GNU GPLv3",
"stableVersion": "8.3.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {connect} from 'react-redux';
import {actions} from '@neos-project/neos-ui-redux-store';
import {GlobalState} from '@neos-project/neos-ui-redux-store/src/System';

import FlashMessage from './FlashMessage';
import {FlashMessage} from './FlashMessage';

import style from './style.module.css';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* information, please view the LICENSE file which was distributed with this
* source code.
*/
export {FlashMessage as default} from './FlashMessage';
export {FlashMessages} from './FlashMessages';
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
.flashMessageContainer {
position: fixed;
z-index: var(--zIndex-FlashMessageContainer);
top: 0;
left: 50%;
width: 516px;
margin-top: 8px;
transform: translate(-50%, 0);
max-height: calc(100% - 16px);
overflow: auto;

&:empty {
display: none;
}
}

.flashMessage {
color: white;
font-size: 14px;
Expand Down Expand Up @@ -30,7 +46,7 @@
position: absolute;
left: 0;
top: 0;
height: 100%;
height: 100% !important;
line-height: var(--spacing-GoldenUnit);
width: var(--spacing-GoldenUnit) !important;
text-align: center;
Expand Down
1 change: 1 addition & 0 deletions packages/neos-ui-error/src/container/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
*/
export {ErrorBoundary, terminateDueToFatalInitializationError} from './ErrorBoundary';
export {ErrorView} from './ErrorView';
export {FlashMessages} from './FlashMessages';
1 change: 1 addition & 0 deletions packages/neos-ui-error/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ export type {
export {
ErrorBoundary,
ErrorView,
FlashMessages,
terminateDueToFatalInitializationError
} from './container';
2 changes: 1 addition & 1 deletion packages/neos-ui/src/Containers/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {connect} from 'react-redux';
import mergeClassNames from 'classnames';
import style from './style.module.css';

import FlashMessages from './FlashMessages/index';
import {FlashMessages} from '@neos-project/neos-ui-error';

const App = ({globalRegistry, menu, isFullScreen, leftSidebarIsHidden, rightSidebarIsHidden}) => {
const containerRegistry = globalRegistry.get('containers');
Expand Down
10 changes: 0 additions & 10 deletions packages/neos-ui/src/Containers/FlashMessages/index.ts

This file was deleted.

15 changes: 0 additions & 15 deletions packages/neos-ui/src/Containers/FlashMessages/style.module.css

This file was deleted.

2 changes: 2 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2442,9 +2442,11 @@ __metadata:
resolution: "@neos-project/neos-ui-error@workspace:packages/neos-ui-error"
dependencies:
"@neos-project/neos-ui-i18n": "workspace:*"
"@neos-project/neos-ui-redux-store": "workspace:*"
"@neos-project/react-ui-components": "workspace:*"
classnames: ^2.2.3
react: ^16.12.0
react-redux: ^7.1.3
languageName: unknown
linkType: soft

Expand Down

0 comments on commit 7cd6b2d

Please sign in to comment.