Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
4374df7
build: add react-router package
andlar Feb 6, 2026
3db2a9c
refactor: start building new "top navigation" component
andlar Feb 10, 2026
505e391
ui: add basic structure for top nav
andlar Feb 11, 2026
c35a499
feat: add login widget
andlar Feb 11, 2026
408dd63
Merge branch 'staging' into OCD-4307
andlar Feb 12, 2026
8c251fa
feat: make "shortcuts" links work
andlar Feb 13, 2026
9b80859
feat: set up "resources" navigation to work
andlar Feb 13, 2026
90d7f1d
ui: add "home" link
andlar Feb 13, 2026
58043ed
feat: make home/search work
andlar Feb 18, 2026
fba5dc5
feat: Add admin menu component and integrate into login toggle
mattystank Feb 18, 2026
2591100
Merge branch 'OCD-4307' of https://github.com/andlar/chpl-website int…
mattystank Feb 18, 2026
31eb184
feat: Refactor announcements FAB to use Material-UI components and im…
mattystank Feb 19, 2026
a62bb13
feat: Update styling for login components and improve button function…
mattystank Feb 19, 2026
32c654a
ui: flip direction of "back" arrow
andlar Feb 19, 2026
40cb5e1
feat: Enhance CMS and Compare display components with improved stylin…
mattystank Feb 19, 2026
75dea3a
ui: Add word wrap styling to Typography components in ChplCmsDisplay
mattystank Feb 19, 2026
8febe2a
feat: Refactor ChplCmsDisplay and ChplCompareDisplay components to us…
mattystank Feb 19, 2026
fa107f4
feat: Replace custom badge implementation with Material-UI Badge comp…
mattystank Feb 20, 2026
f9ef45d
feat: Enhance ChplAnnouncementsFab with rectangular badge overlap and…
mattystank Feb 20, 2026
d4372c9
feat: Refactor ChplAdminMenu to consolidate section toggle logic and …
mattystank Feb 20, 2026
153978e
feat: Update ChplAdminMenu and ChplLogin to handle logout action and …
mattystank Feb 20, 2026
5bd2f66
refactor: consolidate wordWrap style to utilStyles
mattystank Feb 27, 2026
6d654b4
refactor: add navBackground color to palette
mattystank Feb 27, 2026
9140a2a
refactor: remove duplicate wordWrap styles from components
mattystank Feb 27, 2026
d9f6a85
refactor: improve admin menu implementation
mattystank Feb 27, 2026
62d32c7
feat: enhance top navigation with banner and menu improvements
mattystank Feb 27, 2026
c9bd4b0
refactor: update envBanner styles and structure for improved layout
mattystank Feb 27, 2026
c6f60b4
feat(navigation): refactor navigation components for improved structu…
mattystank Mar 2, 2026
b99b69d
refactor: enhance mobile navigation drawer and top navigation respons…
mattystank Mar 2, 2026
1fad9e4
fix: clean up unused imports and improve code formatting across multi…
mattystank Mar 2, 2026
0c37ce9
Merge branch 'staging' into OCD-4307
andlar Mar 3, 2026
4f1aac5
fix: add border-radius to search container styles
mattystank Mar 5, 2026
5fd0027
feat: add environment banner and refactor mobile navigation
mattystank Mar 5, 2026
2db8d5f
feat: refactor admin menu and toggle components for improved structur…
mattystank Mar 5, 2026
491685e
fix: update typography alignment and improve listings sorting in CMS …
mattystank Mar 5, 2026
b15ebc3
feat: implement dynamic admin menu structure with role-based access
mattystank Mar 5, 2026
b3a3875
feat: refactor mobile navigation drawer to use dynamic section toggling
mattystank Mar 5, 2026
0d7d60c
feat: replace Box with ButtonBase for logo button interaction
mattystank Mar 6, 2026
b5f3b0d
style: use project specific formatting / conventions
andlar Mar 9, 2026
1eb90a1
refactor: move login toggle state into context
andlar Mar 10, 2026
de8d775
fix: restore "pop-open widget" functionality
andlar Mar 11, 2026
e807ad4
fix: try to update login widget on timeout
andlar Mar 11, 2026
80a0ef9
ci: add dependency checking to build process
andlar Mar 11, 2026
37483f5
ui: change links to match updated targets
andlar Mar 12, 2026
bc706b5
ui: update the developer guide URL to be the new one
andlar Mar 12, 2026
645908d
ui: keep consistency with plurality
andlar Mar 12, 2026
1044733
fix: try to handle logout / authtokens
andlar Mar 13, 2026
ddefdad
ui: keep formatting consistent when changing pages
andlar Apr 8, 2026
5beda8c
refactor: remove OBE flag
andlar Apr 8, 2026
3d4f0ce
refactor: import local files relatively
andlar Apr 8, 2026
047cae9
refactor: extract admin-menu components to sub-components
andlar Apr 8, 2026
3977903
Merge branch 'staging' into OCD-4307
andlar Apr 8, 2026
64e4b2b
Merge branch 'OCD-4307-UI' into OCD-4307
andlar Apr 8, 2026
d940f13
feat: display Developers for those users
andlar Apr 9, 2026
ec9cb2d
fix: log out completely on logout
andlar Apr 9, 2026
147f7a3
Merge branch 'staging' into OCD-4307
andlar Apr 9, 2026
d1dca7e
Merge branch 'staging' into OCD-4307
andlar Apr 14, 2026
91f2d4b
refactor: extract logout action to one place
andlar Apr 14, 2026
c080afe
refactor: remove OBE navigation elements
andlar Apr 14, 2026
e656be0
refactor: remove OBE bridge and directive
andlar Apr 14, 2026
c593022
refactor: extract progress bar
andlar Apr 14, 2026
95f0828
refactor: remove unnecessary ref
andlar Apr 14, 2026
817d38f
refactor: remove unnecessary ref
andlar Apr 14, 2026
46ad61c
Merge branch 'staging' into OCD-4307
andlar Apr 14, 2026
8dc9bb0
refactor: remove unused component
andlar Apr 16, 2026
e708355
Merge branch 'OCD-4307' of github.com:andlar/chpl-website into OCD-4307
andlar Apr 16, 2026
52ba839
ui: fix some text/display issues on new nav
andlar Apr 17, 2026
9da4ae2
fix: use correct logo/text for new ONC name
andlar Apr 17, 2026
92af98c
fix: use correct link for ff4j
andlar Apr 17, 2026
f3843c7
fix: enable opening user guides
andlar Apr 17, 2026
bd4ea08
ui: update new navigation with compliance dashboard link
andlar Apr 20, 2026
118e250
style: fix some linting issues
andlar Apr 20, 2026
6cea5f8
ui: alphabetize dropdown navigation items
andlar Apr 20, 2026
491322e
fix: update padding styles and enhance link hover effects
mattystank Apr 20, 2026
a72a6a9
Merge branch 'staging' into OCD-4307
andlar Apr 20, 2026
d8b1933
refactor: rename ChplLink hoverUnderline prop to indicateOnHover
mattystank Apr 20, 2026
2544335
refactor: replace MUI Menu with ClickAwayListener and Box for dropdowns
mattystank Apr 20, 2026
3da5a8f
fix: remove cursor styles from menu items for better UX
mattystank Apr 20, 2026
cf25a5f
ui remove duplicate language
andlar Apr 21, 2026
164cdb6
fix: reinstate add/remove of CMS ID listings
andlar Apr 21, 2026
a340d97
fix: standardize CMS ID list data structure
andlar Apr 21, 2026
b6ae224
fix: adjust padding styles and improve color formatting in menu compo…
mattystank Apr 21, 2026
fdb9119
Merge pull request #245 from mattystank/OCD-4307
andlar Apr 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@material-ui/lab": "^4.0.0-alpha.61",
"@tanstack/react-query": "4.42.0",
"@tanstack/react-query-devtools": "4.42.0",
"@uirouter/react": "^1.0.8",
"angular": "^1.8.3",
"angular-animate": "^1.8.3",
"angular-aria": "^1.8.3",
Expand Down
4 changes: 4 additions & 0 deletions src/app/api/axios.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import { applyAuthTokenInterceptor, getAccessToken } from 'axios-jwt';
import { element } from 'prop-types';

