From 7a9afd86c82d0cb0f43dd21a8565e9858ad35351 Mon Sep 17 00:00:00 2001 From: Alex Zhou Date: Tue, 5 Nov 2024 11:21:29 -0700 Subject: [PATCH 1/6] add layers icon to indicate composite notification --- package-lock.json | 4 ++-- package.json | 2 +- src/components/Icon/Icon.js | 6 +++++- .../NotificationItem/NotificationItem.js | 12 ++++++++++-- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1042ecbb1..f9c50f653 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "react-autoql", - "version": "8.8.29", + "version": "8.8.30", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "react-autoql", - "version": "8.8.29", + "version": "8.8.30", "license": "ISC", "dependencies": { "@react-icons/all-files": "^4.1.0", diff --git a/package.json b/package.json index 855ece446..da525df6c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-autoql", - "version": "8.8.29", + "version": "8.8.30", "description": "React Widget Library", "main": "dist/autoql.cjs.js", "module": "dist/autoql.esm.js", diff --git a/src/components/Icon/Icon.js b/src/components/Icon/Icon.js index ee1191e2d..c430ef5bd 100644 --- a/src/components/Icon/Icon.js +++ b/src/components/Icon/Icon.js @@ -37,6 +37,7 @@ import { FiCheck } from '@react-icons/all-files/fi/FiCheck' import { FiDatabase } from '@react-icons/all-files/fi/FiDatabase' import { FiDownload } from '@react-icons/all-files/fi/FiDownload' import { FiEye } from '@react-icons/all-files/fi/FiEye' +import { FiLayers } from '@react-icons/all-files/fi/FiLayers' import { FiMoreHorizontal } from '@react-icons/all-files/fi/FiMoreHorizontal' import { FiMoreVertical } from '@react-icons/all-files/fi/FiMoreVertical' import { FiPauseCircle } from '@react-icons/all-files/fi/FiPauseCircle' @@ -49,7 +50,6 @@ import { FiMinimize } from '@react-icons/all-files/fi/FiMinimize' import { FiRefreshCw } from '@react-icons/all-files/fi/FiRefreshCw' import { FiTool } from '@react-icons/all-files/fi/FiTool' import { FiMinus } from '@react-icons/all-files/fi/FiMinus' - import { RiFilterLine } from '@react-icons/all-files/ri/RiFilterLine' import { RiFilterOffLine } from '@react-icons/all-files/ri/RiFilterOffLine' import { RiListSettingsLine } from '@react-icons/all-files/ri/RiListSettingsLine' @@ -212,6 +212,10 @@ export default class Icon extends React.Component { icon = break } + case 'layers': { + icon = + break + } case 'mark-read': { icon = break diff --git a/src/components/Notifications/NotificationItem/NotificationItem.js b/src/components/Notifications/NotificationItem/NotificationItem.js index 7dd8269ee..3e94712ae 100644 --- a/src/components/Notifications/NotificationItem/NotificationItem.js +++ b/src/components/Notifications/NotificationItem/NotificationItem.js @@ -265,7 +265,12 @@ export default class NotificationItem extends React.Component { ) } - return {this.props.notification.title} + return ( + + {this.props.notification?.project?.id === 'composite' && } + {this.props.notification.title} + + ) } renderNotificationMessage = () => { @@ -556,10 +561,13 @@ export default class NotificationItem extends React.Component { ${this.isUnread() ? 'unread' : ''} ${this.isError() ? 'is-error' : ''} ${this.state.isMoreOptionsMenuOpen ? 'menu-open' : ''} - ${this.state.deleted ? 'react-autoql-notification-item-deleted' : ''}`} + ${this.state.deleted ? 'react-autoql-notification-item-deleted' : ''} + ${this.props.notification?.project?.id === 'composite' ? 'composite-project' : ''} + `} > {!this.props.tooltipID && } {!this.props.chartTooltipID && } + {this.renderNotificationHeader()} {this.renderNotificationContent()} {this.renderAlertColorStrip()} From 9f9cfc3ae3ecfa358ec735d788d431c8610c2a8f Mon Sep 17 00:00:00 2001 From: Alex Zhou Date: Tue, 5 Nov 2024 11:36:29 -0700 Subject: [PATCH 2/6] delete empty row --- .../Notifications/NotificationItem/NotificationItem.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/Notifications/NotificationItem/NotificationItem.js b/src/components/Notifications/NotificationItem/NotificationItem.js index 3e94712ae..1ae0f9cc0 100644 --- a/src/components/Notifications/NotificationItem/NotificationItem.js +++ b/src/components/Notifications/NotificationItem/NotificationItem.js @@ -567,7 +567,6 @@ export default class NotificationItem extends React.Component { > {!this.props.tooltipID && } {!this.props.chartTooltipID && } - {this.renderNotificationHeader()} {this.renderNotificationContent()} {this.renderAlertColorStrip()} From 0fd20d7bd1999e1f0b2f83b19b83665d903b0568 Mon Sep 17 00:00:00 2001 From: Alex Zhou Date: Tue, 5 Nov 2024 11:38:29 -0700 Subject: [PATCH 3/6] align the line --- .../Notifications/NotificationItem/NotificationItem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Notifications/NotificationItem/NotificationItem.js b/src/components/Notifications/NotificationItem/NotificationItem.js index 1ae0f9cc0..52fc88605 100644 --- a/src/components/Notifications/NotificationItem/NotificationItem.js +++ b/src/components/Notifications/NotificationItem/NotificationItem.js @@ -562,7 +562,7 @@ export default class NotificationItem extends React.Component { ${this.isError() ? 'is-error' : ''} ${this.state.isMoreOptionsMenuOpen ? 'menu-open' : ''} ${this.state.deleted ? 'react-autoql-notification-item-deleted' : ''} - ${this.props.notification?.project?.id === 'composite' ? 'composite-project' : ''} + ${this.props.notification?.project?.id === 'composite' ? 'composite-project' : ''} `} > {!this.props.tooltipID && } From 1811f72c9219324667d7a6b632023e1c74ef4056 Mon Sep 17 00:00:00 2001 From: Alex Zhou Date: Tue, 5 Nov 2024 11:42:33 -0700 Subject: [PATCH 4/6] try align again --- .../Notifications/NotificationItem/NotificationItem.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/Notifications/NotificationItem/NotificationItem.js b/src/components/Notifications/NotificationItem/NotificationItem.js index 52fc88605..63eb8ecb5 100644 --- a/src/components/Notifications/NotificationItem/NotificationItem.js +++ b/src/components/Notifications/NotificationItem/NotificationItem.js @@ -562,8 +562,7 @@ export default class NotificationItem extends React.Component { ${this.isError() ? 'is-error' : ''} ${this.state.isMoreOptionsMenuOpen ? 'menu-open' : ''} ${this.state.deleted ? 'react-autoql-notification-item-deleted' : ''} - ${this.props.notification?.project?.id === 'composite' ? 'composite-project' : ''} - `} + ${this.props.notification?.project?.id === 'composite' ? 'composite-project' : ''}`} > {!this.props.tooltipID && } {!this.props.chartTooltipID && } From 92beaec22396323703b8ea74b4b9068090de3df1 Mon Sep 17 00:00:00 2001 From: Alex Zhou Date: Tue, 5 Nov 2024 11:45:35 -0700 Subject: [PATCH 5/6] try align again --- .../Notifications/NotificationItem/NotificationItem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Notifications/NotificationItem/NotificationItem.js b/src/components/Notifications/NotificationItem/NotificationItem.js index 63eb8ecb5..18cbfa579 100644 --- a/src/components/Notifications/NotificationItem/NotificationItem.js +++ b/src/components/Notifications/NotificationItem/NotificationItem.js @@ -561,7 +561,7 @@ export default class NotificationItem extends React.Component { ${this.isUnread() ? 'unread' : ''} ${this.isError() ? 'is-error' : ''} ${this.state.isMoreOptionsMenuOpen ? 'menu-open' : ''} - ${this.state.deleted ? 'react-autoql-notification-item-deleted' : ''} + ${this.state.deleted ? 'react-autoql-notification-item-deleted' : ''} ${this.props.notification?.project?.id === 'composite' ? 'composite-project' : ''}`} > {!this.props.tooltipID && } From fd983f2ed629834ed56f55308c885316b53f0048 Mon Sep 17 00:00:00 2001 From: Alex Zhou Date: Tue, 5 Nov 2024 11:47:28 -0700 Subject: [PATCH 6/6] try align again --- .../Notifications/NotificationItem/NotificationItem.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Notifications/NotificationItem/NotificationItem.js b/src/components/Notifications/NotificationItem/NotificationItem.js index 18cbfa579..aad749b70 100644 --- a/src/components/Notifications/NotificationItem/NotificationItem.js +++ b/src/components/Notifications/NotificationItem/NotificationItem.js @@ -561,8 +561,8 @@ export default class NotificationItem extends React.Component { ${this.isUnread() ? 'unread' : ''} ${this.isError() ? 'is-error' : ''} ${this.state.isMoreOptionsMenuOpen ? 'menu-open' : ''} - ${this.state.deleted ? 'react-autoql-notification-item-deleted' : ''} - ${this.props.notification?.project?.id === 'composite' ? 'composite-project' : ''}`} + ${this.state.deleted ? 'react-autoql-notification-item-deleted' : ''} + ${this.props.notification?.project?.id === 'composite' ? 'composite-project' : ''}`} > {!this.props.tooltipID && } {!this.props.chartTooltipID && }