From 31044c1e307934925777ba6bba7531407c0167e7 Mon Sep 17 00:00:00 2001 From: Niels de Jong Date: Wed, 3 Jan 2024 16:07:47 +0100 Subject: [PATCH 01/52] Fixed issue where table action rule creation modal displayed invalid suggestions --- src/extensions/actions/ActionsRuleCreationModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extensions/actions/ActionsRuleCreationModal.tsx b/src/extensions/actions/ActionsRuleCreationModal.tsx index de8244776..30b8fa6b7 100644 --- a/src/extensions/actions/ActionsRuleCreationModal.tsx +++ b/src/extensions/actions/ActionsRuleCreationModal.tsx @@ -230,7 +230,7 @@ export const NeoCustomReportActionsModal = ({ } // When we are accessing node properties (not page names), parse the node label + property pair to only show properties. - if (rule.customization !== 'set page') { + if (rule.customization !== 'set page' && (type == 'graph' || type == 'map')) { suggestions = suggestions.map((e) => e.split('.')[1] || e); } From b6b36f2887bd19c145047c449c6dceb03f269a9e Mon Sep 17 00:00:00 2001 From: Niels de Jong Date: Wed, 3 Jan 2024 16:34:03 +0100 Subject: [PATCH 02/52] Add support for links in table actions, as well as improved rendering of links in markdown --- public/style.css | 4 ++++ src/chart/ChartUtils.ts | 2 +- src/chart/markdown/MarkdownChart.tsx | 5 ++++- src/chart/table/TableChart.tsx | 2 +- src/report/ReportRecordProcessing.tsx | 9 +++++++-- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/public/style.css b/public/style.css index 3d719f02f..b4f9d93f1 100644 --- a/public/style.css +++ b/public/style.css @@ -253,3 +253,7 @@ display: none; } /* End Gantt chart workaround */ + +.markdown-widget a { + text-decoration: underline; +} \ No newline at end of file diff --git a/src/chart/ChartUtils.ts b/src/chart/ChartUtils.ts index d6c011395..8b74531d9 100644 --- a/src/chart/ChartUtils.ts +++ b/src/chart/ChartUtils.ts @@ -219,7 +219,7 @@ export function replaceDashboardParameters(str, parameters) { let param = _.replace(`$`, '').trim(); let val = parameters?.[param] || null; let type = getRecordType(val); - let valueRender = type === 'string' ? val : RenderSubValue(val); + let valueRender = type === 'string' || type == 'link' ? val : RenderSubValue(val); return valueRender; }; diff --git a/src/chart/markdown/MarkdownChart.tsx b/src/chart/markdown/MarkdownChart.tsx index 759aff145..d373b0da5 100644 --- a/src/chart/markdown/MarkdownChart.tsx +++ b/src/chart/markdown/MarkdownChart.tsx @@ -19,7 +19,10 @@ const NeoMarkdownChart = (props: ChartProps) => { const modifiedMarkdown = replaceGlobalParameters ? replaceDashboardParameters(markdown, parameters) : markdown; // TODO: we should check if the gfm plugin has an impact on the standard security provided by ReactMarkdown return ( -
+
); diff --git a/src/chart/table/TableChart.tsx b/src/chart/table/TableChart.tsx index 37ff91216..f094d5247 100644 --- a/src/chart/table/TableChart.tsx +++ b/src/chart/table/TableChart.tsx @@ -45,7 +45,7 @@ function renderAsButtonWrapper(renderer) { style={{ width: '100%', marginLeft: '5px', marginRight: '5px' }} variant='contained' color='primary' - >{`${renderer(value)}`} + >{`${renderer(value, true)}`} ); }; } diff --git a/src/report/ReportRecordProcessing.tsx b/src/report/ReportRecordProcessing.tsx index ed850d18d..1ce24ffc0 100644 --- a/src/report/ReportRecordProcessing.tsx +++ b/src/report/ReportRecordProcessing.tsx @@ -269,7 +269,12 @@ function RenderString(value) { return str; } -function RenderLink(value) { +function RenderLink(value, disabled = false) { + // If the link is embedded in a button (disabled), it's not a hyperlink, so we just return the string. + if (disabled) { + return value; + } + // Else, it's a 'real' link, and return a React object return ( {value} @@ -389,7 +394,7 @@ export const rendererForType: any = { }, link: { type: 'link', - renderValue: (c) => RenderLink(c.value), + renderValue: (c, disabled = false) => RenderLink(c.value, disabled), }, }; From 78a56fd465664eac805dc8c389bc20841ad2803b Mon Sep 17 00:00:00 2001 From: Niels de Jong Date: Wed, 3 Jan 2024 16:40:42 +0100 Subject: [PATCH 03/52] No longer rendering empty buttons for missing values in table actions --- src/chart/table/TableChart.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/chart/table/TableChart.tsx b/src/chart/table/TableChart.tsx index f094d5247..293d4398d 100644 --- a/src/chart/table/TableChart.tsx +++ b/src/chart/table/TableChart.tsx @@ -40,12 +40,17 @@ const fallbackRenderer = (value) => { function renderAsButtonWrapper(renderer) { return function renderAsButton(value) { + const outputValue = renderer(value, true); + // If there's nothing to be rendered, there's no button needed. + if (outputValue == '') { + return <>; + } return ( + >{`${outputValue}`} ); }; } From 3b717402c23aae001ce6c9c914350b53a2dac7cb Mon Sep 17 00:00:00 2001 From: Niels de Jong Date: Thu, 4 Jan 2024 11:18:56 +0100 Subject: [PATCH 04/52] Fix number formatting to always use en-US locale --- src/report/ReportRecordProcessing.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/report/ReportRecordProcessing.tsx b/src/report/ReportRecordProcessing.tsx index 1ce24ffc0..1109d1e3a 100644 --- a/src/report/ReportRecordProcessing.tsx +++ b/src/report/ReportRecordProcessing.tsx @@ -304,7 +304,7 @@ function RenderInteger(value) { if (!value || !value.toInt) { return RenderNumber(value); } - const integer = value.toNumber().toLocaleString(); + const integer = value.toNumber().toLocaleString('en-US'); return integer; } @@ -312,7 +312,7 @@ function RenderNumber(value) { if (value === null || !value.toLocaleString) { return 'null'; } - const number = value.toLocaleString(); + const number = value.toLocaleString('en-US'); return number; } From 3f173ce053163b68dd29da391e5e5a6185a866ff Mon Sep 17 00:00:00 2001 From: Niels de Jong Date: Thu, 4 Jan 2024 11:40:53 +0100 Subject: [PATCH 05/52] Fixed issue where dashboard database was not set correctly for share links without credentials --- src/application/ApplicationThunks.ts | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/application/ApplicationThunks.ts b/src/application/ApplicationThunks.ts index 42d625d3e..abf58f75f 100644 --- a/src/application/ApplicationThunks.ts +++ b/src/application/ApplicationThunks.ts @@ -87,10 +87,9 @@ export const createConnectionThunk = 'ERR - connect to DB', database, '', - `Error while trying to establish connection to Neo4j DB in ${ - neodashMode - } mode at ${ - Date(Date.now()).substring(0, 33)}` + `Error while trying to establish connection to Neo4j DB in ${neodashMode} mode at ${Date( + Date.now() + ).substring(0, 33)}` ) ); } @@ -113,11 +112,10 @@ export const createConnectionThunk = 'INF - connect to DB', database, '', - `${username - } established connection to Neo4j DB in ${ - neodashMode - } mode at ${ - Date(Date.now()).substring(0, 33)}` + `${username} established connection to Neo4j DB in ${neodashMode} mode at ${Date(Date.now()).substring( + 0, + 33 + )}` ) ); } @@ -261,12 +259,12 @@ export const handleSharedDashboardsThunk = () => (dispatch: any) => { const skipConfirmation = urlParams.get('skipConfirmation') == 'Yes'; const dashboardDatabase = urlParams.get('dashboardDatabase'); + dispatch(setStandaloneDashboardDatabase(dashboardDatabase)); if (urlParams.get('credentials')) { const connection = decodeURIComponent(urlParams.get('credentials')); const protocol = connection.split('://')[0]; const username = connection.split('://')[1].split(':')[0]; const password = connection.split('://')[1].split(':')[1].split('@')[0]; - const database = connection.split('@')[1].split(':')[0]; const url = connection.split('@')[1].split(':')[1]; const port = connection.split('@')[1].split(':')[2]; From 013344c4209e867e5e811c6bda0a6fc0021eeb1f Mon Sep 17 00:00:00 2001 From: Niels de Jong Date: Thu, 4 Jan 2024 11:51:47 +0100 Subject: [PATCH 06/52] Fixed dashboard title visibility in sidebar --- src/dashboard/sidebar/DashboardSidebarListItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dashboard/sidebar/DashboardSidebarListItem.tsx b/src/dashboard/sidebar/DashboardSidebarListItem.tsx index 0740224c3..72f3951e8 100644 --- a/src/dashboard/sidebar/DashboardSidebarListItem.tsx +++ b/src/dashboard/sidebar/DashboardSidebarListItem.tsx @@ -28,7 +28,7 @@ export const DashboardSidebarListItem = ({ size='medium' color={selected == true ? (saved == true ? 'primary' : 'warning') : 'neutral'} style={{ - width: '300px', + width: '240px', whiteSpace: 'nowrap', overflowX: 'clip', justifyContent: 'left', From 468540cf67b86695be91dc0636ebc82533ebaef0 Mon Sep 17 00:00:00 2001 From: Niels de Jong Date: Thu, 4 Jan 2024 11:55:01 +0100 Subject: [PATCH 07/52] Added missing setting to pie chart configuration --- src/config/ReportConfig.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/config/ReportConfig.tsx b/src/config/ReportConfig.tsx index 101302f7b..0a95fd88e 100644 --- a/src/config/ReportConfig.tsx +++ b/src/config/ReportConfig.tsx @@ -642,6 +642,12 @@ const _REPORT_TYPES = { type: SELECTION_TYPES.NUMBER, default: 50, }, + hideSelections: { + label: 'Hide Property Selection', + type: SELECTION_TYPES.LIST, + values: [true, false], + default: false, + }, refreshButtonEnabled: { label: 'Refreshable', type: SELECTION_TYPES.LIST, From 3e0e1ad95731215ece090ea02c7d07a88b29233f Mon Sep 17 00:00:00 2001 From: Niels de Jong Date: Fri, 5 Jan 2024 08:58:53 +0100 Subject: [PATCH 08/52] Clean up code, remove old console.log statements --- src/application/ApplicationThunks.ts | 38 +++++++++++++------ .../actions/ActionsRuleCreationModal.tsx | 1 - src/settings/SettingsModal.tsx | 2 +- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/src/application/ApplicationThunks.ts b/src/application/ApplicationThunks.ts index abf58f75f..4a7f7b6dc 100644 --- a/src/application/ApplicationThunks.ts +++ b/src/application/ApplicationThunks.ts @@ -261,6 +261,7 @@ export const handleSharedDashboardsThunk = () => (dispatch: any) => { const dashboardDatabase = urlParams.get('dashboardDatabase'); dispatch(setStandaloneDashboardDatabase(dashboardDatabase)); if (urlParams.get('credentials')) { + setWelcomeScreenOpen(false); const connection = decodeURIComponent(urlParams.get('credentials')); const protocol = connection.split('://')[0]; const username = connection.split('://')[1].split(':')[0]; @@ -268,17 +269,32 @@ export const handleSharedDashboardsThunk = () => (dispatch: any) => { const database = connection.split('@')[1].split(':')[0]; const url = connection.split('@')[1].split(':')[1]; const port = connection.split('@')[1].split(':')[2]; - if (url == password) { - // Special case where a connect link is generated without a password. - // Here, the format is parsed incorrectly and we open the connection window instead. - - dispatch(resetShareDetails()); - dispatch(setConnectionProperties(protocol, url, port, database, username.split('@')[0], '')); - dispatch(setWelcomeScreenOpen(false)); - dispatch(setConnectionModalOpen(true)); - // window.history.pushState({}, document.title, "/"); - return; - } + // if (url == password) { + // // Special case where a connect link is generated without a password. + // // Here, the format is parsed incorrectly and we open the connection window instead. + // dispatch(setConnectionProperties(protocol, url, port, database, username.split('@')[0], '')); + // dispatch( + // setShareDetailsFromUrl( + // type, + // id, + // standalone, + // protocol, + // url, + // port, + // database, + // username.split('@')[0], + // '', + // dashboardDatabase, + // true + // ) + // ); + // setDashboardToLoadAfterConnecting(id); + // window.history.pushState({}, document.title, window.location.pathname); + // dispatch(setConnectionModalOpen(true)); + // dispatch(setWelcomeScreenOpen(false)); + // // window.history.pushState({}, document.title, "/"); + // return; + // } dispatch(setConnectionModalOpen(false)); dispatch( diff --git a/src/extensions/actions/ActionsRuleCreationModal.tsx b/src/extensions/actions/ActionsRuleCreationModal.tsx index 30b8fa6b7..61decd314 100644 --- a/src/extensions/actions/ActionsRuleCreationModal.tsx +++ b/src/extensions/actions/ActionsRuleCreationModal.tsx @@ -238,7 +238,6 @@ export const NeoCustomReportActionsModal = ({ }; const handleOnInputchange = (customization, index, value) => { - console.log(customization, index, value); updateRuleField(index, 'value', value); if (type == 'bar' && customization !== 'set page') { // For bar charts, duplicate the value to rule.field diff --git a/src/settings/SettingsModal.tsx b/src/settings/SettingsModal.tsx index 1ff996f57..7989c7c6c 100644 --- a/src/settings/SettingsModal.tsx +++ b/src/settings/SettingsModal.tsx @@ -44,7 +44,7 @@ export const NeoSettingsModal = ({ dashboardSettings, updateDashboardSetting }) return ( <> - + From 86dca1bac6be3c15118f081cde9ca728c57fc6e1 Mon Sep 17 00:00:00 2001 From: Niels de Jong Date: Wed, 10 Jan 2024 11:21:21 +0100 Subject: [PATCH 09/52] Stability and UX for table checkbox actiosn --- src/chart/table/TableChart.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/chart/table/TableChart.tsx b/src/chart/table/TableChart.tsx index 293d4398d..4f5f08e3a 100644 --- a/src/chart/table/TableChart.tsx +++ b/src/chart/table/TableChart.tsx @@ -112,8 +112,7 @@ export const NeoTableChart = (props: ChartProps) => { return key != 'id' ? key : `${key} `; }; - const actionableFields = actionsRules.map((r) => r.field); - + const actionableFields = actionsRules.filter((r) => r.condition !== 'rowCheck').map((r) => r.field); const columns = transposed ? [records[0].keys[0]].concat(records.map((record) => record._fields[0]?.toString() || '')).map((key, i) => { const uniqueKey = `${String(key)}_${i}`; @@ -131,7 +130,9 @@ export const NeoTableChart = (props: ChartProps) => { actionableFields.includes(key) ); }) - : records[0].keys.map((key, i) => { + : records[0] && + records[0].keys && + records[0].keys.map((key, i) => { const value = records[0].get(key); if (columnWidthsType == 'Relative (%)') { return ApplyColumnType( From 333f9e2ea9335e3de72c7e89c2199d0e94ba0bc2 Mon Sep 17 00:00:00 2001 From: Niels de Jong Date: Wed, 10 Jan 2024 13:20:05 +0100 Subject: [PATCH 10/52] Handling shared dashboards in standalone mode --- src/application/ApplicationThunks.ts | 2 +- src/dashboard/DashboardThunks.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/application/ApplicationThunks.ts b/src/application/ApplicationThunks.ts index ad27b12d6..23959749b 100644 --- a/src/application/ApplicationThunks.ts +++ b/src/application/ApplicationThunks.ts @@ -271,7 +271,6 @@ export const handleSharedDashboardsThunk = () => (dispatch: any) => { if (url == password) { // Special case where a connect link is generated without a password. // Here, the format is parsed incorrectly and we open the connection window instead. - dispatch(resetShareDetails()); dispatch(setConnectionProperties(protocol, url, port, database, username.split('@')[0], '')); dispatch(setWelcomeScreenOpen(false)); @@ -648,4 +647,5 @@ export const initializeApplicationAsStandaloneThunk = } else { dispatch(setConnectionModalOpen(true)); } + dispatch(handleSharedDashboardsThunk()); }; diff --git a/src/dashboard/DashboardThunks.ts b/src/dashboard/DashboardThunks.ts index c920c8d69..8e2721da8 100644 --- a/src/dashboard/DashboardThunks.ts +++ b/src/dashboard/DashboardThunks.ts @@ -404,7 +404,7 @@ export const loadDashboardFromNeo4jByNameThunk = if (records.length == 0) { dispatch( createNotificationThunk( - 'Unable to load dashboard.', + `Unable to load dashboard "${ name }".`, 'A dashboard with the provided name could not be found.' ) ); @@ -429,7 +429,7 @@ export const loadDashboardFromNeo4jByNameThunk = } if (records[0].error) { - dispatch(createNotificationThunk('Unable to load dashboard.', records[0].error)); + dispatch(createNotificationThunk(`Unable to load dashboard "${ name }".`, records[0].error)); if (loggingSettings.loggingMode > '1') { dispatch( createLogThunk( From fdc3be2a269b1859e5fb96030f611967575b3422 Mon Sep 17 00:00:00 2001 From: Niels de Jong Date: Thu, 11 Jan 2024 09:30:42 +0100 Subject: [PATCH 11/52] Added hidden setting for hiding the plaintext password warning. Fixed issue with casting null dates --- src/application/ApplicationActions.ts | 2 ++ src/application/ApplicationReducer.ts | 2 ++ src/application/ApplicationSelectors.ts | 1 + src/application/ApplicationThunks.ts | 2 +- src/chart/ChartUtils.ts | 3 +++ src/dashboard/Dashboard.tsx | 4 ++-- 6 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/application/ApplicationActions.ts b/src/application/ApplicationActions.ts index 084d4d31b..0b556f2dc 100644 --- a/src/application/ApplicationActions.ts +++ b/src/application/ApplicationActions.ts @@ -150,6 +150,7 @@ export const setStandaloneEnabled = ( standaloneDashboardURL: string, standaloneUsername: string, standalonePassword: string, + standalonePasswordWarningHidden: boolean, standaloneAllowLoad: boolean, standaloneLoadFromOtherDatabases: boolean, standaloneMultiDatabase: boolean, @@ -167,6 +168,7 @@ export const setStandaloneEnabled = ( standaloneDashboardURL, standaloneUsername, standalonePassword, + standalonePasswordWarningHidden, standaloneAllowLoad, standaloneLoadFromOtherDatabases, standaloneMultiDatabase, diff --git a/src/application/ApplicationReducer.ts b/src/application/ApplicationReducer.ts index 9c6f81068..6172d2709 100644 --- a/src/application/ApplicationReducer.ts +++ b/src/application/ApplicationReducer.ts @@ -195,6 +195,7 @@ export const applicationReducer = (state = initialState, action: { type: any; pa standaloneDashboardURL, standaloneUsername, standalonePassword, + standalonePasswordWarningHidden, standaloneAllowLoad, standaloneLoadFromOtherDatabases, standaloneMultiDatabase, @@ -211,6 +212,7 @@ export const applicationReducer = (state = initialState, action: { type: any; pa standaloneDashboardURL: standaloneDashboardURL, standaloneUsername: standaloneUsername, standalonePassword: standalonePassword, + standalonePasswordWarningHidden: standalonePasswordWarningHidden, standaloneAllowLoad: standaloneAllowLoad, standaloneLoadFromOtherDatabases: standaloneLoadFromOtherDatabases, standaloneMultiDatabase: standaloneMultiDatabase, diff --git a/src/application/ApplicationSelectors.ts b/src/application/ApplicationSelectors.ts index b4912a9b9..4986ff564 100644 --- a/src/application/ApplicationSelectors.ts +++ b/src/application/ApplicationSelectors.ts @@ -94,6 +94,7 @@ export const applicationGetStandaloneSettings = (state: any) => { standaloneDashboardURL: state.application.standaloneDashboardURL, standaloneUsername: state.application.standaloneUsername, standalonePassword: state.application.standalonePassword, + standalonePasswordWarningHidden: state.application.standalonePasswordWarningHidden, standaloneAllowLoad: state.application.standaloneAllowLoad, standaloneLoadFromOtherDatabases: state.application.standaloneLoadFromOtherDatabases, standaloneMultiDatabase: state.application.standaloneMultiDatabase, diff --git a/src/application/ApplicationThunks.ts b/src/application/ApplicationThunks.ts index 63be407b1..fc880fd3a 100644 --- a/src/application/ApplicationThunks.ts +++ b/src/application/ApplicationThunks.ts @@ -464,6 +464,7 @@ export const loadApplicationConfigThunk = () => async (dispatch: any, getState: config.standaloneDashboardURL, config.standaloneUsername, config.standalonePassword, + config.standalonePasswordWarningHidden, config.standaloneAllowLoad, config.standaloneLoadFromOtherDatabases, config.standaloneMultiDatabase, @@ -621,7 +622,6 @@ export const initializeApplicationAsStandaloneThunk = (config, paramsToSetAfterConnecting) => (dispatch: any, getState: any) => { const clearNotificationAfterLoad = true; const state = getState(); - // If we are running in standalone mode, auto-set the connection details that are configured. dispatch( setConnectionProperties( diff --git a/src/chart/ChartUtils.ts b/src/chart/ChartUtils.ts index 8b74531d9..d5167d19b 100644 --- a/src/chart/ChartUtils.ts +++ b/src/chart/ChartUtils.ts @@ -406,6 +406,9 @@ export const isEmptyObject = (obj: object) => { * @returns True if it's an object castable to date */ export function isCastableToNeo4jDate(value: object) { + if (value == null || value == undefined) { + return false; + } let keys = Object.keys(value); return keys.length == 3 && keys.includes('day') && keys.includes('month') && keys.includes('year'); } diff --git a/src/dashboard/Dashboard.tsx b/src/dashboard/Dashboard.tsx index 50b266e60..1039fce91 100644 --- a/src/dashboard/Dashboard.tsx +++ b/src/dashboard/Dashboard.tsx @@ -36,7 +36,6 @@ const Dashboard = ({ ); setDriver(newDriver); } - const content = ( - {standaloneSettings.standalonePassword ? ( + {standaloneSettings.standalonePassword && + standaloneSettings.standalonePasswordWarningHidden !== true ? (
Warning: NeoDash is running with a plaintext password in config.json.
From 3cd49c5340d90d061e4de04285595d31eb896c03 Mon Sep 17 00:00:00 2001 From: Niels de Jong Date: Thu, 11 Jan 2024 10:49:28 +0100 Subject: [PATCH 12/52] Style tweaks for reports without footers --- public/style.css | 5 +++-- src/card/settings/CardSettings.tsx | 2 +- src/card/view/CardView.tsx | 14 +++++++------- src/chart/graph/component/GraphChartCanvas.tsx | 15 +++++++++++++-- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/public/style.css b/public/style.css index 6ff3be114..5896897bf 100644 --- a/public/style.css +++ b/public/style.css @@ -95,7 +95,8 @@ } .react-resizable-handle { - bottom: 1px !important; + bottom: 4px !important; + right: -2px !important; opacity: 0.5; color: rgb(222, 222, 222); } @@ -216,7 +217,7 @@ } .card-view .MuiTablePagination-root { - margin-top: -40px; + margin-top: 0px; } diff --git a/src/card/settings/CardSettings.tsx b/src/card/settings/CardSettings.tsx index e51b32991..85962fe26 100644 --- a/src/card/settings/CardSettings.tsx +++ b/src/card/settings/CardSettings.tsx @@ -36,7 +36,7 @@ const NeoCardSettings = ({ expanded, onToggleCardExpand, }) => { - const reportHeight = heightPx - CARD_HEADER_HEIGHT + 24; + const reportHeight = heightPx - CARD_HEADER_HEIGHT + 19; const cardSettingsHeader = ( { - const reportHeight = heightPx - CARD_FOOTER_HEIGHT - CARD_HEADER_HEIGHT + 22; + const reportHeight = heightPx - CARD_FOOTER_HEIGHT - CARD_HEADER_HEIGHT + 20; const cardHeight = heightPx - CARD_FOOTER_HEIGHT + 23; const ref = React.useRef(); @@ -137,10 +137,10 @@ const NeoCardView = ({ const localParameters = { ...getLocalParameters(query), ...getLocalParameters(settings.drilldownLink) }; const reportTypes = getReportTypes(extensions); - const withoutFooter = - reportTypes[type] && reportTypes[type].withoutFooter - ? reportTypes[type].withoutFooter - : (reportTypes[type] && !reportTypes[type].selection) || (settings && settings.hideSelections); + const reportTypeHasNoFooter = reportTypes[type] && reportTypes[type].withoutFooter; + const withoutFooter = reportTypeHasNoFooter + ? reportTypes[type].withoutFooter + : (reportTypes[type] && !reportTypes[type].selection) || (settings && settings.hideSelections); const getGlobalParameter = (key: string): unknown => { return globalParameters ? globalParameters[key] : undefined; @@ -170,13 +170,13 @@ const NeoCardView = ({ paddingRight: '0px', paddingTop: '0px', width: '100%', - marginTop: '-3px', + marginTop: '-9px', height: expanded ? withoutFooter ? '100%' : `calc(100% - ${CARD_FOOTER_HEIGHT}px)` : withoutFooter - ? `${reportHeight + CARD_FOOTER_HEIGHT}px` + ? `${reportHeight + CARD_FOOTER_HEIGHT - (reportTypeHasNoFooter ? 0 : 20)}px` : `${reportHeight}px`, overflow: 'auto', }; diff --git a/src/chart/graph/component/GraphChartCanvas.tsx b/src/chart/graph/component/GraphChartCanvas.tsx index 532b7af36..68e5068d9 100644 --- a/src/chart/graph/component/GraphChartCanvas.tsx +++ b/src/chart/graph/component/GraphChartCanvas.tsx @@ -1,10 +1,21 @@ import React from 'react'; -const canvasStyle = { paddingLeft: '10px', position: 'relative', overflow: 'hidden', width: '100%', height: '100%' }; +const canvasStyle = { + paddingLeft: '10px', + marginBottom: 5, + position: 'relative', + overflow: 'hidden', + width: '100%', + height: '100%', +}; /** * Renders the canvas on which the graph visualization is projected. */ export const NeoGraphChartCanvas = ({ children }) => { - return
{children}
; + return ( +
+ {children} +
+ ); }; From a803f5f93c80f8b57a7aca2b924ac7481677a7e3 Mon Sep 17 00:00:00 2001 From: Niels de Jong Date: Thu, 11 Jan 2024 11:44:03 +0100 Subject: [PATCH 13/52] Fixed styling defaults for bar chart --- src/chart/bar/BarChart.tsx | 2 +- src/config/ReportConfig.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chart/bar/BarChart.tsx b/src/chart/bar/BarChart.tsx index 4db7bf264..4d754c399 100644 --- a/src/chart/bar/BarChart.tsx +++ b/src/chart/bar/BarChart.tsx @@ -21,7 +21,7 @@ const NeoBarChart = (props: ChartProps) => { const customDimensions = settings.customDimensions ? settings.customDimensions : false; const legendWidth = settings.legendWidth ? settings.legendWidth : 128; const marginTop = settings.marginTop ? settings.marginTop : 24; - const marginBottom = settings.marginBottom ? settings.marginBottom : 60; + const marginBottom = settings.marginBottom ? settings.marginBottom : 30; const legend = settings.legend ? settings.legend : false; const labelRotation = settings.labelRotation != undefined ? settings.labelRotation : 45; const barWidth = settings.barWidth ? settings.barWidth : 10; diff --git a/src/config/ReportConfig.tsx b/src/config/ReportConfig.tsx index 8b3169b16..0a5845764 100644 --- a/src/config/ReportConfig.tsx +++ b/src/config/ReportConfig.tsx @@ -380,7 +380,7 @@ const _REPORT_TYPES = { marginBottom: { label: 'Margin Bottom', type: SELECTION_TYPES.NUMBER, - default: 45, + default: 30, }, legendWidth: { label: 'Legend Width', From 2797f5718e7e082d45f1b80b0f7280ab6d3b1f84 Mon Sep 17 00:00:00 2001 From: Niels de Jong Date: Fri, 12 Jan 2024 09:21:25 +0100 Subject: [PATCH 14/52] Fixed fullscreen views --- src/card/Card.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/card/Card.tsx b/src/card/Card.tsx index fe6ffe0d9..2a7753c6e 100644 --- a/src/card/Card.tsx +++ b/src/card/Card.tsx @@ -209,7 +209,7 @@ const NeoCard = ({ if (expanded) { return ( - {component} + {component} ); } From 21efb64c0ac9d0e85a35a9c8b358f00c5ee84b34 Mon Sep 17 00:00:00 2001 From: Niels de Jong Date: Fri, 12 Jan 2024 09:28:59 +0100 Subject: [PATCH 15/52] Freetext parameter with manual save style fixes --- src/chart/parameter/component/FreeTextParameterSelect.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/chart/parameter/component/FreeTextParameterSelect.tsx b/src/chart/parameter/component/FreeTextParameterSelect.tsx index 43ff16575..5e77362c2 100644 --- a/src/chart/parameter/component/FreeTextParameterSelect.tsx +++ b/src/chart/parameter/component/FreeTextParameterSelect.tsx @@ -81,7 +81,11 @@ const FreeTextParameterSelectComponent = (props: ParameterSelectProps) => { }} /> {manualParameterSave ? manualHandleParametersUpdate()} /> : <>} - {running ? : <>} + {running && !manualParameterSave ? ( + + ) : ( + <> + )}
); }; From f1057173c86da5ad57dfa7da2b436371d00d2a4c Mon Sep 17 00:00:00 2001 From: Niels de Jong Date: Fri, 12 Jan 2024 09:31:05 +0100 Subject: [PATCH 16/52] clean up graph editing modal --- src/chart/graph/component/GraphChartEditModal.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/chart/graph/component/GraphChartEditModal.tsx b/src/chart/graph/component/GraphChartEditModal.tsx index d68fb9b55..cb37edc29 100644 --- a/src/chart/graph/component/GraphChartEditModal.tsx +++ b/src/chart/graph/component/GraphChartEditModal.tsx @@ -203,7 +203,6 @@ export const GraphChartEditModal = (props: GraphChartEditorVisualizationProps) = -