Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create feedback form for trials #2869

Merged
merged 1 commit into from Nov 19, 2019
Merged

Conversation

victoria34
Copy link
Contributor

<span className={styles.statusBackground}>{trial.status}</span>
</a>
<span className={styles.feedback}>
<button className={"btn btn-default btn-sm btn-xs " + styles.feedbackButton} onClick={() => this.showTrialFeedback=true}>Feedback</button>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use a Button component from react-bootstrap

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to Button component

<div className={styles.statusButton}>
<a target="_blank" href={"https://www.mskcc.org/cancer-care/clinical-trials/" + trial.protocolNo}><span className={styles.statusBackground}>{trial.status}</span></a>
<div className={styles.statusContainer}>
<a target="_blank" href={"https://www.mskcc.org/cancer-care/clinical-trials/" + trial.protocolNo}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just use Button from react-bootstrap, and variant="link"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some css styles cannot apply for the Button component. Also, this is a link not a button. I don't want to mix them together.

@@ -306,6 +327,13 @@ export default class TrialMatchTable extends React.Component<ITrialMatchProps> {
render() {
return (
<div>
<p style={{marginBottom: '0'}}>Curated genomic and clinical criteria from open clinical trials at Memorial Sloan Kettering. Please <a href="mailto:team@oncokb.org">contact us</a> or submit <a onClick={() => this.showGeneralFeedback=true}>feedback form</a> if you have any questions.</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised that changing showGeneralFeedback on the click event would actually work in mobx observable. @alisman what's the situation that a @autobind has to be attached?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will work. if you pass it a function directly (not an anonymous callback) then it has to be bound with autobind. Using an anonymous callback is discouraged b/c it causes virtual dom to be differed each time. But in this case, it's totally negligible and not worth changing. So, rule of thumb is, if something is going to be rendered a lot and occurs many times in DOM, then use a bound handler. If not, do the above.

Copy link
Member

@zhx828 zhx828 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Only few minor comments

@victoria34 victoria34 force-pushed the google-form branch 4 times, most recently from 6e3b0c5 to 96e4996 Compare November 19, 2019 15:58
@victoria34 victoria34 merged commit 18a8efd into cBioPortal:master Nov 19, 2019
@inodb inodb added the external api This PR is related to handling an external API label Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external api This PR is related to handling an external API
Projects
None yet
4 participants