Skip to content

Commit da96bbe

Browse files
vikasrohityoution
andauthored
Feature/copilot feedback (#4408)
* fix: issue #4399 * Temp deployable feature branch * fix: issue #4399 Co-authored-by: yoution <[email protected]>
1 parent 433dcd5 commit da96bbe

File tree

8 files changed

+31
-3
lines changed

8 files changed

+31
-3
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ workflows:
188188
- build-dev
189189
filters: &filters-dev
190190
branches:
191-
only: ['dev', 'feature/billing_account_protection']
191+
only: ['dev', 'feature/copilot-feedback']
192192

193193
- deployTest01:
194194
context : org-global

config/constants/dev.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ module.exports = {
3232

3333
ACCOUNTS_APP_URL : 'https://accounts-auth0.topcoder-dev.com',
3434
ACCOUNTS_APP_CONNECTOR_URL : 'https://accounts-auth0.topcoder-dev.com',
35+
TYPEFORM_URL : 'https://topcoder.typeform.com/to/vgqiBXdk',
3536

3637
FILE_PICKER_API_KEY: process.env.FILE_PICKER_API_KEY_DEV,
3738
FILE_PICKER_SUBMISSION_CONTAINER_NAME: 'submission-staging-dev',

config/constants/master.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ module.exports = {
3333

3434
ACCOUNTS_APP_URL : 'https://accounts-auth0.topcoder.com',
3535
ACCOUNTS_APP_CONNECTOR_URL : 'https://accounts-auth0.topcoder.com',
36+
TYPEFORM_URL : 'https://topcoder.typeform.com/to/vgqiBXdk',
3637

3738
FILE_PICKER_API_KEY: process.env.FILE_PICKER_API_KEY_PROD,
3839
FILE_PICKER_SUBMISSION_CONTAINER_NAME: 'submission-staging-prod',

config/constants/qa.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ module.exports = {
3232

3333
ACCOUNTS_APP_URL : 'https://accounts.topcoder-qa.com/#!/member',
3434
ACCOUNTS_APP_CONNECTOR_URL : 'https://accounts.topcoder-qa.com/connector.html',
35+
TYPEFORM_URL : 'https://topcoder.typeform.com/to/vgqiBXdk',
3536

3637
FILE_PICKER_API_KEY: process.env.FILE_PICKER_API_KEY_QA,
3738
FILE_PICKER_SUBMISSION_CONTAINER_NAME: 'submission-staging-qa',

src/components/TeamManagement/MemberItem.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ require('moment-timezone')
55
import UserTooltip from '../User/UserTooltip'
66
import SunIcon from '../../assets/icons/daylight.svg'
77
import MoonIcon from '../../assets/icons/moon.svg'
8+
import FAQIcon from '../../assets/icons/faq.svg'
89
import { getFullNameWithFallback } from '../../helpers/tcHelpers'
910
import './MemberItem.scss'
1011

1112
const MemberItem = (props) => {
1213

13-
const {usr, showEmailOnly} = props
14+
const {usr, showEmailOnly, feedback} = props
1415

1516
const userFullName = getFullNameWithFallback(usr)
1617
const workingHourStart = _.get(usr, 'workingHourStart')
@@ -64,6 +65,7 @@ const MemberItem = (props) => {
6465
return (
6566
<div styleName="container">
6667
<UserTooltip {...props} localTimeInfo={localTimeInfoEl}/>
68+
{feedback && <span styleName="feed-back"> <a href={feedback} target="_blank"><FAQIcon/></a></span>}
6769
<div styleName="member-detail">
6870
<div styleName="member-name">{showEmailOnly? email :userFullName}</div>
6971
{localWhStart && localWhEnd && <div styleName="wk-hour">WH: {localWhStart} - {localWhEnd} {localTimeOffsetFormat}</div>}
@@ -84,6 +86,7 @@ MemberItem.propTypes = {
8486
PropTypes.number
8587
]).isRequired,
8688
previewAvatar: PropTypes.bool,
89+
feedback: PropTypes.string,
8790
showEmailOnly: PropTypes.bool,
8891
size: PropTypes.number
8992
}

src/components/TeamManagement/MemberItem.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
flex-direction: row;
66
min-height: 51px;
77
width: 100%;
8+
position: relative;
89

910
& + & {
1011
margin-top: 2 * $base-unit;
@@ -20,6 +21,20 @@
2021
}
2122
}
2223

24+
.feed-back {
25+
position: absolute;
26+
font-size: 12px;
27+
right: 0px;
28+
top: 4px;
29+
display: flex;
30+
align-items: center;
31+
32+
svg {
33+
width: 15px;
34+
margin-top: -2px;
35+
}
36+
}
37+
2338
.member-detail {
2439
margin-left: 2 * $base-unit;
2540
overflow: hidden;

src/components/TeamManagement/TeamManagement.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import MemberItem from './MemberItem'
99
import AddIcon from '../../assets/icons/icon-ui-bold-add.svg'
1010
import Dialog from './Dialog'
1111
import { PERMISSIONS } from '../../config/permissions'
12+
import { TYPEFORM_URL } from '../../config/constants'
1213
import {hasPermission} from '../../helpers/permissions'
1314
import { getFullNameWithFallback } from '../../helpers/tcHelpers'
1415

@@ -213,8 +214,13 @@ class TeamManagement extends React.Component {
213214
return null
214215
}
215216

217+
let feedback = ''
218+
if (member.handle !== currentUser.handle) {
219+
feedback = `${TYPEFORM_URL}#copilot=${member.handle}&projectid=${projectId}&submitter=${currentUser.handle}`
220+
}
221+
216222
return (
217-
<MemberItem usr={member} id={i} key={i} previewAvatar size={40}/>
223+
<MemberItem usr={member} id={i} key={i} previewAvatar size={40} feedback={feedback} />
218224
)
219225
})}
220226
{copilotTeamInvites.map((invite, i) => {

src/config/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,7 @@ export const TC_NOTIFICATION_URL = process.env.TC_NOTIFICATION_URL || `${TC_API_
764764

765765
export const TC_CDN_URL = process.env.TC_CDN_URL || `https://community-app.${DOMAIN}/api/cdn/public`
766766

767+
export const TYPEFORM_URL = process.env.TYPEFORM_URL || 'https://topcoder.typeform.com/to/vgqiBXdk'
767768
export const RESET_PASSWORD_URL = `https://accounts.${DOMAIN}/member/reset-password`
768769
export const VERIFY_EMAIL_URL = `http://www.${DOMAIN}/settings/account/changeEmail`
769770
export const TOPCODER_CONNECT_TERMS_URL = `https://connect.${DOMAIN}/terms`

0 commit comments

Comments
 (0)