Skip to content

Commit a8980ab

Browse files
feature/dep315: Modified app layout, added new landing components, refactored landing components, other misc fixes. (#2891)
* feature/dep315: Modified app layout, added new landing components, refactored landing components, other misc fixes. * feature/dep315: Fixed indentation in changelog. * feature/dep315: Refactored filters and got them working, switched landing area to context data, updated landing design, other small fixes. * feature/dep315: Fixed api linting errors, fixed failing web unit test. * feature/dep315: Fixed outdated import in authoring subscribe section. * feature/dep315: Sonar cube optimizations and removal of console.log() instances.
1 parent 9bb1104 commit a8980ab

41 files changed

Lines changed: 926 additions & 772 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.MD

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
## Jul 7, 2026
2+
3+
- **Feature** Integrated new landing hero section and introduction [🎟️ DEP-315](https://citz-gdx.atlassian.net/browse/DEP-315)
4+
- Refactored existing landing code for structural simplicity
5+
- Created a reusable container/section block that can be reused anywhere
6+
- Added params to URL for future filter updating (can be decoupled easily if not desired)
7+
- Implemented UX designs (mobile and desktop)
8+
- Removed app's square box that appears at bigger viewports
9+
- Ensured that other layouts were not negatively affected by change (admin, admin landing preview, admin engagement preview)
10+
- Added constrained option for internal header component as an optional boolean prop
11+
- Fixed: Engagement preview was looking for route loader address that didn't exist
12+
- Fixed: Slug was not being populated with SuggestedEngagementAttachment, so Suggested Engagement links were not working
13+
- Fixed: Small typo in security response headers of API
14+
- Fixed: Console error for authoring section details tabs, selection/list mismatch
15+
- Enhanced: Notification banner now supports multiple lines for mobile (or long messages, if needed in the future)
16+
117
## June 23, 2026
218

319
- **Feature** Imported CHEFS components into DEP [🎟️ DEP-275](https://citz-gdx.atlassian.net/browse/DEP-275)

api/src/api/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ def _deprecated_print(*args, **kwargs):
5757
csp = (
5858
secure.ContentSecurityPolicy()
5959
.default_src("'self'")
60-
.script_src("'self' 'unsafe-inline'")
61-
.style_src("'self' 'unsafe-inline'")
62-
.img_src("'self' data:")
60+
.script_src("'self'", "'unsafe-inline'")
61+
.style_src("'self'", "'unsafe-inline'")
62+
.img_src("'self'", "'data:'")
6363
.object_src("'self'")
6464
.connect_src("'self'")
6565
)

api/src/api/models/engagement.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,18 @@ def _filter_by_engagement_status(query, search_options):
296296
status_filter.append(
297297
and_(
298298
Engagement.status_id == Status.Published.value,
299-
Engagement.start_date <= datetime.now()
299+
Engagement.start_date <= datetime.now(),
300+
Engagement.end_date > datetime.now()
300301
)
301302
)
303+
if EngagementDisplayStatus.Closed.value in statuses:
304+
status_filter.append(
305+
and_(
306+
Engagement.status_id == Status.Closed.value,
307+
Engagement.end_date < datetime.now()
308+
)
309+
)
310+
302311
if EngagementDisplayStatus.Unpublished.value in statuses:
303312
status_filter.append(Engagement.status_id ==
304313
Status.Unpublished.value)

api/src/api/schemas/suggested_engagement.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class SuggestedEngagementAttachment(Schema):
7070
is_internal = fields.Bool(data_key='is_internal')
7171
consent_message = fields.Str(data_key='consent_message')
7272
sponsor_name = fields.Str(data_key='sponsor_name')
73+
slug = fields.Str(data_key='slug')
7374

7475
def get_banner_url(self, obj):
7576
"""Return the object storage URL for the banner image."""

web/src/DocumentTitle.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ const DocumentTitle = () => {
3939
const resolveTitle = async () => {
4040
const crumbs = await getResolvedCrumbs(matches);
4141
if (cancelled) return;
42-
console.log('Resolved crumbs for title:', crumbs);
4342
const filteredCrumbs = crumbs
4443
// Exclude crumbs that are marked as index pages UNLESS they are the current page
4544
.filter((crumb, index) => (crumb?.title ?? crumb?.name) && (index == 0 || !crumb?.isIndex))

web/src/components/appLayouts/PublicLayout.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,16 @@ export const PublicLayout = () => {
3030
>
3131
<Box
3232
sx={{
33-
maxWidth: '1926px',
34-
margin: '0 auto',
3533
background: colors.surface.white,
3634
}}
3735
>
3836
<DocumentTitle />
3937
<PageViewTracker />
4038
<Notification />
4139
<NotificationModal />
42-
{isAuthenticated ? <InternalHeader showSideNav={false} /> : <PublicHeader />}
40+
{isAuthenticated ? <InternalHeader constrained showSideNav={false} /> : <PublicHeader />}
4341
<ScrollToTop />
44-
<Box component="main" sx={isAuthenticated ? { marginTop: { xs: '3.5em', md: '6.5em' } } : undefined}>
42+
<Box component="main" sx={{ marginTop: isAuthenticated ? '3.375em' : 0 }}>
4543
<Outlet />
4644
</Box>
4745
<FeedbackModal />

web/src/components/engagement/admin/create/authoring/AuthoringDetails.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ const AuthoringDetails = () => {
566566
</AuthoringFormContainer>
567567

568568
{/* Tab instructions */}
569-
{currentTab && (
569+
{currentTab && authoringDetailsTabs?.length > 0 && (
570570
<TabContext value={currentTab}>
571571
<AuthoringFormContainer rowSpacing="2rem" pt="0.5rem" isHydrating={isHydrating}>
572572
{tabsEnabled && (

web/src/components/engagement/admin/create/authoring/AuthoringFeedback.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import { getEditorStateFromRaw } from 'components/common/RichTextEditor/utils';
1414
import ConfirmModal from 'components/common/Modals/ConfirmModal';
1515
import { EngagementStatus } from 'constants/engagementStatus';
1616
import { AuthoringFormContainer, AuthoringFormSection } from './AuthoringFormLayout';
17-
import { tryParse } from './utils';
1817
import { getEngagementTranslationByCode } from 'services/engagementService';
1918
import { useAuthoringPageHydration } from './useAuthoringPageHydration';
2019
import { AppConfig } from 'config';
20+
import { tryParse } from 'helper';
2121

2222
type SelectOption = { label: string; value: number };
2323

@@ -56,7 +56,7 @@ const AuthoringFeedback = () => {
5656
...defaultValuesObject,
5757
form_source: pageName,
5858
id: Number(loadedEngagement.id),
59-
status_id: Number(loadedEngagement.id),
59+
status_id: Number(loadedEngagement.status_id),
6060
feedback_heading: feedbackHeading || '',
6161
feedback_body: tryParse(feedbackBody) ? getEditorStateFromRaw(feedbackBody) || '' : '',
6262
selected_survey_id: loadedEngagement.surveys?.find(

web/src/components/engagement/admin/create/authoring/AuthoringSubscribe.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import { useOutletContext, useParams } from 'react-router';
1010
import { defaultValuesObject, EngagementUpdateData } from './AuthoringContext';
1111
import { AuthoringFormContainer, AuthoringFormSection } from './AuthoringFormLayout';
1212
import { AuthoringTemplateOutletContext } from './types';
13-
import { tryParse } from './utils';
1413
import { getEngagementTranslationByCode } from 'services/engagementService';
1514
import { useAuthoringPageHydration } from './useAuthoringPageHydration';
1615
import { AppConfig } from 'config';
16+
import { tryParse } from 'helper';
1717

1818
type SubscribeAuthoringData = EngagementUpdateData & {
1919
subscribe_section_heading: string;

web/src/components/engagement/admin/create/authoring/AuthoringSummary.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import WidgetPicker from '../widgets';
1313
import { WidgetLocation } from 'models/widget';
1414
import { getEditorStateFromRaw } from 'components/common/RichTextEditor/utils';
1515
import { AuthoringFormContainer, AuthoringFormSection } from './AuthoringFormLayout';
16-
import { tryParse } from './utils';
1716
import { getEngagementTranslationByCode } from 'services/engagementService';
1817
import { useAuthoringPageHydration } from './useAuthoringPageHydration';
1918
import { AppConfig } from 'config';
19+
import { tryParse } from 'helper';
2020

2121
const AuthoringSummary = () => {
2222
const { setDefaultValues, fetcher, pageName }: AuthoringTemplateOutletContext = useOutletContext(); // Access the form functions and values from the authoring template.

0 commit comments

Comments
 (0)