diff --git a/source/components/Feedback/Feedback.css b/source/components/Feedback/Feedback.css index eb9bf2fad..e379e7d8c 100644 --- a/source/components/Feedback/Feedback.css +++ b/source/components/Feedback/Feedback.css @@ -1,8 +1,23 @@ .feedback-page { - align-items: flex-start; display: flex; - align-items: flex-end; - justify-content: space-between; + justify-content: flex-end; padding-top: 0.6rem; padding-bottom: 0.6rem; + background: var(--lighterColour); + border-radius: 0.9rem; + padding: 0.6em 1em; +} +.feedback-page.stickToFooter { + margin-bottom: 0; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} +.feedback-page button.link-button { + margin: 0 0.6em; +} + +@media (min-width: 1200px) { + .feedback-page .feedbackButtons { + display: inline; + } } diff --git a/source/components/Feedback/FeedbackForm.js b/source/components/Feedback/FeedbackForm.js index 71062185d..cfdc076b8 100644 --- a/source/components/Feedback/FeedbackForm.js +++ b/source/components/Feedback/FeedbackForm.js @@ -6,7 +6,7 @@ import React, { Component } from 'react' import { Trans } from 'react-i18next' import type { Tracker } from 'Components/utils/withTracker' -type Props = { onEnd: () => void, tracker: Tracker } +type Props = { onEnd: () => void, tracker: Tracker, onCancel: () => void } class FeedbackForm extends Component { formRef: ?HTMLFormElement @@ -23,9 +23,6 @@ class FeedbackForm extends Component { // $FlowFixMe body: new FormData(this.formRef) }) - this.handleClose() - } - handleClose = () => { this.props.onEnd() } @@ -34,7 +31,7 @@ class FeedbackForm extends Component {
{' '} - +
+
+ {!this.state.showForm && !this.state.showThanks && ( + <> +
+ {this.props.customMessage || ( + + Cette page vous est utile ? + + )}{' '} +
+ {' '} + + +
-
- {' '} - - )} - {this.state.showThanks && ( -
- - Merci pour votre retour ! Vous pouvez nous contacter directement - à{' '} - - contact@embauche.beta.gouv.fr - - -
- )} - {this.state.showForm && ( -
this.setState({ showThanks: true, showForm: false })} - /> - )} +
+ )} + {this.state.showForm && ( + + this.setState({ showThanks: false, showForm: false }) + } + onCancel={() => + this.setState({ showThanks: false, showForm: false }) + } + /> + )} +
) ) diff --git a/source/components/QuickLinks.js b/source/components/QuickLinks.js index 72d2fcbad..021fd2986 100644 --- a/source/components/QuickLinks.js +++ b/source/components/QuickLinks.js @@ -7,7 +7,6 @@ import { Trans } from 'react-i18next' import { connect } from 'react-redux' import { withRouter } from 'react-router' import { animated, Spring } from 'react-spring' -import { noUserInputSelector } from 'Selectors/analyseSelectors' import type { Location } from 'react-router' type OwnProps = { @@ -16,17 +15,10 @@ type OwnProps = { type Props = OwnProps & { startConversation: (?string) => void, location: Location, - userInput: boolean, - conversationStarted: boolean + show: boolean } -const QuickLinks = ({ - startConversation, - userInput, - quickLinks, - conversationStarted -}: Props) => { - const show = userInput && !conversationStarted +const QuickLinks = ({ startConversation, show, quickLinks }: Props) => { return ( {toPairs(quickLinks).map(([label, dottedName]) => (