Skip to content

Commit

Permalink
Merge pull request #2192 from thematters/develop
Browse files Browse the repository at this point in the history
Release: v3.29.0
  • Loading branch information
robertu7 authored Aug 19, 2021
2 parents 04d20e4 + cf2a8d1 commit cf3cb5f
Show file tree
Hide file tree
Showing 65 changed files with 4,773 additions and 2,216 deletions.
4,710 changes: 2,571 additions & 2,139 deletions package-lock.json

Large diffs are not rendered by default.

79 changes: 45 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "matters-web",
"version": "3.28.0",
"version": "3.29.0",
"description": "codebase of Matters' website",
"sideEffects": false,
"author": "Matters <[email protected]>",
Expand Down Expand Up @@ -40,12 +40,12 @@
"@apollo/react-ssr": "^3.1.3",
"@matters/apollo-upload-client": "^11.1.0",
"@matters/matters-editor": "^0.1.22",
"@reach/alert": "^0.15.2",
"@reach/dialog": "^0.15.2",
"@reach/visually-hidden": "^0.15.2",
"@sentry/browser": "^6.8.0",
"@reach/alert": "^0.16.0",
"@reach/dialog": "^0.16.0",
"@reach/visually-hidden": "^0.16.0",
"@sentry/browser": "^6.11.0",
"@stripe/react-stripe-js": "^1.4.1",
"@stripe/stripe-js": "^1.15.1",
"@stripe/stripe-js": "^1.17.0",
"@tippyjs/react": "^4.2.5",
"apollo-cache-inmemory": "^1.6.6",
"apollo-cache-persist": "^0.1.1",
Expand All @@ -58,7 +58,17 @@
"apollo-utilities": "^1.3.4",
"autosize": "^5.0.1",
"classnames": "^2.3.1",
"date-fns": "^2.22.1",
"d3-array": "^2.12.1",
"d3-axis": "^2.1.0",
"d3-ease": "^2.0.0",
"d3-format": "^2.0.0",
"d3-interpolate": "^2.0.1",
"d3-scale": "^2.2.2",
"d3-selection": "^2.0.0",
"d3-shape": "^2.1.0",
"d3-time-format": "^2.3.0",
"d3-transition": "^2.0.0",
"date-fns": "^2.23.0",
"embla-carousel": "^4.5.3",
"express": "^4.17.1",
"fastest-levenshtein": "^1.0.12",
Expand All @@ -83,7 +93,7 @@
"react-dom": "^17.0.2",
"react-focus-lock": "^2.5.2",
"react-remove-scroll": "^2.4.3",
"react-spring": "^9.2.3",
"react-spring": "^9.2.4",
"react-use-gesture": "^9.1.3",
"react-virtualized": "^9.22.3",
"react-waypoint": "^10.1.0",
Expand All @@ -94,51 +104,52 @@
"devDependencies": {
"@apollo/react-testing": "^3.1.3",
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
"@next/bundle-analyzer": "^11.0.1",
"@storybook/addon-a11y": "^6.3.2",
"@storybook/addon-actions": "^6.3.2",
"@storybook/addon-essentials": "^6.3.2",
"@storybook/addon-links": "^6.3.2",
"@storybook/react": "^6.3.2",
"@next/bundle-analyzer": "^11.1.0",
"@storybook/addon-a11y": "^6.3.7",
"@storybook/addon-actions": "^6.3.7",
"@storybook/addon-essentials": "^6.3.7",
"@storybook/addon-links": "^6.3.7",
"@storybook/react": "^6.3.7",
"@svgr/webpack": "^5.5.0",
"@testing-library/react": "^11.2.6",
"@types/autosize": "^4.0.0",
"@types/classnames": "^2.3.1",
"@types/d3": "^7.0.0",
"@types/express": "^4.17.9",
"@types/fingerprintjs2": "^2.0.0",
"@types/grecaptcha": "^3.0.2",
"@types/grecaptcha": "^3.0.3",
"@types/jest": "^26.0.23",
"@types/jump.js": "^1.0.3",
"@types/lodash": "^4.14.170",
"@types/jump.js": "^1.0.4",
"@types/lodash": "^4.14.172",
"@types/nprogress": "0.2.0",
"@types/pulltorefreshjs": "^0.1.4",
"@types/react": "^17.0.11",
"@types/react-beautiful-dnd": "^13.1.0",
"@types/react-copy-to-clipboard": "^5.0.0",
"@types/react-dom": "^17.0.8",
"@types/react-responsive": "^8.0.2",
"@types/react-virtualized": "^9.21.11",
"@types/segment-analytics": "0.0.33",
"@types/pulltorefreshjs": "^0.1.5",
"@types/react": "^17.0.18",
"@types/react-beautiful-dnd": "^13.1.1",
"@types/react-copy-to-clipboard": "^5.0.1",
"@types/react-dom": "^17.0.9",
"@types/react-responsive": "^8.0.3",
"@types/react-virtualized": "^9.21.13",
"@types/segment-analytics": "0.0.34",
"@types/styled-jsx": "^2.2.9",
"@types/validator": "^13.6.2",
"@types/validator": "^13.6.3",
"apollo": "^2.32.5",
"babel-jest": "^26.6.3",
"babel-loader": "^8.2.2",
"babel-plugin-dynamic-import-node": "^2.3.3",
"babel-polyfill": "^6.26.0",
"chromedriver": "^91.0.1",
"core-js": "^3.15.2",
"chromedriver": "^92.0.1",
"core-js": "^3.16.1",
"cucumber": "^6.0.5",
"cucumber-pretty": "^6.0.0",
"cz-conventional-changelog": "^3.3.0",
"file-loader": "^6.2.0",
"geckodriver": "^2.0.1",
"husky": "^7.0.0",
"geckodriver": "^2.0.2",
"husky": "^7.0.1",
"identity-obj-proxy": "^3.0.0",
"jest": "^27.0.5",
"jest": "^27.0.6",
"next-compose-plugins": "^2.2.1",
"next-offline": "^5.0.5",
"nightwatch": "^1.7.7",
"nightwatch": "^1.7.8",
"nightwatch-api": "^3.0.2",
"node-fetch": "^2.6.1",
"postcss-calc": "^7.0.5",
Expand All @@ -150,11 +161,11 @@
"styled-jsx-plugin-postcss": "^4.0.1",
"stylelint": "^13.13.1",
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-recess-order": "^2.4.0",
"stylelint-config-recess-order": "^2.5.0",
"stylelint-config-standard": "^22.0.0",
"stylelint-prettier": "^1.2.0",
"ts-jest": "^26.5.5",
"ts-node": "^10.0.0",
"ts-node": "^10.2.0",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0",
"tslint-react": "^5.0.0",
Expand Down
3 changes: 3 additions & 0 deletions public/static/icons/12px/analytics-change-arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 10 additions & 3 deletions public/static/icons/16px/read.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/static/icons/24px/analytics-content.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/static/icons/24px/analytics-follower.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions public/static/icons/24px/analytics-income.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions public/static/icons/24px/analytics-subscriber.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions public/static/icons/24px/analytics.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/common/enums/chart.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const CHART_COLOR = {
green: { area: '#E1F9F8', line: '#9AE5E2' },
yellow: { area: '#FEEECA', line: '#F1BA4C' },
red: { area: '#FED3CA', line: '#F1836C' },
blue: { area: '#D2E0F4', line: '#A2BFE8' },
}
1 change: 1 addition & 0 deletions src/common/enums/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export * from './storage'
export * from './payment'
export * from './url'
export * from './csp'
export * from './chart'

export const Z_INDEX = {
GLOBAL_HEADER: 100,
Expand Down
3 changes: 3 additions & 0 deletions src/common/enums/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const TEXT = {
changePassword: '修改密碼',
changeUserName: '修改 Matters ID',
CIRCLE_NOT_FOUND: '圍爐不存在',
circleAnalytics: '數據後台',
circleBroadcast: '廣播',
circleCreated: '圍爐創建成功',
circleCreation: '創建圍爐',
Expand Down Expand Up @@ -374,6 +375,7 @@ export const TEXT = {
changePassword: '修改密码',
changeUserName: '修改 Matters ID',
CIRCLE_NOT_FOUND: '围炉不存在',
circleAnalytics: '数据后台',
circleBroadcast: '广播',
circleCreated: '围炉创建成功',
circleCreation: '创建围炉',
Expand Down Expand Up @@ -702,6 +704,7 @@ export const TEXT = {
changePassword: 'Change Password',
changeUserName: 'Change Matters ID',
CIRCLE_NOT_FOUND: 'Circle not found',
circleAnalytics: 'Analytics',
circleBroadcast: 'Broadcast',
circleCreated: 'Cricle created',
circleCreation: 'Create Circle',
Expand Down
2 changes: 2 additions & 0 deletions src/common/styles/variables/colors.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
--color-grey-lighter: #f7f7f7;
--color-white: #fff;
--color-red: #c85c41;
--color-red-lighter: #fae7e3;
--color-green-lighter: #f2faf7;
--color-yellow-lighter: #faf7f0;
--color-likecoin-green: #40bfa5;
--color-analytics-red: #c25050;

/* hover */
--color-matters-gold-active: color(var(--color-matters-gold) shade(5%));
Expand Down
38 changes: 38 additions & 0 deletions src/common/styles/vendors/tippy.css
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,44 @@
box-shadow: var(--shadow-dark);
}

/* theme:tooltip:chart */
.tippy-box[data-theme='tooltip:chart'] {
padding: var(--spacing-xx-tight);
font-size: var(--font-size-xs);
font-weight: var(--font-weight-medium);
line-height: 1rem;
color: var(--color-white);
text-align: left;
background: var(--color-grey-darker);
border-radius: var(--spacing-xx-tight);

& > .tippy-arrow {
color: var(--color-grey-darker);
}

&[data-placement^='top'] > .tippy-arrow::before {
bottom: -5px;
left: 2px;
border-width: 6px 6px 0;
}

&[data-placement^='bottom'] > .tippy-arrow::before {
top: -5px;
left: 2px;
border-width: 0 6px 6px;
}

&[data-placement^='left'] > .tippy-arrow::before {
right: -5px;
border-width: 6px 0 6px 6px;
}

&[data-placement^='right'] > .tippy-arrow::before {
left: -5px;
border-width: 6px 6px 6px 0;
}
}

/* shadow */
.tippy-box {
&[data-theme='shadow-light'] {
Expand Down
2 changes: 1 addition & 1 deletion src/common/utils/payment.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { numRound } from './number'

// https://stackoverflow.com/a/14428340/3786947
export const toAmountString = (
export const formatAmount = (
num: number,
decPlaces: number = 2,
sections: number = 3
Expand Down
6 changes: 6 additions & 0 deletions src/common/utils/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ type ToPathArgs =
| 'circleDiscussion'
| 'circleBroadcast'
| 'circleSettings'
| 'circleAnalytics'
| 'circleEditProfile'
| 'circleManageInvitation'
circle: CircleArgs
Expand Down Expand Up @@ -101,6 +102,11 @@ export const toPath = (args: ToPathArgs): { href: string } => {
href: `/~${args.circle.name}/settings`,
}
}
case 'circleAnalytics': {
return {
href: `/~${args.circle.name}/analytics`,
}
}
case 'circleEditProfile': {
return {
href: `/~${args.circle.name}/settings/edit-profile`,
Expand Down
Loading

0 comments on commit cf3cb5f

Please sign in to comment.