From 746a41c524871faf693df51b6310cb5e3f891061 Mon Sep 17 00:00:00 2001 From: Dan Funk Date: Thu, 6 Jul 2023 16:38:44 -0400 Subject: [PATCH] Feature/never ending UI tweaks 2 (#377) * Using a rem based measurement rather than pixels, to better handle 4k displays and their adjusted font sizes - and setting relatively large breakpoints and page width limits that should result in a better view of the tables on the home page. * Here is the latest: * Improved metadata display on the process instance page, with better widths, grayed out text (which I lost at some point). * Reduced the End Task "instructions for end user" size, and added a fade out on the bottom. * Improved the "chicken buttons" for custom columns on the process instance list filters, which can now accommodate very long names for the columns. * Removed the "show-page" which is more consistently handled by the content wrappers for the different routers. --- .../src/components/InstructionsForEndUser.tsx | 17 +-- .../components/ProcessInstanceListTable.tsx | 2 +- spiffworkflow-frontend/src/index.css | 22 ++-- spiffworkflow-frontend/src/index.scss | 28 +++-- .../src/routes/ProcessInstanceShow.tsx | 106 +++++++++--------- .../src/routes/ProcessInterstitialPage.tsx | 4 +- .../src/routes/ProcessModelShow.tsx | 4 +- .../src/routes/TaskShow.tsx | 4 +- 8 files changed, 99 insertions(+), 88 deletions(-) diff --git a/spiffworkflow-frontend/src/components/InstructionsForEndUser.tsx b/spiffworkflow-frontend/src/components/InstructionsForEndUser.tsx index ef4e243b..52a7102d 100644 --- a/spiffworkflow-frontend/src/components/InstructionsForEndUser.tsx +++ b/spiffworkflow-frontend/src/components/InstructionsForEndUser.tsx @@ -73,29 +73,20 @@ export default function InstructionsForEndUser({ return null; }; - let instructionsShown = instructions; + let className = 'markdown'; if (collapsed) { - if (wordCount(instructions) > maxWordCount) { - instructionsShown = instructions - .split(' ') - .slice(0, maxWordCount) - .join(' '); - instructionsShown += '...'; - } else if (lineCount(instructions) > maxLineCount) { - instructionsShown = instructions.split('\n').slice(0, 5).join(' '); - instructionsShown += '...'; - } + className += ' markdown-collapsed'; } return (
-
+
{/* https://www.npmjs.com/package/@uiw/react-md-editor switches to dark mode by default by respecting @media (prefers-color-scheme: dark) This makes it look like our site is broken, so until the rest of the site supports dark mode, turn off dark mode for this component. */}
- +
{showCollapseToggle()} diff --git a/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx b/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx index 4a3f471e..a6809240 100644 --- a/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx +++ b/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx @@ -1195,7 +1195,7 @@ export default function ProcessInstanceListTable({ ); }); return ( - + {tags}