From eb8cd33fe7d5d10b62dac64d685f67c257484bf2 Mon Sep 17 00:00:00 2001 From: trigal Date: Mon, 24 Feb 2025 23:10:54 -0800 Subject: [PATCH 1/2] add bottom margin to secondary alert --- packages/ui/components/core/LocationBasedAlertBanner/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/ui/components/core/LocationBasedAlertBanner/index.tsx b/packages/ui/components/core/LocationBasedAlertBanner/index.tsx index 348e2af0e2..3b4e72154c 100644 --- a/packages/ui/components/core/LocationBasedAlertBanner/index.tsx +++ b/packages/ui/components/core/LocationBasedAlertBanner/index.tsx @@ -49,6 +49,7 @@ const useStyles = createStyles((theme) => ({ height: 'unset', borderRadius: rem(10), padding: `${rem(8)} ${rem(12)}`, + marginBottom: rem(40), '&[data-alert-level="INFO_SECONDARY"]': { height: 'unset', From 703f5203dc3160113e6083dbc8a67552195c4b51 Mon Sep 17 00:00:00 2001 From: trigal Date: Mon, 24 Feb 2025 23:17:28 -0800 Subject: [PATCH 2/2] add "Bell" emoji to secondary alert --- ...te-locationbased-alert-string-add-emoji.ts | 45 +++++++++++++++++++ packages/db/prisma/data-migrations/index.ts | 1 + 2 files changed, 46 insertions(+) create mode 100644 packages/db/prisma/data-migrations/2025-02-24_update-locationbased-alert-string-add-emoji.ts diff --git a/packages/db/prisma/data-migrations/2025-02-24_update-locationbased-alert-string-add-emoji.ts b/packages/db/prisma/data-migrations/2025-02-24_update-locationbased-alert-string-add-emoji.ts new file mode 100644 index 0000000000..bc9548a378 --- /dev/null +++ b/packages/db/prisma/data-migrations/2025-02-24_update-locationbased-alert-string-add-emoji.ts @@ -0,0 +1,45 @@ +import { type MigrationJob } from '~db/prisma/dataMigrationRunner' +import { type JobDef } from '~db/prisma/jobPreRun' + +/** Define the job metadata here. */ +const jobDef: JobDef = { + jobId: '2025-02-24_update-locationbased-alert-string-add-emoji', + title: 'add "Bell" emoji to alert link', + createdBy: 'Diana Garbarino', + /** Optional: Longer description for the job */ + description: 'add "Bell" emoji to alert link', +} +/** + * Job export - this variable MUST be UNIQUE + */ +export const job20250224_update_locationbased_alert_string_add_emoji = { + title: `[${jobDef.jobId}] ${jobDef.title}`, + task: async (ctx, task) => { + const { createLogger, formatMessage, jobPostRunner, prisma } = ctx + /** Create logging instance */ + createLogger(task, jobDef.jobId) + const log = (...args: Parameters) => (task.output = formatMessage(...args)) + + // Variables for the update + const key = 'locationBasedAlert.alrt_01J1D1GAT5G5S6QNMCND5PMDAX' + const ns = 'org-data' + const newTextValue = + '🔔 This anti-trans legislative risk map shows the 2-year risk for anti-trans laws in all 50 states and D.C.' + + // Perform the update + const update = await prisma.translationKey.update({ + where: { ns_key: { key, ns } }, + data: { text: newTextValue }, + }) + + log(`Location-based alert text string updated: ${update.key} with new text: "${update.text}"`) + + /** + * DO NOT REMOVE BELOW + * + * This writes a record to the DB to register that this migration has run successfully. + */ + await jobPostRunner(jobDef) + }, + def: jobDef, +} satisfies MigrationJob diff --git a/packages/db/prisma/data-migrations/index.ts b/packages/db/prisma/data-migrations/index.ts index 62032eccab..2dbc7c6ef5 100644 --- a/packages/db/prisma/data-migrations/index.ts +++ b/packages/db/prisma/data-migrations/index.ts @@ -25,4 +25,5 @@ export * from './2025-02-17_new_legal-service-tag' export * from './2025-02-17_new_mental-health-service-tag' export * from './2025-02-17_new-cost-attribute' export * from './2025-02-17_update-medical-tags' +export * from './2025-02-24_update-locationbased-alert-string-add-emoji' // codegen:end