Skip to content

Commit e2f0440

Browse files
authored
release: 2025-02-01 (#1462)
<!--- Please provide a general summary of your changes in the title above --> # Pull Request type <!-- Please try to limit your pull request to one type; submit multiple pull requests if needed. --> Please check the type of change your PR introduces: - [ ] Bugfix - [x] Feature - [ ] Code style update (formatting, renaming) - [ ] Refactoring (no functional changes, no API changes) - [ ] Build-related changes - [ ] Documentation content changes - [ ] Other (please describe): ## What is the current behavior? <!-- Please describe the current behavior that you are modifying, or link to a relevant issue. --> Issue Number: N/A ## What is the new behavior? - - - ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this does introduce a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR, such as screenshots of how the component looks before and after the change. -->
2 parents 9c61f42 + 4860f3d commit e2f0440

7 files changed

+97
-5
lines changed

packages/db/prisma/data-migrations/2025-01-29_update-nationwide-locationbased-alert.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ export const job20250129_update_nationwide_locationbased_alert = {
3434

3535
const update2 = await prisma.locationAlert.update({
3636
where: { id: 'alrt_01J1D1GAT5G5S6QNMCND5PMDAX' },
37-
data: { level: 'INFO_PRIMARY' },
37+
data: { level: 'INFO_PRIMARY' },
3838
})
3939

4040
const update3 = await prisma.locationAlert.update({
4141
where: { id: 'alrt_01J5XNBQ5GREHSHK5D2QTCXRWE' },
42-
data: { active: true, level: 'WARN_SECONDARY' },
42+
data: { active: true, level: 'WARN_SECONDARY' },
4343
})
4444

4545
log(`Location-based alert text string updated: ${update1.key} with new text: "${update1.text}"`)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import { type MigrationJob } from '~db/prisma/dataMigrationRunner'
2+
import { type JobDef } from '~db/prisma/jobPreRun'
3+
4+
/** Define the job metadata here. */
5+
const jobDef: JobDef = {
6+
jobId: '2025-01-31_remove-twitter-from-SocialMediaServices',
7+
title: 'remove twitter from social media services',
8+
createdBy: 'Diana Garbarino',
9+
/** Optional: Longer description for the job */
10+
description: 'remove twitter from social media services',
11+
}
12+
/**
13+
* Job export - this variable MUST be UNIQUE
14+
*/
15+
export const job20250131_remove_twitter_from_social_media_services = {
16+
title: `[${jobDef.jobId}] ${jobDef.title}`,
17+
task: async (ctx, task) => {
18+
const { createLogger, formatMessage, jobPostRunner, prisma } = ctx
19+
/** Create logging instance */
20+
createLogger(task, jobDef.jobId)
21+
const log = (...args: Parameters<typeof formatMessage>) => (task.output = formatMessage(...args))
22+
23+
const update = await prisma.socialMediaService.update({
24+
where: { id: 'smsv_01GW2HHE8KK4BX2DXWGJ0187VJ' },
25+
data: { active: false },
26+
})
27+
28+
log(`set twitter active status to false`)
29+
30+
/**
31+
* DO NOT REMOVE BELOW
32+
*
33+
* This writes a record to the DB to register that this migration has run successfully.
34+
*/
35+
await jobPostRunner(jobDef)
36+
},
37+
def: jobDef,
38+
} satisfies MigrationJob
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import { type MigrationJob } from '~db/prisma/dataMigrationRunner'
2+
import { type JobDef } from '~db/prisma/jobPreRun'
3+
4+
/** Define the job metadata here. */
5+
const jobDef: JobDef = {
6+
jobId: '2025-02-01_update-org-socialmedia-website-published',
7+
title: 'Set published to false for Twitter/X URLs in OrgSocialMedia and OrgWebsite',
8+
createdBy: 'Diana Garbarino',
9+
description:
10+
'Find all orgs with URLs starting with http(s)://twitter.com/ or http(s)://x.com/ and set published to false.',
11+
}
12+
13+
/**
14+
* Job export - this variable MUST be UNIQUE
15+
*/
16+
export const job20250201_update_org_socialmedia_website_published = {
17+
title: `[${jobDef.jobId}] ${jobDef.title}`,
18+
task: async (ctx, task) => {
19+
const { createLogger, formatMessage, jobPostRunner, prisma } = ctx
20+
/** Create logging instance */
21+
createLogger(task, jobDef.jobId)
22+
const log = (...args: Parameters<typeof formatMessage>) => (task.output = formatMessage(...args))
23+
24+
// Define conditions for both http and https URLs
25+
const urlConditions = [
26+
{ url: { startsWith: 'https://twitter.com/' } },
27+
{ url: { startsWith: 'http://twitter.com/' } },
28+
{ url: { startsWith: 'https://x.com/' } },
29+
{ url: { startsWith: 'http://x.com/' } },
30+
]
31+
32+
// Update OrgSocialMedia table
33+
const socialMediaUpdate = await prisma.orgSocialMedia.updateMany({
34+
where: { OR: urlConditions },
35+
data: { published: false },
36+
})
37+
38+
// Update OrgWebsite table
39+
const websiteUpdate = await prisma.orgWebsite.updateMany({
40+
where: { OR: urlConditions },
41+
data: { published: false },
42+
})
43+
44+
log(`Updated ${socialMediaUpdate.count} records in OrgSocialMedia to set published = false.`)
45+
log(`Updated ${websiteUpdate.count} records in OrgWebsite to set published = false.`)
46+
47+
/**
48+
* DO NOT REMOVE BELOW
49+
*
50+
* This writes a record to the DB to register that this migration has run successfully.
51+
*/
52+
await jobPostRunner(jobDef)
53+
},
54+
def: jobDef,
55+
} satisfies MigrationJob

packages/db/prisma/data-migrations/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@ export * from './2025-01-15_update-food-tags'
1919
export * from './2025-01-29_update-nationwide-locationbased-alert'
2020
export * from './2025-01-29_update-parent-category-for-trans-you-health'
2121
export * from './2025-01-29_update-translation-key-for-trans-health-youth'
22+
export * from './2025-01-31_remove-twitter-from-orgWebsite-and-OrgSocialMedia'
23+
export * from './2025-01-31_remove-twitter-from-SocialMediaServices'
2224
// codegen:end

packages/ui/components/core/SocialLink.stories.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export const Group = {
3333
{ icon: 'instagram', href: '#' },
3434
{ icon: 'linkedin', href: '#' },
3535
{ icon: 'tiktok', href: '#' },
36-
{ icon: 'twitter', href: '#' },
3736
{ icon: 'youtube', href: '#' },
3837
{ icon: 'email', href: '#' },
3938
],

packages/ui/components/core/SocialLink.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export const socialMediaIcons = {
99
email: 'carbon:email',
1010
youtube: 'carbon:logo-youtube',
1111
github: 'carbon:logo-github',
12-
twitter: 'carbon:logo-twitter',
1312
linkedin: 'carbon:logo-linkedin',
1413
tiktok: 'simple-icons:tiktok',
1514
} as const

packages/ui/components/sections/Footer.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ export const Footer = () => {
161161
href='https://www.facebook.com/weareinreach'
162162
title={t('social.facebook', { defaultValue: 'Facebook' })}
163163
/>
164-
{/* <SocialLink icon='twitter' href='https://twitter.com/weareinreach' /> */}
165164
<SocialLink
166165
icon='linkedin'
167166
href='https://www.linkedin.com/company/weareinreach'

0 commit comments

Comments
 (0)