Skip to content

Commit 3e38b26

Browse files
authored
Merge pull request #1271 from topcoder-platform/feat/v6
Feat/v6 -> dev
2 parents b45a19f + a2c3252 commit 3e38b26

File tree

568 files changed

+53100
-7301
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

568 files changed

+53100
-7301
lines changed

.circleci/config.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ install_dependency: &install_dependency
2626
install_deploysuite: &install_deploysuite
2727
name: Installation of install_deploysuite.
2828
command: |
29-
git clone --branch v1.4.13 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
29+
git clone --branch v1.4.17 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
3030
cp ./../buildscript/master_deploy.sh .
3131
cp ./../buildscript/buildenv.sh .
3232
cp ./../buildscript/awsconfiguration.sh .
33+
cp ./../buildscript/psvar-processor.sh .
3334
3435
restore_cache_settings_for_build: &restore_cache_settings_for_build
3536
key: connect-node-modules-{{ checksum "yarn.lock" }}
@@ -48,14 +49,16 @@ running_yarn_eslint: &running_yarn_eslint
4849
running_yarn_build: &running_yarn_build
4950
name: Running Yarn Build
5051
command: |
51-
source buildenvvar
52+
# source buildenvvar
53+
source buildvar_env
5254
yarn install
5355
yarn build
5456
5557
running_yarn_sb_build: &running_yarn_sb_build
5658
name: Running Yarn Storybook Build
5759
command: |
58-
source buildenvvar
60+
# source buildenvvar
61+
source buildvar_env
5962
yarn sb:build
6063
6164
workspace_persist: &workspace_persist
@@ -70,7 +73,9 @@ build_configuration_fetch: &build_configuration_fetch
7073
name: "configuring environment"
7174
command: |
7275
./awsconfiguration.sh $DEPLOY_ENV
73-
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-buildvar
76+
# ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-buildvar
77+
./psvar-processor.sh -t appenv -p /config/${APPNAME}/buildvar
78+
source buildvar_env
7479
aws s3 cp s3://tc-platform-${LOGICAL_ENV}/securitymanager/${LOGICAL_ENV}-platform-ui.env ./.environments/.env.${LOGICAL_ENV}.local
7580
7681
lint_steps: &lint_steps # Initialization.
@@ -98,8 +103,10 @@ deploy_steps: &deploy_steps
98103
command: |
99104
./awsconfiguration.sh $DEPLOY_ENV
100105
source awsenvconf
101-
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar
102-
source buildenvvar
106+
# ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar
107+
# source buildenvvar
108+
./psvar-processor.sh -t appenv -p /config/${APPNAME}/deployvar
109+
source deployvar_env
103110
./master_deploy.sh -d CFRONT -e $DEPLOY_ENV -c $ENABLE_CACHE
104111
105112
jobs:
@@ -221,9 +228,10 @@ workflows:
221228
- dev
222229
- LVT-256
223230
- CORE-635
231+
- feat/review
224232
- feat/system-admin
225-
- pm-1365_1
226-
- PM-959_tc-finance-integration
233+
- feat/v6
234+
- pm-2074_1
227235

228236
- deployQa:
229237
context: org-global
@@ -242,4 +250,4 @@ workflows:
242250
filters: &filters-prod
243251
branches:
244252
only:
245-
- master
253+
- master

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
node_modules
55
/.pnp
66
.pnp.js
7+
.yarn
78

