From f34670d0866b65dd343b87bec69e5d80b3f3ca50 Mon Sep 17 00:00:00 2001 From: Wesley B <62723358+wesleyboar@users.noreply.github.com> Date: Fri, 31 Oct 2025 11:21:58 -0500 Subject: [PATCH 1/5] feat: feature flags --- apps/tup-ui/.env | 1 + apps/tup-ui/vite.config.ts | 1 + 2 files changed, 2 insertions(+) create mode 100644 apps/tup-ui/.env diff --git a/apps/tup-ui/.env b/apps/tup-ui/.env new file mode 100644 index 000000000..6ac0fbe97 --- /dev/null +++ b/apps/tup-ui/.env @@ -0,0 +1 @@ +VITE_FEATURE_PROJECTS_ENABLED=false diff --git a/apps/tup-ui/vite.config.ts b/apps/tup-ui/vite.config.ts index 2e634f0af..a3cc6f251 100644 --- a/apps/tup-ui/vite.config.ts +++ b/apps/tup-ui/vite.config.ts @@ -7,6 +7,7 @@ import path from 'path'; export default defineConfig({ root: __dirname, cacheDir: '../../node_modules/.vite/tup-ui', + // envPrefix: 'VITE_', server: { port: 3000, From ec3eb1f448a7badda6604c56dd2c63abbab876ef Mon Sep 17 00:00:00 2001 From: Wesley B <62723358+wesleyboar@users.noreply.github.com> Date: Fri, 31 Oct 2025 12:54:10 -0500 Subject: [PATCH 2/5] feat: feature flags - Projects maintenance (#520) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: feature-flag–based error message (!) (!) style and layout incomplete, just testing * fix: change error message, link to news * Adds styles and addresses right margin issue * Linting --------- Co-authored-by: Sophia Massie-Perez --- .../src/pages/Projects/Projects.module.css | 4 +++ apps/tup-ui/src/pages/Projects/Projects.tsx | 30 ++++++++++++++++--- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/apps/tup-ui/src/pages/Projects/Projects.module.css b/apps/tup-ui/src/pages/Projects/Projects.module.css index 46adedab7..a1519b753 100644 --- a/apps/tup-ui/src/pages/Projects/Projects.module.css +++ b/apps/tup-ui/src/pages/Projects/Projects.module.css @@ -18,3 +18,7 @@ .project-section > div > div { padding: var(--global-space--section); } + +.banner-message { + margin-right: var(--global-space--section-right) +} diff --git a/apps/tup-ui/src/pages/Projects/Projects.tsx b/apps/tup-ui/src/pages/Projects/Projects.tsx index 46e8c6550..c8d3c9631 100644 --- a/apps/tup-ui/src/pages/Projects/Projects.tsx +++ b/apps/tup-ui/src/pages/Projects/Projects.tsx @@ -5,7 +5,7 @@ import { ProjectsNavbar, ProjectsListing, } from '@tacc/tup-components'; -import { SectionHeader, Button } from '@tacc/core-components'; +import { SectionHeader, SectionMessage, Button } from '@tacc/core-components'; import styles from './Projects.module.css'; const NewProject = () => ( @@ -22,9 +22,31 @@ const Layout: React.FC = () => {
} isNestedHeader> - Projects & Allocations - + <> + } isNestedHeader> + Projects & Allocations + + + {import.meta.env.VITE_FEATURE_PROJECTS_ENABLED && ( + + Project Maintenance is + . You will be unable to manage your project users during + this time. See{' '} + + tacc.utexas.edu/news/user-updates/107601 + + . + + )} + + } left={} right={} From ebffcc1fde443a8e4195ab6c042714503047529b Mon Sep 17 00:00:00 2001 From: Sophia Massie-Perez Date: Fri, 31 Oct 2025 13:46:51 -0500 Subject: [PATCH 3/5] Adjust font size --- .../tup-ui/src/pages/Projects/Projects.module.css | 3 ++- apps/tup-ui/src/pages/Projects/Projects.tsx | 15 ++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/apps/tup-ui/src/pages/Projects/Projects.module.css b/apps/tup-ui/src/pages/Projects/Projects.module.css index a1519b753..10d5b5eeb 100644 --- a/apps/tup-ui/src/pages/Projects/Projects.module.css +++ b/apps/tup-ui/src/pages/Projects/Projects.module.css @@ -20,5 +20,6 @@ } .banner-message { - margin-right: var(--global-space--section-right) + margin-right: var(--global-space--section-right); + font-size: var(--global-font-size--medium); } diff --git a/apps/tup-ui/src/pages/Projects/Projects.tsx b/apps/tup-ui/src/pages/Projects/Projects.tsx index c8d3c9631..3b47f0dad 100644 --- a/apps/tup-ui/src/pages/Projects/Projects.tsx +++ b/apps/tup-ui/src/pages/Projects/Projects.tsx @@ -26,15 +26,15 @@ const Layout: React.FC = () => { } isNestedHeader> Projects & Allocations - - {import.meta.env.VITE_FEATURE_PROJECTS_ENABLED && ( + {import.meta.env.VITE_FEATURE_PROJECTS_ENABLED && ( + <> - Project Maintenance is - . You will be unable to manage your project users during - this time. See{' '} + Project Maintenance is scheduled for{' '} + . You will be unable to + manage your project users during this time. See{' '} { . - )} - +
+ + )} } left={} From 02583f15d205ba25a6313c88cb7365fc2e35418b Mon Sep 17 00:00:00 2001 From: Wesley B <62723358+wesleyboar@users.noreply.github.com> Date: Fri, 31 Oct 2025 15:02:58 -0500 Subject: [PATCH 4/5] feat: move page message management to App --- apps/tup-ui/src/App.tsx | 36 +++++++++++++++++-- apps/tup-ui/src/messages/Messages.module.css | 5 +++ apps/tup-ui/src/messages/Messages.tsx | 23 ++++++++++++ apps/tup-ui/src/messages/index.ts | 5 +++ .../src/pages/Projects/Projects.module.css | 5 --- apps/tup-ui/src/pages/Projects/Projects.tsx | 31 +++------------- .../layout/PageLayout/PageLayout.module.css | 2 +- 7 files changed, 72 insertions(+), 35 deletions(-) create mode 100644 apps/tup-ui/src/messages/Messages.module.css create mode 100644 apps/tup-ui/src/messages/Messages.tsx create mode 100644 apps/tup-ui/src/messages/index.ts diff --git a/apps/tup-ui/src/App.tsx b/apps/tup-ui/src/App.tsx index e044d79d6..96d62807c 100644 --- a/apps/tup-ui/src/App.tsx +++ b/apps/tup-ui/src/App.tsx @@ -23,10 +23,30 @@ import { Impersonate, Systems, } from './pages'; +import { ProjectsMessage } from './messages'; const AppLayout = () => { return } right={} />; }; +const AppPageWithMessage = ({ + MessageComponent, + PageComponent, + showMessage +}: { + MessageComponent: React.ComponentType; + PageComponent: React.ComponentType; + showMessage: boolean +}) => { + return ( + <> + {showMessage && } + + + ); +}; + +console.log('VITE_FEATURE_PROJECTS_ENABLED:', import.meta.env.VITE_FEATURE_PROJECTS_ENABLED); + function App() { return ( @@ -44,8 +64,20 @@ function App() { element={} /> - }> - }> + + }> + + }> }> }> }> diff --git a/apps/tup-ui/src/messages/Messages.module.css b/apps/tup-ui/src/messages/Messages.module.css new file mode 100644 index 000000000..f61169a53 --- /dev/null +++ b/apps/tup-ui/src/messages/Messages.module.css @@ -0,0 +1,5 @@ +.message { + margin-top: var(--global-space--section-top) !important; + margin-left: var(--global-space--section-left); + margin-right: var(--global-space--section-right); +} diff --git a/apps/tup-ui/src/messages/Messages.tsx b/apps/tup-ui/src/messages/Messages.tsx new file mode 100644 index 000000000..da9fdfc09 --- /dev/null +++ b/apps/tup-ui/src/messages/Messages.tsx @@ -0,0 +1,23 @@ +import { SectionMessage } from '@tacc/core-components'; +import styles from './Messages.module.css'; + +export const ProjectsMessage = () => { + return ( + + Project Maintenance is scheduled for{' '} + . You will be unable to + manage your project users during this time. See{' '} + + tacc.utexas.edu/news/user-updates/107601 + + . + + ); +} diff --git a/apps/tup-ui/src/messages/index.ts b/apps/tup-ui/src/messages/index.ts new file mode 100644 index 000000000..292d00013 --- /dev/null +++ b/apps/tup-ui/src/messages/index.ts @@ -0,0 +1,5 @@ +import { ProjectsMessage } from './Messages'; + +export { + ProjectsMessage +}; diff --git a/apps/tup-ui/src/pages/Projects/Projects.module.css b/apps/tup-ui/src/pages/Projects/Projects.module.css index 10d5b5eeb..46adedab7 100644 --- a/apps/tup-ui/src/pages/Projects/Projects.module.css +++ b/apps/tup-ui/src/pages/Projects/Projects.module.css @@ -18,8 +18,3 @@ .project-section > div > div { padding: var(--global-space--section); } - -.banner-message { - margin-right: var(--global-space--section-right); - font-size: var(--global-font-size--medium); -} diff --git a/apps/tup-ui/src/pages/Projects/Projects.tsx b/apps/tup-ui/src/pages/Projects/Projects.tsx index 3b47f0dad..46e8c6550 100644 --- a/apps/tup-ui/src/pages/Projects/Projects.tsx +++ b/apps/tup-ui/src/pages/Projects/Projects.tsx @@ -5,7 +5,7 @@ import { ProjectsNavbar, ProjectsListing, } from '@tacc/tup-components'; -import { SectionHeader, SectionMessage, Button } from '@tacc/core-components'; +import { SectionHeader, Button } from '@tacc/core-components'; import styles from './Projects.module.css'; const NewProject = () => ( @@ -22,32 +22,9 @@ const Layout: React.FC = () => {
- } isNestedHeader> - Projects & Allocations - - {import.meta.env.VITE_FEATURE_PROJECTS_ENABLED && ( - <> - - Project Maintenance is scheduled for{' '} - . You will be unable to - manage your project users during this time. See{' '} - - tacc.utexas.edu/news/user-updates/107601 - - . - -
- - )} - + } isNestedHeader> + Projects & Allocations + } left={} right={} diff --git a/libs/tup-components/src/layout/PageLayout/PageLayout.module.css b/libs/tup-components/src/layout/PageLayout/PageLayout.module.css index 2106d262c..853247124 100644 --- a/libs/tup-components/src/layout/PageLayout/PageLayout.module.css +++ b/libs/tup-components/src/layout/PageLayout/PageLayout.module.css @@ -25,7 +25,7 @@ grid-area: _content; display: grid; - grid-template-rows: 100%; /* to not let items overflow this container */ + grid-template-rows: min-content; } .footer { From 1df7a204f35215f317c8800541026e43f108a8ae Mon Sep 17 00:00:00 2001 From: Wesley B <62723358+wesleyboar@users.noreply.github.com> Date: Fri, 31 Oct 2025 15:39:27 -0500 Subject: [PATCH 5/5] chore: lint --- apps/tup-ui/src/App.tsx | 47 +++++++++++++++++---------- apps/tup-ui/src/messages/Messages.tsx | 12 +++---- apps/tup-ui/src/messages/index.ts | 4 +-- 3 files changed, 35 insertions(+), 28 deletions(-) diff --git a/apps/tup-ui/src/App.tsx b/apps/tup-ui/src/App.tsx index 96d62807c..b64e8d297 100644 --- a/apps/tup-ui/src/App.tsx +++ b/apps/tup-ui/src/App.tsx @@ -31,11 +31,11 @@ const AppLayout = () => { const AppPageWithMessage = ({ MessageComponent, PageComponent, - showMessage + showMessage, }: { MessageComponent: React.ComponentType; PageComponent: React.ComponentType; - showMessage: boolean + showMessage: boolean; }) => { return ( <> @@ -45,7 +45,10 @@ const AppPageWithMessage = ({ ); }; -console.log('VITE_FEATURE_PROJECTS_ENABLED:', import.meta.env.VITE_FEATURE_PROJECTS_ENABLED); +console.log( + 'VITE_FEATURE_PROJECTS_ENABLED:', + import.meta.env.VITE_FEATURE_PROJECTS_ENABLED +); function App() { return ( @@ -64,20 +67,30 @@ function App() { element={} /> - - }> - - }> + + } + > + + } + > }> }> }> diff --git a/apps/tup-ui/src/messages/Messages.tsx b/apps/tup-ui/src/messages/Messages.tsx index da9fdfc09..ad556aa64 100644 --- a/apps/tup-ui/src/messages/Messages.tsx +++ b/apps/tup-ui/src/messages/Messages.tsx @@ -3,13 +3,9 @@ import styles from './Messages.module.css'; export const ProjectsMessage = () => { return ( - - Project Maintenance is scheduled for{' '} - . You will be unable to - manage your project users during this time. See{' '} + + Project Maintenance is scheduled for + . You will be unable to manage your project users during this time. See{' '} { . ); -} +}; diff --git a/apps/tup-ui/src/messages/index.ts b/apps/tup-ui/src/messages/index.ts index 292d00013..eff95c5cf 100644 --- a/apps/tup-ui/src/messages/index.ts +++ b/apps/tup-ui/src/messages/index.ts @@ -1,5 +1,3 @@ import { ProjectsMessage } from './Messages'; -export { - ProjectsMessage -}; +export { ProjectsMessage };