Skip to content

Commit

Permalink
Merge pull request #4138 from thematters/develop
Browse files Browse the repository at this point in the history
Release: v4.28.7
  • Loading branch information
robertu7 authored Jan 16, 2024
2 parents f0daadd + 084491d commit e64ef6c
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .env.prod
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ NEXT_PUBLIC_CLOUDFLARE_TURNSTILE_SITE_KEY=0x4AAAAAAAKVODkJMwfIxG78
DEBUG=false
NEXT_PUBLIC_GOOGLE_CLIENT_ID=751677068109-rkml7q9ujf8ems09cclh7qckf14svcgs.apps.googleusercontent.com
NEXT_PUBLIC_TWITTER_CLIENT_ID=cmdKbUlyd1ZZZDZYa3dTampidGo6MTpjaQ
NEXT_PUBLIC_FACEBOOK_CLIENT_ID=161556310354354
NEXT_PUBLIC_FACEBOOK_CLIENT_ID=687698420193159
NEXT_PUBLIC_NOMAD_MATTERS_CAMPAIGN_LINK_EN=/@hi176/476405-a-guide-to-invite
NEXT_PUBLIC_NOMAD_MATTERS_CAMPAIGN_LINK=/@hi176/476404
NEXT_PUBLIC_NOMAD_MATTERS_CAMPAIGN_LINK=/@hi176/476404
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
uses: actions/checkout@master

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '16.14'
node-version: '18'
cache: 'npm'

- name: Install Dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
uses: actions/checkout@master

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '16.14'
node-version: '18'
cache: 'npm'

- name: Install Dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
uses: actions/checkout@master

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '16.14'
node-version: '18'
cache: 'npm'

- name: Install Dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
uses: actions/checkout@master

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '16.14'
node-version: '18'
cache: 'npm'

- name: Install Dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
uses: actions/checkout@master

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '16.14'
node-version: '18'
cache: 'npm'

- name: Install Dependencies
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "codebase of Matters' website",
"author": "Matters <[email protected]>",
"engines": {
"node": ">=16.14 <17.0"
"node": ">=16.14 <19.0"
},
"license": "Apache-2.0",
"sideEffects": false,
Expand Down
1 change: 0 additions & 1 deletion src/views/ArticleDetail/Content/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ Content.fragments = {
id
contents {
html
markdown
}
}
`,
Expand Down
18 changes: 11 additions & 7 deletions src/views/ArticleDetail/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { useLazyQuery, useQuery } from '@apollo/react-hooks'
import { md2html } from '@matters/matters-editor'
import formatISO from 'date-fns/formatISO'
import dynamic from 'next/dynamic'
import { useContext, useEffect, useState } from 'react'
import { Waypoint } from 'react-waypoint'

import { URL_QS } from '~/common/enums'
import { REFERRAL_QUERY_REFERRAL_KEY, URL_QS } from '~/common/enums'
import { normalizeTag, toGlobalId, toPath } from '~/common/utils'
import {
BackToHomeButton,
Expand Down Expand Up @@ -222,11 +221,7 @@ const BaseArticleDetail = ({
const title = translated && translatedTitle ? translatedTitle : article.title
const summary =
translated && translatedSummary ? translatedSummary : article.summary
const isEnableMd = !!getQuery('md') // feature flag
const originalContent =
isEnableMd && article.contents.markdown
? md2html(article.contents.markdown)
: article.contents.html
const originalContent = article.contents.html
const content =
translated && translatedContent ? translatedContent : originalContent
const keywords = (article.tags || []).map(({ content: c }) => normalizeTag(c))
Expand Down Expand Up @@ -489,6 +484,15 @@ const ArticleDetail = ({
`https://${process.env.NEXT_PUBLIC_SITE_DOMAIN}${newPath.href}`
)

// TODO: can remove this after 2024/2
const isNomadTags = article.tags?.some(
(tag) => tag.content === 'nomadmatters' || tag.content === '遊牧者計畫'
)
const hasReferral = u.searchParams.has(REFERRAL_QUERY_REFERRAL_KEY)
if (!hasReferral && isNomadTags && viewer.userName) {
u.searchParams.append(REFERRAL_QUERY_REFERRAL_KEY, viewer.userName)
}

// hide all utm_ tracking code parameters
// copy all others
const rems = [
Expand Down
2 changes: 2 additions & 0 deletions src/views/Home/Announcements/Carousel/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@

& img {
@mixin object-fit-cover;

object-position: right bottom;
}

& picture,
Expand Down

0 comments on commit e64ef6c

Please sign in to comment.