From c713b2aeaefc83f1566eb33813746537fdee4d86 Mon Sep 17 00:00:00 2001 From: nathnael <134805961+nchanyal@users.noreply.github.com> Date: Sat, 4 Oct 2025 18:46:21 -0400 Subject: [PATCH 1/9] =?UTF-8?q?Capitalize=20the=20=E2=80=98clear=E2=80=99?= =?UTF-8?q?=20option=20in=20TextPopup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/Projects/ColumnHeaderPopups/TextPopup.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/Projects/ColumnHeaderPopups/TextPopup.jsx b/client/src/components/Projects/ColumnHeaderPopups/TextPopup.jsx index dddb3a797..be6a2e4fc 100644 --- a/client/src/components/Projects/ColumnHeaderPopups/TextPopup.jsx +++ b/client/src/components/Projects/ColumnHeaderPopups/TextPopup.jsx @@ -244,7 +244,7 @@ const TextPopup = ({ className={classes.toggleButton} onClick={() => setSelectedListItems([])} > - clear + Clear
{`${selectedListItems.length} selected`}
From 4c9a9b18910041923b616129a60419808198abab Mon Sep 17 00:00:00 2001 From: nathnael <134805961+nchanyal@users.noreply.github.com> Date: Sun, 5 Oct 2025 13:56:25 -0400 Subject: [PATCH 2/9] =?UTF-8?q?Add=20=E2=80=98Select=20All=E2=80=99=20opti?= =?UTF-8?q?on=20to=20TextPopup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Projects/ColumnHeaderPopups/TextPopup.jsx | 36 ++++++++++++++++--- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/client/src/components/Projects/ColumnHeaderPopups/TextPopup.jsx b/client/src/components/Projects/ColumnHeaderPopups/TextPopup.jsx index be6a2e4fc..bf3a70f16 100644 --- a/client/src/components/Projects/ColumnHeaderPopups/TextPopup.jsx +++ b/client/src/components/Projects/ColumnHeaderPopups/TextPopup.jsx @@ -200,6 +200,19 @@ const TextPopup = ({ if (setSelectAllChecked) setSelectAllChecked(false); }; + const selectAllCheckboxes = () => { + /** + * Build an array of objects that contain the name + * for all the list items in the popup + */ + const listItems = filteredOptions.map(item => ({ + value: item, + label: item + })); + + setSelectedListItems(listItems); + }; + return (
- + +
-
+ +
{`${selectedListItems.length} selected`}
From ee58087f919570d3b74fa46dab11c2caf7c09ba1 Mon Sep 17 00:00:00 2001 From: nathnael <134805961+nchanyal@users.noreply.github.com> Date: Sun, 5 Oct 2025 13:58:15 -0400 Subject: [PATCH 3/9] =?UTF-8?q?Capitalize=20the=20=E2=80=98clear=E2=80=99?= =?UTF-8?q?=20option=20in=20StringPopup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/Projects/ColumnHeaderPopups/StringPopup.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/Projects/ColumnHeaderPopups/StringPopup.jsx b/client/src/components/Projects/ColumnHeaderPopups/StringPopup.jsx index 34f5d0860..44eed8ef1 100644 --- a/client/src/components/Projects/ColumnHeaderPopups/StringPopup.jsx +++ b/client/src/components/Projects/ColumnHeaderPopups/StringPopup.jsx @@ -204,7 +204,7 @@ const TextPopup = ({ className={classes.toggleButton} onClick={() => setSelectedListItems([])} > - clear + Clear
{`${selectedListItems.length} selected`}
From 241507912e3bac6407430152872d5475c82f0a53 Mon Sep 17 00:00:00 2001 From: nathnael <134805961+nchanyal@users.noreply.github.com> Date: Sun, 5 Oct 2025 14:25:13 -0400 Subject: [PATCH 4/9] =?UTF-8?q?Add=20=E2=80=98Select=20All=E2=80=99=20opti?= =?UTF-8?q?on=20to=20StringPopup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ColumnHeaderPopups/StringPopup.jsx | 24 ++++++++++++++----- .../Projects/ColumnHeaderPopups/TextPopup.jsx | 24 ++++--------------- client/src/helpers/util.js | 11 +++++++++ 3 files changed, 34 insertions(+), 25 deletions(-) diff --git a/client/src/components/Projects/ColumnHeaderPopups/StringPopup.jsx b/client/src/components/Projects/ColumnHeaderPopups/StringPopup.jsx index 44eed8ef1..0a424e216 100644 --- a/client/src/components/Projects/ColumnHeaderPopups/StringPopup.jsx +++ b/client/src/components/Projects/ColumnHeaderPopups/StringPopup.jsx @@ -6,6 +6,7 @@ import { MdClose } from "react-icons/md"; import { MdOutlineSearch } from "react-icons/md"; import { createUseStyles } from "react-jss"; import ToggleCheckbox from "components/UI/ToggleCheckbox"; +import { selectAllCheckboxes } from "helpers/util"; /* Variant of the TextPopup that gets rid of all the quirky accommodation of dro and author filtering used on the My Projects Page @@ -200,12 +201,23 @@ const TextPopup = ({ alignItems: "baseline" }} > - +
+ +
-
+ +
{`${selectedListItems.length} selected`}
diff --git a/client/src/components/Projects/ColumnHeaderPopups/TextPopup.jsx b/client/src/components/Projects/ColumnHeaderPopups/TextPopup.jsx index bf3a70f16..6618908f4 100644 --- a/client/src/components/Projects/ColumnHeaderPopups/TextPopup.jsx +++ b/client/src/components/Projects/ColumnHeaderPopups/TextPopup.jsx @@ -8,6 +8,7 @@ import { MdOutlineSearch } from "react-icons/md"; import { createUseStyles } from "react-jss"; import ToggleCheckbox from "components/UI/ToggleCheckbox"; import UserContext from "contexts/UserContext"; +import { selectAllCheckboxes } from "helpers/util"; const useStyles = createUseStyles({ searchBarWrapper: { @@ -200,19 +201,6 @@ const TextPopup = ({ if (setSelectAllChecked) setSelectAllChecked(false); }; - const selectAllCheckboxes = () => { - /** - * Build an array of objects that contain the name - * for all the list items in the popup - */ - const listItems = filteredOptions.map(item => ({ - value: item, - label: item - })); - - setSelectedListItems(listItems); - }; - return (
-
+
diff --git a/client/src/helpers/util.js b/client/src/helpers/util.js index 88a237873..248933611 100644 --- a/client/src/helpers/util.js +++ b/client/src/helpers/util.js @@ -18,3 +18,14 @@ export const formatId = id => { const padded = id.toString().padStart(10, "0"); return padded.substring(0, 5) + "-" + padded.substring(5, 10); }; + +// Intended for use in TextPopup, StringPopup, and StringListPopup components +export const selectAllCheckboxes = (filteredOptions, setSelectedListItems) => { + // Build an array of objects that contain the name for all the list items in the popup + const listItems = filteredOptions.map(item => ({ + value: item, + label: item + })); + + setSelectedListItems(listItems); +}; From abc87273608f365393d2b82c195f5dec6bb1bac7 Mon Sep 17 00:00:00 2001 From: nathnael <134805961+nchanyal@users.noreply.github.com> Date: Sun, 5 Oct 2025 14:30:01 -0400 Subject: [PATCH 5/9] =?UTF-8?q?Capitalize=20the=20=E2=80=98clear=E2=80=99?= =?UTF-8?q?=20option=20in=20StringListPopup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Projects/ColumnHeaderPopups/StringListPopup.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/Projects/ColumnHeaderPopups/StringListPopup.jsx b/client/src/components/Projects/ColumnHeaderPopups/StringListPopup.jsx index f474fd24c..13ea2aedb 100644 --- a/client/src/components/Projects/ColumnHeaderPopups/StringListPopup.jsx +++ b/client/src/components/Projects/ColumnHeaderPopups/StringListPopup.jsx @@ -189,7 +189,7 @@ const TextPopup = ({ className={classes.toggleButton} onClick={() => setSelectedListItems([])} > - clear + Clear
{`${selectedListItems.length} selected`}
From f120d2e0ef305ede8fafe9a71c7c92f993bf1ee0 Mon Sep 17 00:00:00 2001 From: nathnael <134805961+nchanyal@users.noreply.github.com> Date: Sun, 5 Oct 2025 14:35:12 -0400 Subject: [PATCH 6/9] =?UTF-8?q?Add=20=E2=80=98Select=20All=E2=80=99=20opti?= =?UTF-8?q?on=20to=20StringListPopup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ColumnHeaderPopups/StringListPopup.jsx | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/client/src/components/Projects/ColumnHeaderPopups/StringListPopup.jsx b/client/src/components/Projects/ColumnHeaderPopups/StringListPopup.jsx index 13ea2aedb..c44d16199 100644 --- a/client/src/components/Projects/ColumnHeaderPopups/StringListPopup.jsx +++ b/client/src/components/Projects/ColumnHeaderPopups/StringListPopup.jsx @@ -5,6 +5,7 @@ import RadioButton from "../../UI/RadioButton"; import { MdClose } from "react-icons/md"; import { createUseStyles } from "react-jss"; import ToggleCheckbox from "components/UI/ToggleCheckbox"; +import { selectAllCheckboxes } from "helpers/util"; /* Variant of the StringPopup that is for text columns with a small number of choices that do not need the search box feature @@ -185,12 +186,23 @@ const TextPopup = ({ alignItems: "baseline" }} > - +
+ +
-
+ +
{`${selectedListItems.length} selected`}
From ccba83630ea5b264577d50fcee0ab0870a33720b Mon Sep 17 00:00:00 2001 From: nathnael <134805961+nchanyal@users.noreply.github.com> Date: Sun, 5 Oct 2025 14:46:52 -0400 Subject: [PATCH 7/9] =?UTF-8?q?Capitalize=20the=20=E2=80=98clear=E2=80=99?= =?UTF-8?q?=20option=20in=20NumberPopup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/Projects/ColumnHeaderPopups/NumberPopup.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/Projects/ColumnHeaderPopups/NumberPopup.jsx b/client/src/components/Projects/ColumnHeaderPopups/NumberPopup.jsx index 614acb3be..7530afa76 100644 --- a/client/src/components/Projects/ColumnHeaderPopups/NumberPopup.jsx +++ b/client/src/components/Projects/ColumnHeaderPopups/NumberPopup.jsx @@ -193,7 +193,7 @@ const NumberPopup = ({ className={classes.toggleButton} onClick={() => setSelectedListItems([])} > - clear + Clear
{`${selectedListItems.length} selected`}
From 474081e172aaba5368fe88d88ee8c5c21b3004a6 Mon Sep 17 00:00:00 2001 From: nathnael <134805961+nchanyal@users.noreply.github.com> Date: Sun, 5 Oct 2025 14:50:16 -0400 Subject: [PATCH 8/9] =?UTF-8?q?Add=20=E2=80=98Select=20All=E2=80=99=20opti?= =?UTF-8?q?on=20to=20NumberPopup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ColumnHeaderPopups/NumberPopup.jsx | 24 ++++++++++++++----- client/src/helpers/util.js | 2 +- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/client/src/components/Projects/ColumnHeaderPopups/NumberPopup.jsx b/client/src/components/Projects/ColumnHeaderPopups/NumberPopup.jsx index 7530afa76..ea49b877f 100644 --- a/client/src/components/Projects/ColumnHeaderPopups/NumberPopup.jsx +++ b/client/src/components/Projects/ColumnHeaderPopups/NumberPopup.jsx @@ -6,6 +6,7 @@ import { MdClose } from "react-icons/md"; import { MdOutlineSearch } from "react-icons/md"; import { createUseStyles } from "react-jss"; import ToggleCheckbox from "components/UI/ToggleCheckbox"; +import { selectAllCheckboxes } from "helpers/util"; const useStyles = createUseStyles({ searchBarWrapper: { @@ -189,12 +190,23 @@ const NumberPopup = ({ alignItems: "baseline" }} > - +
+ +
-
+ +
{`${selectedListItems.length} selected`}
diff --git a/client/src/helpers/util.js b/client/src/helpers/util.js index 248933611..df01e4c52 100644 --- a/client/src/helpers/util.js +++ b/client/src/helpers/util.js @@ -19,7 +19,7 @@ export const formatId = id => { return padded.substring(0, 5) + "-" + padded.substring(5, 10); }; -// Intended for use in TextPopup, StringPopup, and StringListPopup components +// Intended for use in popup components export const selectAllCheckboxes = (filteredOptions, setSelectedListItems) => { // Build an array of objects that contain the name for all the list items in the popup const listItems = filteredOptions.map(item => ({ From 75945279aa9253c3a36a86f24485d31ea426aff8 Mon Sep 17 00:00:00 2001 From: nathnael <134805961+nchanyal@users.noreply.github.com> Date: Tue, 7 Oct 2025 16:31:02 -0400 Subject: [PATCH 9/9] Replace 'Select All' with 'Select all' in filters --- .../src/components/Projects/ColumnHeaderPopups/NumberPopup.jsx | 2 +- .../components/Projects/ColumnHeaderPopups/StringListPopup.jsx | 2 +- .../src/components/Projects/ColumnHeaderPopups/StringPopup.jsx | 2 +- client/src/components/Projects/ColumnHeaderPopups/TextPopup.jsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/components/Projects/ColumnHeaderPopups/NumberPopup.jsx b/client/src/components/Projects/ColumnHeaderPopups/NumberPopup.jsx index ea49b877f..f1004ef77 100644 --- a/client/src/components/Projects/ColumnHeaderPopups/NumberPopup.jsx +++ b/client/src/components/Projects/ColumnHeaderPopups/NumberPopup.jsx @@ -197,7 +197,7 @@ const NumberPopup = ({ selectAllCheckboxes(filteredOptions, setSelectedListItems) } > - Select All {filteredOptions.length} + Select all {filteredOptions.length}
-
-
-
-