import { getAngularService } from 'services/angular-react-helper';
import { UserContext } from 'shared/contexts';

const AxiosContext = createContext();

function AxiosProvider({ children }) {
const $localStorage = getAngularService('$localStorage');
const authService = getAngularService('authService');
const { setLoginWidgetState } = useContext(UserContext);

const axios = useMemo(() => {
const ax = Axios.create({
Expand All @@ -33,6 +35,7 @@ function AxiosProvider({ children }) {
return response.data.accessToken;
})
.catch(() => {
setLoginWidgetState('SIGNIN');
authService.logout();
});
}
Expand Down Expand Up @@ -62,6 +65,7 @@ function AxiosProvider({ children }) {
ax.interceptors.response.use((response) => response,
(error) => {
if (error.response.data && error.response.data === 'Invalid authentication token.' && authService.hasAnyRole(['chpl-admin', 'chpl-onc', 'chpl-onc-acb', 'chpl-cms-staff', 'chpl-developer'])) {
setLoginWidgetState('SIGNIN');
authService.logout();
}
return Promise.reject(error);
Expand Down
12 changes: 6 additions & 6 deletions src/app/app-wrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import theme from 'themes/theme';
function AppWrapper({ children, showQueryTools = DEVELOPER_MODE }) {
return (
<ThemeProvider theme={theme}>
<UserWrapper>
<SnackbarWrapper>
<ApiWrapper showQueryTools={showQueryTools}>
<ApiWrapper showQueryTools={showQueryTools}>
<UserWrapper>
<SnackbarWrapper>
<FlagWrapper>
<CompareWrapper>
<CmsWrapper>
Expand All @@ -41,9 +41,9 @@ function AppWrapper({ children, showQueryTools = DEVELOPER_MODE }) {
</CmsWrapper>
</CompareWrapper>
</FlagWrapper>
</ApiWrapper>
</SnackbarWrapper>
</UserWrapper>
</SnackbarWrapper>
</UserWrapper>
</ApiWrapper>
</ThemeProvider>
);
}
Expand Down
193 changes: 75 additions & 118 deletions src/app/components/announcements/announcements-fab.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
import React, { useEffect, useState } from 'react';
import {
Badge,
CardHeader,
IconButton,
Menu,
makeStyles,
} from '@material-ui/core';
import NotificationsIcon from '@material-ui/icons/Notifications';

import { useFetchAnnouncements } from 'api/announcements';
import { palette } from 'themes';

const useStyles = makeStyles({
announcementHeader: {
backgroundColor: palette.white,
padding: '16px',
fontWeight: 'bold',
color: palette.black,
},
badge: {
border: `2px solid ${palette.primaryDark}`,
},
});

function ChplAnnouncementsFab() {
const [expanded, setExpanded] = useState(false);
const [anchorEl, setAnchorEl] = useState(null);
const [announcements, setAnnouncements] = useState([]);
const classes = useStyles();

const { data, isLoading, isSuccess } = useFetchAnnouncements({ getFuture: false });

Expand All @@ -16,135 +36,72 @@ function ChplAnnouncementsFab() {
}, [data, isLoading, isSuccess]);

const handleToggle = (event) => {
event.stopPropagation();
setExpanded((prev) => !prev);
setAnchorEl(anchorEl ? null : event.currentTarget);
};

useEffect(() => {
const handleClickOutside = (event) => {
const panel = document.getElementById('announcements-panel');
if (panel && !panel.contains(event.target)) {
setExpanded(false);
}
};
if (expanded) {
document.addEventListener('mousedown', handleClickOutside);
return () => document.removeEventListener('mousedown', handleClickOutside);
}
}, [expanded]);

return (
<>
<button
style={{
position: 'sticky',
zIndex: 96000,
backgroundColor: 'transparent',
color: palette.white,
border: 'none',
cursor: 'pointer',
boxShadow: 'none',
padding: '14px',
borderRadius: '50%',
}}
<IconButton
onClick={handleToggle}
aria-label="Show announcements"
style={{ color: palette.white }}
>
<span
style={{
backgroundColor: palette.primary,
color: palette.white,
borderRadius: '50%',
padding: '2px 6px',
fontSize: '12px',
position: 'absolute',
border: `2px ${palette.primaryDark} solid`,
top: '-2px',
right: '4px',
}}
<Badge
badgeContent={announcements.length}
color="primary"
overlap="rectangular"
classes={{ badge: classes.badge }}
>
{announcements.length}
</span>
<NotificationsIcon style={{ fontSize: 18, color: palette.white }} />
</button>

{expanded && (
<div
id="announcements-panel"
style={{
<NotificationsIcon style={{ fontSize: 18 }} />
</Badge>
</IconButton>
<Menu
anchorEl={anchorEl}
open={Boolean(anchorEl)}
onClose={handleToggle}
getContentAnchorEl={null}
anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}
transformOrigin={{ vertical: 'top', horizontal: 'right' }}
disableScrollLock
PaperProps={{
style: {
width: '325px',
top: '64px',
right: 0,
position: 'fixed',
maxWidth: 'calc(100vw - 48px)',
maxHeight: 'calc(100vh - 100px)',
zIndex: 9998,
display: 'flex',
flexDirection: 'column',
border: `2px solid ${palette.primary}`,
background: palette.white,
borderRadius: '12px',
boxShadow: '0 2px 8px rgba(0,0,0,0.15)',
}}
role="region"
aria-label="Announcements panel"
aria-live="polite"
>
<div
style={{
padding: '16px',
backgroundColor: palette.primary,
color: palette.white,
borderRadius: '8px 8px 0px 0px',
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
}}
>
<h3 style={{
margin: 0, fontSize: '1.75rem', fontWeight: 'bold', fontFamily: 'inherit',
}}
>
Announcement
{announcements.length !== 1 ? 's' : ''}
</h3>
<button
onClick={handleToggle}
style={{
background: 'none', border: 'none', color: palette.white, fontSize: '20px', cursor: 'pointer',
}}
aria-label="Close announcements panel"
>
×
</button>
</div>
<div role="main" style={{ flex: 1, overflowY: 'auto' }}>
{announcements.length === 0 ? (
<div style={{ textAlign: 'center', color: '#999', padding: '32px 16px' }}>
<p style={{ fontFamily: 'inherit', fontSize: 'inherit', margin: 0 }}>No current announcements</p>
</div>
) : (
<div style={{ display: 'flex', flexDirection: 'column' }}>
{announcements.map((announcement, index) => (
<div
key={announcement.id || index}
style={{
padding: '16px', wordWrap: 'break-word', whiteSpace: 'pre-wrap', borderBottom: '1px solid #e0e0e0',
}}
>
<h4 style={{ fontFamily: 'inherit', fontSize: 'inherit', margin: 0 }}>
<strong>{announcement.title}</strong>
</h4>
{announcement.text && (
<span>{announcement.text}</span>
)}
</div>
))}
</div>
)}
</div>
},
}}
>
<CardHeader
fontWeight="bold"
className={classes.announcementHeader}
title={`Announcement${announcements.length !== 1 ? 's' : ''}`}
/>
<div style={{ maxHeight: 'calc(100vh - 200px)', overflowY: 'auto' }}>
{announcements.length === 0 ? (
<div style={{ textAlign: 'center', color: '#999', padding: '32px 16px' }}>
<p style={{ fontFamily: 'inherit', fontSize: 'inherit', margin: 0 }}>No current announcements</p>
</div>
) : (
<div style={{ display: 'flex', flexDirection: 'column' }}>
{announcements.map((announcement, index) => (
<div
key={announcement.id || index}
style={{
padding: '16px', wordWrap: 'break-word', whiteSpace: 'pre-wrap', borderBottom: '1px solid #e0e0e0',
}}
>
<h4 style={{ fontFamily: 'inherit', fontSize: 'inherit', margin: 0 }}>
<strong>{announcement.title}</strong>
</h4>
{announcement.text && (
<span>{announcement.text}</span>
)}
</div>
))}
</div>
)}
</div>
)}
</Menu>
</>
);
}
Expand Down
18 changes: 0 additions & 18 deletions src/app/components/cms-widget/cms-display-wrapper.jsx

This file was deleted.

11 changes: 5 additions & 6 deletions src/app/components/cms-widget/cms-display.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useContext, useEffect, useState } from 'react';
import {
Button,
Box,
Button,
CardContent,
Chip,
CircularProgress,
Expand Down Expand Up @@ -196,7 +196,7 @@ function ChplCmsDisplay() {

if (!listings || listings.length === 0) {
return (
<>
<CardContent className={classes.cardcontentPadding}>
<Typography className={classes.emptyStateTitle} variant="h3" gutterBottom>
CMS Certification ID Creator
</Typography>
Expand Down Expand Up @@ -239,7 +239,7 @@ function ChplCmsDisplay() {
/>
.
</Typography>
</>
</CardContent>
);
}

Expand Down Expand Up @@ -315,12 +315,11 @@ function ChplCmsDisplay() {
/>
{ idAnalysis.metPercentages?.criteriaMet < 100
&& (
<Typography variant="body1" color="textSecondary" className={classes.preserveWhitespacePreWrapText}>
<Typography>
Note: the selected product
{listings?.length !== 1 ? 's' : ''}
{' '}
must meet 100% of the Base Criteria.
{' '}
</Typography>
)}
</>
Expand Down Expand Up @@ -359,7 +358,7 @@ function ChplCmsDisplay() {
<Divider />
<Typography className={classes.sectionLabelFontWeight800}>Product Selected</Typography>
<div className={classes.chipContainer}>
{ listings.sort((a, b) => (a.name < b.name ? -1 : 1))
{ [...listings].sort((a, b) => (a.product < b.product ? -1 : 1))
.map((listing) => (
<Chip
className={classes.productChips}
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/cms-widget/cms-widget.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
});
$scope.$on('$destroy', removeAll);
var addListing = $scope.$on('cms.addListing', (evt, listing) => {
vm.toggleProduct(listing.id, listing.product, listing.chplProductNumber);
vm.toggleProduct(listing.id, listing.product.name, listing.chplProductNumber);
});
$scope.$on('$destroy', addListing);
var removeListing = $scope.$on('cms.removeListing', (evt, listing) => {
vm.toggleProduct(listing.id, listing.product, listing.chplProductNumber);
vm.toggleProduct(listing.id, listing.product.name, listing.chplProductNumber);
});
$scope.$on('$destroy', removeListing);
};
Expand Down
Loading
Loading