-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'staging' into sub-display
- Loading branch information
Showing
20 changed files
with
586 additions
and
158 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import React, { useEffect, useState } from 'react'; | ||
import { useHistory } from 'react-router-dom'; | ||
import { | ||
Button, Row, Icon | ||
} from '@d4sd/components'; | ||
import './style.less'; | ||
|
||
interface PrelimFinishCardIF { | ||
setSubmitStep(step: string): void; | ||
} | ||
|
||
const CopyURL = (props: {link: string}): JSX.Element => { | ||
// eslint-disable-next-line | ||
// eslint-disable-next-line | ||
const [linkToFeedback, setLinkToFeedback] = useState(props.link); | ||
/* eslint-disable */ | ||
const setURL = (): void => { | ||
const inputField = document.getElementById('copyLink'); | ||
// @ts-ignore | ||
inputField.value = linkToFeedback; | ||
}; | ||
|
||
const copyURL = (): void => { | ||
const copyText = document.getElementById('copyLink'); | ||
// @ts-ignore | ||
copyText.select(); | ||
// @ts-ignore | ||
copyText.setSelectionRange(0, 99999); | ||
document.execCommand('copy'); | ||
}; | ||
/* eslint-enable */ | ||
|
||
useEffect(() => { | ||
setURL(); | ||
// eslint-disable-next-line | ||
}, []); | ||
const history = useHistory(); | ||
// call setLinkToFeedback("NEW LINK") and setURL() to update links. | ||
|
||
return ( | ||
<div className="Copy-Container"> | ||
<input className="copy-link" id="copyLink" /> | ||
<Button | ||
className="copy-btn" type="primary-outline" size="small" | ||
onClick={(): void => { copyURL(); }} | ||
> | ||
COPY URL | ||
</Button> | ||
</div> | ||
); | ||
}; | ||
export default CopyURL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
@import '../../styles/vars.less'; | ||
@import '../../styles/mixins.less'; | ||
.Copy-Container { | ||
display: flex; | ||
width: 600px; | ||
max-width: 90%; | ||
margin: auto; | ||
.copy-link { | ||
display: inline-block; | ||
vertical-align: middle; | ||
border: 2px solid @b3; | ||
border-radius: 10px 0px 0px 10px; | ||
border-right-width: 0px; | ||
line-height: 50px; | ||
font-size: 14px; | ||
height: 50px; | ||
height: 50px; | ||
padding: 0 18px; | ||
flex-grow: 1; | ||
span { | ||
top: -1px; | ||
position: relative; | ||
} | ||
} | ||
.d4sdbutton { | ||
display: inline; | ||
// width: auto; | ||
vertical-align: middle; | ||
border-radius: 0px 10px 10px 0px; | ||
} | ||
} |
67 changes: 67 additions & 0 deletions
67
src/components/layouts/community-feedback-layout/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import React, { useState } from 'react'; | ||
import { | ||
Row, Steps, Header, FeedbackActionCard | ||
} from '@d4sd/components'; | ||
import Menubar from '../../menubar/index'; | ||
import CopyURL from '../../copy-url'; | ||
import './style.less'; | ||
import FeedbackCard from '../../preliminarysubmission-cards/feedback'; | ||
|
||
const { Step } = Steps; | ||
|
||
const cardJson = { | ||
cards: [ | ||
{ | ||
name: 'Jane Doe', | ||
dateBack: new Date('1988-03-21'), | ||
feedbacklink: 'http://google.com/' | ||
}, | ||
{ | ||
name: 'Jane Doe', | ||
dateBack: new Date('1988-03-21'), | ||
feedbacklink: 'http://google.com/' | ||
} | ||
] | ||
}; | ||
|
||
const CommunityFeedbackLayout = (): JSX.Element => { | ||
const [linkToFeedback, setLinkToFeedback] = useState('LINK TO FEEDBACK'); | ||
// signupStep | ||
return ( | ||
<div> | ||
<Menubar /> | ||
<div className="CommunityFeedbackLayout"> | ||
<Header | ||
title="Community Feedback" | ||
back="Back to workspace" | ||
handleBackClick={undefined} | ||
/> | ||
|
||
<div className="content"> | ||
<Row className="row"> | ||
<p> | ||
Share the link below to more people to if you want to get more | ||
feedback: | ||
</p> | ||
</Row> | ||
<Row className="row"> | ||
<CopyURL link={linkToFeedback} /> | ||
</Row> | ||
<Row className="row"> | ||
<p> | ||
Click each card to view feedback on your project. This feedback | ||
could be from the D4SD community network, or from your friends and | ||
colleagues. Please provide a rating on each point of feedback so | ||
that we can improve the system. | ||
</p> | ||
</Row> | ||
</div> | ||
<div className="feedback"> | ||
{ cardJson.cards.map((data) => <FeedbackActionCard card={data} />)} | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default CommunityFeedbackLayout; |
20 changes: 20 additions & 0 deletions
20
src/components/layouts/community-feedback-layout/style.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
@import '../../../styles/vars.less'; | ||
@import '../../../styles/mixins.less'; | ||
.CommunityFeedbackLayout { | ||
margin-top: @tab-height; | ||
overflow: hidden; | ||
|
||
.feedback { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
margin-bottom: 5vh; | ||
} | ||
|
||
.content { | ||
padding: @margin-base-1 @margin-base*6; | ||
.row { | ||
margin-top: @margin-base * 2; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
.section { | ||
.spon { | ||
margin-bottom: 5vh; | ||
} | ||
h4 { | ||
color: #4497ff; | ||
font-weight: 650; | ||
|
Oops, something went wrong.