From efbd9f41bc56d4af9d5912ccc77cfd845f8b5812 Mon Sep 17 00:00:00 2001 From: Mael Date: Mon, 20 May 2019 12:25:11 +0200 Subject: [PATCH 1/4] =?UTF-8?q?:bug:=20:sparkles:=20R=C3=A9solution=20du?= =?UTF-8?q?=20bug=20hover-click=20iOS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Voir https://css-tricks.com/annoying-mobile-double-tap-link-issue/ En bonus, le code est plus propre ensuite. --- source/components/conversation/Question.css | 1 + source/components/conversation/Question.js | 16 ++++----- .../conversation/RhetoricalQuestion.js | 3 +- source/components/conversation/StepAnswer.js | 16 --------- .../components/conversation/conversation.css | 36 +++++++++++-------- .../conversation/userAnswerButtonStyle.js | 10 ------ 6 files changed, 30 insertions(+), 52 deletions(-) delete mode 100644 source/components/conversation/StepAnswer.js delete mode 100644 source/components/conversation/userAnswerButtonStyle.js diff --git a/source/components/conversation/Question.css b/source/components/conversation/Question.css index e4fc34dcb..cd9ad3498 100644 --- a/source/components/conversation/Question.css +++ b/source/components/conversation/Question.css @@ -3,3 +3,4 @@ align-items: center; justify-content: flex-end; } + diff --git a/source/components/conversation/Question.js b/source/components/conversation/Question.js index 2ed8f25ec..eedd5af47 100644 --- a/source/components/conversation/Question.js +++ b/source/components/conversation/Question.js @@ -1,4 +1,3 @@ -import HoverDecorator from 'Components/utils/HoverDecorator' import withColours from 'Components/utils/withColours' import { compose, is } from 'ramda' import React, { Component } from 'react' @@ -7,7 +6,7 @@ import Explicable from './Explicable' import { FormDecorator } from './FormDecorator' import './Question.css' import SendButton from './SendButton' -import { answer, answered } from './userAnswerButtonStyle' +import classnames from 'classnames' /* Ceci est une saisie de type "radio" : l'utilisateur choisit une réponse dans une liste, ou une liste de listes. Les données @choices sont un arbre de type: @@ -144,7 +143,6 @@ let RadioLabel = props => ( ) const RadioLabelContent = compose( - HoverDecorator, withTranslation(), withColours )( @@ -154,14 +152,14 @@ const RadioLabelContent = compose( } render() { let { value, label, input, hover, colours } = this.props, - // value = when(is(Object), prop('value'))(choice), - labelStyle = Object.assign( - value === input.value || hover ? answered(colours) : answer(colours), - value === '_' ? { fontWeight: 'bold' } : null - ) + labelStyle = value === '_' ? { fontWeight: 'bold' } : null, + selected = value === input.value return ( -