From 34a01e1d5a2625aa0d9e0382775dd72b7799d614 Mon Sep 17 00:00:00 2001 From: NatSquared Date: Thu, 27 Jun 2024 11:10:50 -0700 Subject: [PATCH 1/8] Fix tenant landing page --- CHANGELOG.MD | 6 ++ docs/MET_database_ERD.md | 99 ++++++++++--------- .../901a6724bca2_rename_tenant_columns.py | 28 ++++++ met-api/src/met_api/models/tenant.py | 6 +- .../src/met_api/schemas/schemas/tenant.json | 18 ++-- .../schemas/schemas/tenant_update.json | 18 ++-- met-api/src/met_api/schemas/tenant.py | 6 +- met-api/tests/unit/api/test_tenant.py | 4 +- met-api/tests/utilities/factory_scenarios.py | 4 +- met-api/tests/utilities/factory_utils.py | 2 +- met-web/src/App.tsx | 6 +- .../components/common/Typography/Headers.tsx | 3 + .../components/landing/LandingComponent.tsx | 2 +- .../components/layout/Header/PublicHeader.tsx | 68 ++++--------- .../components/tenantManagement/Detail.tsx | 10 +- .../tenantManagement/TenantForm.tsx | 40 ++++---- met-web/src/models/tenant.ts | 6 +- met-web/src/reduxSlices/tenantSlice.ts | 12 +-- .../tenantManagement/CreateTenant.test.tsx | 12 +-- .../tenantManagement/EditTenant.test.tsx | 6 +- .../tenantManagement/TenantDetail.test.tsx | 6 +- 21 files changed, 185 insertions(+), 177 deletions(-) create mode 100644 met-api/migrations/versions/901a6724bca2_rename_tenant_columns.py diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 703f59297..f6e065db8 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,3 +1,9 @@ +## June 27, 2024 + +- **Bugfix** Fix tenant landing page [🎟️ DESENG-635](https://citz-gdx.atlassian.net/browse/DESENG-635) + - Fixed an issue where the tenant's uploaded banner would appear in the position of the BC Logo instead of the banner + - Renamed columns within the DB and app to more accurately describe their purpose + ## June 26, 2024 - **Feature** Redesigned Engagement Cards & added Suggested Engagements to the engagement page [🎟️ DESENG-634](https://citz-gdx.atlassian.net/browse/DESENG-634) diff --git a/docs/MET_database_ERD.md b/docs/MET_database_ERD.md index afd7018f1..7f3d2e658 100644 --- a/docs/MET_database_ERD.md +++ b/docs/MET_database_ERD.md @@ -40,7 +40,7 @@ erDiagram string status_name string description timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } @@ -51,35 +51,35 @@ erDiagram string name string description string title - string logo_url + string hero_image_url timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } - tenant only one to zero or more engagement : has + tenant only one to zero or more engagement : has widget { integer id PK integer widget_type_id FK integer engagement_id FK timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by integer sort_index string title } - engagement only one to zero or more widget : has + engagement only one to zero or more widget : has widget_type { integer id PK string name UK string description timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } - widget only one to one widget_type : has + widget only one to one widget_type : has widget_events { integer id PK string title @@ -87,22 +87,22 @@ erDiagram integer sort_index integer widget_id FK "The id from widget" timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } - widget only one to zero or more widget_events : has + widget only one to zero or more widget_events : has widget_item { integer id PK integer widget_data_id integer widget_id FK "The id from widget" timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by integer sort_index } - widget only one to zero or more widget_item : has + widget only one to zero or more widget_item : has widget_map { integer id PK double longitude @@ -110,14 +110,14 @@ erDiagram integer engagement_id FK "The id from engagement" integer widget_id FK "The id from widget" timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by string marker_label string geojson string file_name } - widget only one to zero or more widget_map : has + widget only one to zero or more widget_map : has widget_video { integer id PK integer widget_id FK "The id from widget" @@ -125,11 +125,11 @@ erDiagram string video_url string description timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } - widget only one to zero or more widget_video : has + widget only one to zero or more widget_video : has widget_timeline { integer id PK integer widget_id FK "The id from widget" @@ -137,11 +137,11 @@ erDiagram string title string description timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } - widget only one to zero or more widget_timeline : has + widget only one to zero or more widget_timeline : has timeline_event { integer id PK integer widget_id FK "The id from widget" @@ -152,11 +152,11 @@ erDiagram enum status integer position timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } - widget only one to zero or more timeline_event : has + widget only one to zero or more timeline_event : has widget_documents { integer id PK string title @@ -166,7 +166,7 @@ erDiagram integer sort_index integer widget_id FK "The id from widget" timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by boolean is_uploaded @@ -177,7 +177,7 @@ erDiagram string status_name string description timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } @@ -185,7 +185,7 @@ erDiagram integer id PK boolean is_subscribed timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by integer engagement_id @@ -198,11 +198,11 @@ erDiagram jsonb submission_json integer survey_id FK "The id from survey" timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by string reviewed_by - timestamp review_date + timestamp review_date integer comment_status_id FK "The id from comment_status" boolean has_personal_info boolean has_profanity @@ -212,7 +212,7 @@ erDiagram boolean has_personal_info integer participant_id FK "The id from participant" } - survey only one to zero or more submission : has + survey only one to zero or more submission : has staff_users { integer id PK string first_name @@ -225,12 +225,12 @@ erDiagram integer status_id FK "The id from user_status" integer tenant_id FK "The id from tenant" timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } - tenant only one to zero or more staff_users : has - staff_users only one to one user_status : has + tenant only one to zero or more staff_users : has + staff_users only one to one user_status : has staff_note { integer id PK string note @@ -238,7 +238,7 @@ erDiagram integer survey_id FK "The id from survey" integer submission_id FK "The id from submission" timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } @@ -252,16 +252,16 @@ erDiagram string question boolean display timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } - survey only one to zero or one report_setting : has + survey only one to zero or one report_setting : has participant { integer id PK string email_address timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } @@ -270,7 +270,7 @@ erDiagram string status_name string description timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } @@ -281,7 +281,7 @@ erDiagram integer user_id FK "The id from staff_users" type type timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by integer tenant_id FK "The id from tenant" @@ -293,7 +293,7 @@ erDiagram string name string description timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } @@ -303,7 +303,7 @@ erDiagram string hash_code UK string extension timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } @@ -316,7 +316,7 @@ erDiagram string submission_path type source timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by integer tenant_id FK "The id from tenant" @@ -334,7 +334,7 @@ erDiagram integer sort_index integer widget_events_id FK "The id from widget_events" timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } @@ -345,7 +345,7 @@ erDiagram type survey_status json block_text timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } @@ -355,7 +355,7 @@ erDiagram integer engagement_id FK "The id from engagement" string slug timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } @@ -364,7 +364,7 @@ erDiagram integer engagement_id PK, FK "The id from engagement" boolean send_report timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } @@ -374,7 +374,7 @@ erDiagram string project_id jsonb project_metadata timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } @@ -385,7 +385,7 @@ erDiagram integer survey_id FK "The id from survey" boolean is_active timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by integer submission_id FK "The id from submission" @@ -401,7 +401,7 @@ erDiagram string action type notification_status timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } @@ -416,7 +416,7 @@ erDiagram string avatar_filename integer tenant_id FK "The id from tenant" timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } @@ -426,7 +426,7 @@ erDiagram string status_name UK string description timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by } @@ -438,10 +438,11 @@ erDiagram integer submission_id FK "The id from submission" string component_id timestamp created_date - timestamp updated_date + timestamp updated_date string created_by string updated_by integer participant_id FK "The id from participant" } comment only one to one comment_status : has - submission only one to zero or many comment : has \ No newline at end of file + submission only one to zero or many comment : has +``` diff --git a/met-api/migrations/versions/901a6724bca2_rename_tenant_columns.py b/met-api/migrations/versions/901a6724bca2_rename_tenant_columns.py new file mode 100644 index 000000000..09c4d18b8 --- /dev/null +++ b/met-api/migrations/versions/901a6724bca2_rename_tenant_columns.py @@ -0,0 +1,28 @@ +"""rename tenant columns to properly describe their purpose + +Revision ID: 901a6724bca2 +Revises: 82ca95b4b7c1 +Create Date: 2024-06-27 10:48:40.838126 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '901a6724bca2' +down_revision = '82ca95b4b7c1' +branch_labels = None +depends_on = None + + +def upgrade(): + op.alter_column('tenant', 'logo_url', new_column_name='hero_image_url') + op.alter_column('tenant', 'logo_credit', new_column_name='hero_image_credit') + op.alter_column('tenant', 'logo_description', new_column_name='hero_image_description') + + +def downgrade(): + op.alter_column('tenant', 'hero_image_url', new_column_name='logo_url') + op.alter_column('tenant', 'hero_image_credit', new_column_name='logo_credit') + op.alter_column('tenant', 'hero_image_description', new_column_name='logo_description') diff --git a/met-api/src/met_api/models/tenant.py b/met-api/src/met_api/models/tenant.py index c486ba281..8b166a62a 100644 --- a/met-api/src/met_api/models/tenant.py +++ b/met-api/src/met_api/models/tenant.py @@ -24,9 +24,9 @@ class Tenant(BaseModel): ) description = db.Column(db.String(300)) title = db.Column(db.String(30), nullable=False) - logo_url = db.Column(db.String(300), nullable=True) - logo_credit = db.Column(db.String(60), comment='Hero banner image credit', nullable=True) - logo_description = db.Column(db.String(80), comment='Hero banner image description', nullable=True) + hero_image_url = db.Column(db.String(300), nullable=True) + hero_image_credit = db.Column(db.String(60), comment='Hero banner image credit', nullable=True) + hero_image_description = db.Column(db.String(80), comment='Hero banner image description', nullable=True) @staticmethod def find_by_short_name(short_name: str) -> Tenant: diff --git a/met-api/src/met_api/schemas/schemas/tenant.json b/met-api/src/met_api/schemas/schemas/tenant.json index 1fcbd2ae4..00c06247e 100644 --- a/met-api/src/met_api/schemas/schemas/tenant.json +++ b/met-api/src/met_api/schemas/schemas/tenant.json @@ -13,9 +13,9 @@ "contact_email": "john.doe@gov.bc.ca", "title": "Modern Engagement", "description": "Responsible for digital experience projects.", - "logo_url": "https://example.com/logo.png", - "logo_credit": "Logo by Example", - "logo_description": "Official logo of the Government Digital Experience." + "hero_image_url": "https://example.com/logo.png", + "hero_image_credit": "Logo by Example", + "hero_image_description": "Official logo of the Government Digital Experience." } ], "required": ["short_name", "contact_name", "contact_email", "title"], @@ -69,22 +69,22 @@ "description": "A brief description of the tenant.", "examples": ["Responsible for digital experience projects."] }, - "logo_url": { - "$id": "#/properties/logo_url", + "hero_image_url": { + "$id": "#/properties/hero_image_url", "type": "string", "title": "Logo URL", "description": "URL to the tenant's logo.", "examples": ["https://example.com/logo.png"] }, - "logo_credit": { - "$id": "#/properties/logo_credit", + "hero_image_credit": { + "$id": "#/properties/hero_image_credit", "type": "string", "title": "Logo Credit", "description": "Credit for the logo image.", "examples": ["Logo by Example"] }, - "logo_description": { - "$id": "#/properties/logo_description", + "hero_image_description": { + "$id": "#/properties/hero_image_description", "type": "string", "title": "Logo Description", "description": "Description of the logo image.", diff --git a/met-api/src/met_api/schemas/schemas/tenant_update.json b/met-api/src/met_api/schemas/schemas/tenant_update.json index 49b60e918..c3463b38c 100644 --- a/met-api/src/met_api/schemas/schemas/tenant_update.json +++ b/met-api/src/met_api/schemas/schemas/tenant_update.json @@ -13,9 +13,9 @@ "contact_email": "john.doe@gov.bc.ca", "title": "Modern Engagement", "description": "Responsible for digital experience projects.", - "logo_url": "https://example.com/logo.png", - "logo_credit": "Logo by Example", - "logo_description": "Official logo of the Government Digital Experience." + "hero_image_url": "https://example.com/logo.png", + "hero_image_credit": "Logo by Example", + "hero_image_description": "Official logo of the Government Digital Experience." } ], "properties": { @@ -68,22 +68,22 @@ "description": "A brief description of the tenant.", "examples": ["Responsible for digital experience projects."] }, - "logo_url": { - "$id": "#/properties/logo_url", + "hero_image_url": { + "$id": "#/properties/hero_image_url", "type": "string", "title": "Logo URL", "description": "URL to the tenant's logo.", "examples": ["https://example.com/logo.png"] }, - "logo_credit": { - "$id": "#/properties/logo_credit", + "hero_image_credit": { + "$id": "#/properties/hero_image_credit", "type": "string", "title": "Logo Credit", "description": "Credit for the logo image.", "examples": ["Logo by Example"] }, - "logo_description": { - "$id": "#/properties/logo_description", + "hero_image_description": { + "$id": "#/properties/hero_image_description", "type": "string", "title": "Logo Description", "description": "Description of the logo image.", diff --git a/met-api/src/met_api/schemas/tenant.py b/met-api/src/met_api/schemas/tenant.py index 5ab57a511..b3bc5e9ef 100644 --- a/met-api/src/met_api/schemas/tenant.py +++ b/met-api/src/met_api/schemas/tenant.py @@ -15,8 +15,8 @@ class Meta: # pylint: disable=too-few-public-methods short_name = fields.Str(data_key='short_name') description = fields.Str(data_key='description') title = fields.Str(data_key='title') - logo_url = fields.Str(data_key='logo_url') + hero_image_url = fields.Str(data_key='hero_image_url') contact_name = fields.Str(data_key='contact_name') contact_email = fields.Str(data_key='contact_email') - logo_credit = fields.Str(data_key='logo_credit') - logo_description = fields.Str(data_key='logo_description') + hero_image_credit = fields.Str(data_key='hero_image_credit') + hero_image_description = fields.Str(data_key='hero_image_description') diff --git a/met-api/tests/unit/api/test_tenant.py b/met-api/tests/unit/api/test_tenant.py index b530c81ee..cebaf57c4 100644 --- a/met-api/tests/unit/api/test_tenant.py +++ b/met-api/tests/unit/api/test_tenant.py @@ -52,8 +52,8 @@ def test_create_tenant(client, jwt, session, tenant_info, setup_super_admin_user """Assert that a tenant can be POSTed.""" _, claims = setup_super_admin_user_and_claims headers = factory_auth_header(jwt=jwt, claims=claims) - # remove logo_url from tenant_info - tenant_info.pop('logo_url') + # remove header image url from tenant_info + tenant_info.pop('header_image_url') rv = client.post('/api/tenants/', data=json.dumps(tenant_info), headers=headers, content_type=ContentType.JSON.value) assert rv.status_code == HTTPStatus.CREATED diff --git a/met-api/tests/utilities/factory_scenarios.py b/met-api/tests/utilities/factory_scenarios.py index 88e1bdc1b..438d3ea81 100644 --- a/met-api/tests/utilities/factory_scenarios.py +++ b/met-api/tests/utilities/factory_scenarios.py @@ -163,7 +163,7 @@ class TestTenantInfo(dict, Enum): 'contact_email': fake.email(), 'description': fake.text(max_nb_chars=300), 'title': fake.text(max_nb_chars=20), - 'logo_url': None, + 'hero_image_url': None, } tenant2 = { 'short_name': 'EMLI', @@ -172,7 +172,7 @@ class TestTenantInfo(dict, Enum): 'contact_email': fake.email(), 'description': fake.text(max_nb_chars=300), 'title': fake.text(max_nb_chars=20), - 'logo_url': None, + 'hero_image_url': None, } diff --git a/met-api/tests/utilities/factory_utils.py b/met-api/tests/utilities/factory_utils.py index ae181c840..61364f417 100644 --- a/met-api/tests/utilities/factory_utils.py +++ b/met-api/tests/utilities/factory_utils.py @@ -191,7 +191,7 @@ def factory_tenant_model(tenant_info: dict = TestTenantInfo.tenant1): contact_email=tenant_info.get('contact_email'), description=tenant_info.get('description'), title=tenant_info.get('title'), - logo_url=tenant_info.get('logo_url'), + hero_image_url=tenant_info.get('hero_image_url'), ) tenant.save() return tenant diff --git a/met-web/src/App.tsx b/met-web/src/App.tsx index 8ede5f481..f38688d76 100644 --- a/met-web/src/App.tsx +++ b/met-web/src/App.tsx @@ -68,15 +68,15 @@ const App = () => { saveTenant({ id: _basename, name: tenant.name, - logoUrl: tenant.logo_url ?? '', + logoUrl: tenant.hero_image_url ?? '', basename: appBaseName, title: tenant.title, contact_email: tenant.contact_email ?? '', contact_name: tenant.contact_name ?? '', description: tenant.description ?? '', short_name: tenant.short_name, - logo_description: tenant.logo_description ?? '', - logo_credit: tenant.logo_credit ?? '', + hero_image_description: tenant.hero_image_description ?? '', + hero_image_credit: tenant.hero_image_credit ?? '', }), ); } catch { diff --git a/met-web/src/components/common/Typography/Headers.tsx b/met-web/src/components/common/Typography/Headers.tsx index 0bd963171..12f006e79 100644 --- a/met-web/src/components/common/Typography/Headers.tsx +++ b/met-web/src/components/common/Typography/Headers.tsx @@ -17,13 +17,16 @@ const fontWeight = (weight?: string | number) => { export const Header1 = ({ children, weight, + component, ...props }: { children: React.ReactNode; weight?: 'bold' | 'regular' | 'thin'; + component?: React.ElementType; } & TypographyProps) => { return ( { - + { const isLoggedIn = useAppSelector((state) => state.user.authentication.authenticated); - const [imageError, setImageError] = useState(false); const navigate = useNavigate(); const { t: translate } = useAppTranslation(); const { engagementViewMounted, availableEngagementTranslations } = useContext(LanguageContext); const tenant: TenantState = useAppSelector((state) => state.tenant); - const logoUrl = tenant.logoUrl; const headerTitle = tenant.title; return ( @@ -36,56 +34,28 @@ const PublicHeader = () => { }} > - - - {translate('common.defaultText')} { - navigate(`/`); - }} - onError={(_e) => { - setImageError(true); - }} - /> - - - - { - navigate(`/`); - }} - alt={translate('common.defaultBCText')} - /> - - { + navigate(`/`); + }} + alt={translate('common.defaultBCText')} + /> + { navigate(`/`); }} > {headerTitle} - + diff --git a/met-web/src/components/engagement/new/view/index.tsx b/met-web/src/components/engagement/new/view/index.tsx index 95c9b0e70..a591f4777 100644 --- a/met-web/src/components/engagement/new/view/index.tsx +++ b/met-web/src/components/engagement/new/view/index.tsx @@ -13,8 +13,8 @@ export const ViewEngagement = () => { + - ); }; diff --git a/met-web/src/components/landing/EngagementTile.tsx b/met-web/src/components/landing/EngagementTile.tsx index 3b60faa9e..8e00fb940 100644 --- a/met-web/src/components/landing/EngagementTile.tsx +++ b/met-web/src/components/landing/EngagementTile.tsx @@ -8,12 +8,12 @@ import { TileSkeleton } from './TileSkeleton'; import { getSlugByEngagementId } from 'services/engagementSlugService'; import { getBaseUrl } from 'helper'; import { useAppTranslation } from 'hooks'; -import { Link } from 'components/common/Navigation'; -import { BodyText, EyebrowText } from 'components/common/Typography'; +import { BodyText, Header2 } from 'components/common/Typography'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faArrowRight } from '@fortawesome/pro-regular-svg-icons'; -import { colors, elevations, globalFocusVisible } from 'components/common'; +import { colors, elevations, globalFocusShadow } from 'components/common'; import { BaseTheme, DarkTheme } from 'styles/Theme'; +import { RouterLinkRenderer } from 'components/common/Navigation/Link'; interface EngagementTileProps { passedEngagement?: Engagement; @@ -80,16 +80,47 @@ const EngagementTile = ({ passedEngagement, engagementId }: EngagementTileProps) } if (!loadedEngagement) { - return {translate('landingPage.tile.error')}; + return {translate('landingPage.tile.error')}; } const { name, banner_url } = loadedEngagement; return ( - - - + + + setIsHovered(true)} onMouseLeave={() => { setIsHovered(false); @@ -99,85 +130,77 @@ const EngagementTile = ({ passedEngagement, engagementId }: EngagementTileProps) onBlur={() => setIsFocused(false)} onMouseDown={() => setIsActive(true)} onMouseUp={() => setIsActive(false)} - className={isActive ? 'active' : ''} + LinkComponent={RouterLinkRenderer} + href={engagementUrl} sx={{ - borderRadius: '24px', - width: '320px', - cursor: 'pointer', - '&:hover': { - boxShadow: elevations.hover, - background: colors.surface.blue[90], - }, - '&.active': { - boxShadow: elevations.pressed, - background: colors.surface.blue[100], - }, - '&:focus': { - boxShadow: elevations.hover, - background: colors.surface.blue[90], - }, '&:focus-visible': { - boxShadow: globalFocusVisible + elevations.hover, - background: colors.surface.blue[90], + // focus visible styling is applied by the parent Card component + border: 'none', + outline: 'none', + boxShadow: 'none', + padding: 'unset', + margin: 'unset', }, }} > - - {Boolean(banner_url) && } - - } + + + - - {name} - - - - - - - - - - - {' '} - to - - - - - + {name} + + + + + + + + + + {' '} + to + + + + - - - - - + + + + + + // ); }; diff --git a/met-web/src/components/landing/TileSkeleton.tsx b/met-web/src/components/landing/TileSkeleton.tsx index ee017d929..a2fd8e8fa 100644 --- a/met-web/src/components/landing/TileSkeleton.tsx +++ b/met-web/src/components/landing/TileSkeleton.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Card, CardActionArea, CardContent, Grid, Skeleton } from '@mui/material'; -import { EyebrowText, BodyText } from 'components/common/Typography'; +import { Header2, BodyText } from 'components/common/Typography'; import { StatusChipSkeleton } from 'components/common/Indicators/StatusChip'; import { colors } from 'styles/Theme'; @@ -10,16 +10,20 @@ export const TileSkeleton = () => { - - + From 596f164e2909e867f92ec94fb42ff7e85e7046f8 Mon Sep 17 00:00:00 2001 From: NatSquared Date: Thu, 27 Jun 2024 12:43:56 -0700 Subject: [PATCH 4/8] Update ARIA labelling --- .../components/engagement/new/view/SuggestedEngagements.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/met-web/src/components/engagement/new/view/SuggestedEngagements.tsx b/met-web/src/components/engagement/new/view/SuggestedEngagements.tsx index 21f896c45..d42f7ddfd 100644 --- a/met-web/src/components/engagement/new/view/SuggestedEngagements.tsx +++ b/met-web/src/components/engagement/new/view/SuggestedEngagements.tsx @@ -26,9 +26,9 @@ export const SuggestedEngagements = () => { ); return ( -
+
- + You may also be interested in Date: Thu, 27 Jun 2024 13:25:51 -0700 Subject: [PATCH 5/8] Remove commented code --- met-web/src/components/landing/EngagementTile.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/met-web/src/components/landing/EngagementTile.tsx b/met-web/src/components/landing/EngagementTile.tsx index 8e00fb940..ff7a07648 100644 --- a/met-web/src/components/landing/EngagementTile.tsx +++ b/met-web/src/components/landing/EngagementTile.tsx @@ -86,7 +86,6 @@ const EngagementTile = ({ passedEngagement, engagementId }: EngagementTileProps) const { name, banner_url } = loadedEngagement; return ( - // - // ); }; From def7b16d73c031c4c2aeb113c1ca9b74191c65bc Mon Sep 17 00:00:00 2001 From: NatSquared Date: Thu, 27 Jun 2024 14:22:51 -0700 Subject: [PATCH 6/8] tpyo --- met-api/tests/unit/api/test_tenant.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/met-api/tests/unit/api/test_tenant.py b/met-api/tests/unit/api/test_tenant.py index cebaf57c4..faa29c00c 100644 --- a/met-api/tests/unit/api/test_tenant.py +++ b/met-api/tests/unit/api/test_tenant.py @@ -53,7 +53,7 @@ def test_create_tenant(client, jwt, session, tenant_info, setup_super_admin_user _, claims = setup_super_admin_user_and_claims headers = factory_auth_header(jwt=jwt, claims=claims) # remove header image url from tenant_info - tenant_info.pop('header_image_url') + tenant_info.pop('hero_image_url') rv = client.post('/api/tenants/', data=json.dumps(tenant_info), headers=headers, content_type=ContentType.JSON.value) assert rv.status_code == HTTPStatus.CREATED From 64695c497eb2ba5c3f18a5c1f7cf01fc2778b94b Mon Sep 17 00:00:00 2001 From: NatSquared Date: Thu, 27 Jun 2024 14:45:36 -0700 Subject: [PATCH 7/8] Fix redundant fragment tags --- .../src/components/engagement/new/view/index.tsx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/met-web/src/components/engagement/new/view/index.tsx b/met-web/src/components/engagement/new/view/index.tsx index a591f4777..a227bcc5d 100644 --- a/met-web/src/components/engagement/new/view/index.tsx +++ b/met-web/src/components/engagement/new/view/index.tsx @@ -7,15 +7,13 @@ import { SuggestedEngagements } from './SuggestedEngagements'; export const ViewEngagement = () => { return ( - <> -
- - - - - -
- +
+ + + + + +
); }; From 8d5ccf0809516e4f3d723201de06fa806f60c426 Mon Sep 17 00:00:00 2001 From: NatSquared Date: Fri, 28 Jun 2024 09:58:18 -0700 Subject: [PATCH 8/8] replace instances of logoUrl with heroImageUrl --- met-web/src/App.tsx | 2 +- met-web/src/components/landing/LandingComponent.tsx | 2 +- met-web/src/components/tenantManagement/TenantForm.tsx | 6 +++--- met-web/src/reduxSlices/tenantSlice.ts | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/met-web/src/App.tsx b/met-web/src/App.tsx index f38688d76..8184f3a3c 100644 --- a/met-web/src/App.tsx +++ b/met-web/src/App.tsx @@ -68,7 +68,7 @@ const App = () => { saveTenant({ id: _basename, name: tenant.name, - logoUrl: tenant.hero_image_url ?? '', + heroImageUrl: tenant.hero_image_url ?? '', basename: appBaseName, title: tenant.title, contact_email: tenant.contact_email ?? '', diff --git a/met-web/src/components/landing/LandingComponent.tsx b/met-web/src/components/landing/LandingComponent.tsx index 43adb5b16..c722a55c4 100644 --- a/met-web/src/components/landing/LandingComponent.tsx +++ b/met-web/src/components/landing/LandingComponent.tsx @@ -20,7 +20,7 @@ const LandingComponent = () => { - + { reset({ @@ -343,7 +343,7 @@ export const TenantForm = ({ { state.id = action.payload.id; state.name = action.payload.name; - state.logoUrl = action.payload.logoUrl || ''; + state.heroImageUrl = action.payload.heroImageUrl || ''; state.basename = action.payload.basename; state.isLoaded = true; state.title = action.payload.title;