From 65d35201a473695d69a4c57d985ac4c98cd1b7d6 Mon Sep 17 00:00:00 2001 From: David Wertheimer Date: Wed, 20 Nov 2024 07:48:54 -0800 Subject: [PATCH] Minor tweaks --- helpers/react/ConsoleLogView.css | 4 ++++ helpers/react/ConsoleLogView.jsx | 10 +++++++--- jest.config.js | 2 +- .../src/react/components/Header/Header.jsx | 2 +- .../react/components/__tests__/DropdownMenu.test.jsx | 2 +- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/helpers/react/ConsoleLogView.css b/helpers/react/ConsoleLogView.css index 96051f48..76c9dbdc 100644 --- a/helpers/react/ConsoleLogView.css +++ b/helpers/react/ConsoleLogView.css @@ -144,4 +144,8 @@ .log-timestamp { color: #cfcece; padding-right: 10px; + } + + button.active { + background-color: #007bff; } \ No newline at end of file diff --git a/helpers/react/ConsoleLogView.jsx b/helpers/react/ConsoleLogView.jsx index b773da95..aff42cf4 100644 --- a/helpers/react/ConsoleLogView.jsx +++ b/helpers/react/ConsoleLogView.jsx @@ -163,7 +163,7 @@ const ConsoleLogView = ({ logs = [], filter, initialFilter = '', initialSearch = const regex = useRegexFilter ? new RegExp(filterText, 'i') : null newFilteredLogs = newFilteredLogs.filter((log) => (regex ? regex.test(log.message) : log.message.toLowerCase().includes(filterText.toLowerCase()))) } catch (e) { - // Invalid regex, ignore filter + console.error('Invalid regex:', e) } } return newFilteredLogs @@ -321,12 +321,16 @@ const ConsoleLogView = ({ logs = [], filter, initialFilter = '', initialSearch =
- +
- +
diff --git a/jest.config.js b/jest.config.js index 256f9be1..8223b93e 100644 --- a/jest.config.js +++ b/jest.config.js @@ -19,6 +19,6 @@ module.exports = { '^.+\\.mjs$': 'babel-jest', // Use babel-jest for .mjs files as well }, transformIgnorePatterns: [ - '/node_modules/(?!node-notifier|uuid)/', // Ensure these modules are transformed + '/node_modules/(?!(node-notifier|uuid|lodash-es)/)', // Ensure these modules are transformed ], } diff --git a/jgclark.Dashboard/src/react/components/Header/Header.jsx b/jgclark.Dashboard/src/react/components/Header/Header.jsx index 8d36f399..64354f50 100644 --- a/jgclark.Dashboard/src/react/components/Header/Header.jsx +++ b/jgclark.Dashboard/src/react/components/Header/Header.jsx @@ -107,7 +107,7 @@ const Header = ({ lastFullRefresh }: Props): React$Node => { ...tempDashboardSettings, ...updatedSettings, } - clo(newSettings, 'Header/handleChangesInSettings about to dispatch newSettings=') + console.log('Header/handleChangesInSettings about to dispatch newSettings=', { newSettings }) dispatchDashboardSettings({ type: DASHBOARD_ACTIONS.UPDATE_DASHBOARD_SETTINGS, payload: newSettings, diff --git a/jgclark.Dashboard/src/react/components/__tests__/DropdownMenu.test.jsx b/jgclark.Dashboard/src/react/components/__tests__/DropdownMenu.test.jsx index 1297a545..220c8beb 100644 --- a/jgclark.Dashboard/src/react/components/__tests__/DropdownMenu.test.jsx +++ b/jgclark.Dashboard/src/react/components/__tests__/DropdownMenu.test.jsx @@ -12,7 +12,7 @@ import { TSettingItem } from '../../types' * Mock implementation of renderItem used in DropdownMenu. * Adjust this mock as per your actual implementation. */ -jest.mock('../../support/uiElementRenderHelpersq', () => ({ +jest.mock('../../support/uiElementRenderHelpers', () => ({ renderItem: jest.fn(({ item }) =>
{item.label}
), }))