89
# testing
910
/coverage

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"build": "rimraf ./build && export CI=false && craco build --mode ${LOGICAL_ENV:-prod}",
1010
"build:dev": "craco build --mode ${LOGICAL_ENV:-dev}",
1111
"demo": "npx http-server --port 443 -a 0.0.0.0 -S -C ./ssl/rootCA.crt -K ./ssl/rootCA.key -P https://local.topcoder-dev.com? --proxy-options.secure false ./build",
12-
"lint": "eslint -c ./src/.eslintrc.js 'src/**/*.{ts,tsx,js,jsx}'",
12+
"lint": "eslint --quiet -c ./src/.eslintrc.js 'src/**/*.{ts,tsx,js,jsx}'",
1313
"lint:fix": "yarn lint --fix",
1414
"test": "craco test --watchAll",
1515
"test:no-watch": "craco test --watchAll=false --passWithNoTests",
@@ -20,6 +20,7 @@
2020
},
2121
"dependencies": {
2222
"@datadog/browser-logs": "^4.21.2",
23+
"@hello-pangea/dnd": "^18.0.1",
2324
"@heroicons/react": "^1.0.6",
2425
"@hookform/resolvers": "^4.1.2",
2526
"@popperjs/core": "^2.11.8",
@@ -50,6 +51,7 @@
5051
"express": "^4.21.2",
5152
"express-fileupload": "^1.4.0",
5253
"express-interceptor": "^1.2.0",
54+
"filestack-js": "^3.42.0",
5355
"highcharts": "^10.3.3",
5456
"highcharts-react-official": "^3.2.0",
5557
"highlight.js": "^11.6.0",
@@ -96,9 +98,12 @@
9698
"redux-promise": "^0.6.0",
9799
"redux-promise-middleware": "^6.1.3",
98100
"redux-thunk": "^2.4.1",
101+
"rehype-raw": "^7.0.0",
102+
"rehype-stringify": "^10.0.1",
99103
"remark-breaks": "^3.0.2",
100104
"remark-frontmatter": "^4.0.1",
101105
"remark-gfm": "^3.0.1",
106+
"remark-parse": "^11.0.0",
102107
"remove": "^0.1.5",
103108
"sanitize-html": "^2.12.1",
104109
"sass": "^1.79.0",

src/.eslintrc.js

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
const path = require('path');
2+
3+
const tsconfigPath = path.resolve(__dirname, '../tsconfig.json');
4+
const tsconfigRoot = path.resolve(__dirname, '..');
5+
16
module.exports = {
27
root: true,
38
overrides: [
@@ -25,8 +30,8 @@ module.exports = {
2530
parser: '@typescript-eslint/parser',
2631
parserOptions: {
2732
useJSXTextNode: true,
28-
project: './tsconfig.json',
29-
tsconfigRootDir: '.',
33+
project: tsconfigPath,
34+
tsconfigRootDir: tsconfigRoot,
3035
tsx: true,
3136
jsx: true,
3237
sourceType: 'module',
@@ -40,7 +45,19 @@ module.exports = {
4045
],
4146
settings: {
4247
'import/resolver': {
43-
typescript: {},
48+
typescript: {
49+
project: tsconfigPath,
50+
},
51+
node: {
52+
extensions: [
53+
'.js',
54+
'.jsx',
55+
'.ts',
56+
'.tsx',
57+
'.d.ts',
58+
'.json',
59+
],
60+
},
4461
},
4562
},
4663
rules: {
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
import { EnvironmentConfig } from '~/config'
1+
// (removed) CES Survey/Userflow integrations
22

3-
export const CES_SURVEY_ID = EnvironmentConfig.USERFLOW_SURVEYS.ACCOUNT_SETTINGS
3+
// Mark this file as a module for TS isolatedModules
4+
export {}

src/apps/accounts/src/lib/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
export * from './accounts-swr'
22
export * from './components'
33
export * from './assets'
4-
export * from './userflow-survey'

src/apps/accounts/src/lib/userflow-survey.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/apps/accounts/src/settings/tabs/account/account-role/AccountRole.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Dispatch, FC, SetStateAction, useState } from 'react'
22

33
import { BaseModal, Button, Collapsible } from '~/libs/ui'
44
import { authUrlLogout, updatePrimaryMemberRoleAsync, UserProfile } from '~/libs/core'
5-
import { triggerSurvey } from '~/apps/accounts/src/lib'
65

76
import styles from './AccountRole.module.scss'
87

@@ -36,7 +35,6 @@ const AccountRole: FC<AccountRoleProps> = (props: AccountRoleProps) => {
3635
.then(() => {
3736
setMemberRole(newRole)
3837
setIsRoleChangeConfirmed(true)
39-
triggerSurvey()
4038
})
4139
.finally(() => {
4240
setIsUpdating(false)

src/apps/accounts/src/settings/tabs/account/address/MemberAddress.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
useCountryLookup,
1414
UserProfile,
1515
} from '~/libs/core'
16-
import { triggerSurvey } from '~/apps/accounts/src/lib'
1716

1817
import styles from './MemberAddress.module.scss'
1918

@@ -88,7 +87,6 @@ const MemberAddress: FC<MemberAddressProps> = (props: MemberAddressProps) => {
8887
.then(() => {
8988
toast.success('Your account has been updated.', { position: toast.POSITION.BOTTOM_RIGHT })
9089
setFormErrors({})
91-
triggerSurvey()
9290
})
9391
.catch(() => {
9492
toast.error('Something went wrong. Please try again.', { position: toast.POSITION.BOTTOM_RIGHT })

src/apps/accounts/src/settings/tabs/account/user-and-pass/UserAndPassword.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ import {
1515
useMemberTraits,
1616
UserProfile,
1717
UserTrait,
18+
UserTraitIds,
1819
UserTraits,
1920
} from '~/libs/core'
20-
import { SettingSection, triggerSurvey } from '~/apps/accounts/src/lib'
21+
import { SettingSection } from '~/apps/accounts/src/lib'
2122

2223
import { UserAndPassFromConfig } from './user-and-pass.form.config'
2324
import styles from './UserAndPassword.module.scss'
@@ -76,13 +77,13 @@ const UserAndPassword: FC<UserAndPasswordProps> = (props: UserAndPasswordProps)
7677
data: [{
7778
userConsent: !userConsent,
7879
}],
80+
traitId: UserTraitIds.personalization,
7981
},
8082
}])
8183
.then(() => {
8284
setUserConsent(!userConsent)
8385
mutateTraits()
8486
toast.success('User consent updated successfully.')
85-
triggerSurvey()
8687
})
8788
.catch(() => {
8889
toast.error('Failed to update user consent.')

0 commit comments

Comments
 (0)