From d3e914f76a375ecd47a009cb542f824d01241dc2 Mon Sep 17 00:00:00 2001 From: rodrigo Date: Sun, 6 Mar 2016 17:36:15 -0300 Subject: [PATCH] Add help text below the input box when a user starts typing --- web/react/components/textbox.jsx | 51 +++++++++++++++++++++++-- web/sass-files/sass/partials/_post.scss | 24 ++++++++++-- web/static/i18n/en.json | 6 +++ web/static/i18n/pt.json | 6 +++ 4 files changed, 80 insertions(+), 7 deletions(-) diff --git a/web/react/components/textbox.jsx b/web/react/components/textbox.jsx index 23ecfb57b8..b84cc9922e 100644 --- a/web/react/components/textbox.jsx +++ b/web/react/components/textbox.jsx @@ -129,12 +129,12 @@ export default class Textbox extends React.Component { } render() { + const hastext = this.props.messageText.length > 0; + let previewLink = null; if (Utils.isFeatureEnabled(PreReleaseFeatures.MARKDOWN_PREVIEW)) { - const previewLinkVisible = this.props.messageText.length > 0; previewLink = ( @@ -153,6 +153,51 @@ export default class Textbox extends React.Component { ); } + let helptext = ( +
+ + + + + + + ~~ + + ~~ + + + + + + + + + + {previewLink} +
+ ); + return (
- {previewLink} + {helptext}
quote", + "textbox.strike": "strike", "tutorial_intro.allSet": "You’re all set", "tutorial_intro.end": "Click “Next” to enter Town Square. This is the first channel teammates see when they sign up. Use it for posting updates everyone needs to know.", "tutorial_intro.invite": "Invite teammates", diff --git a/web/static/i18n/pt.json b/web/static/i18n/pt.json index f79dae4614..3aa3bbb8d0 100644 --- a/web/static/i18n/pt.json +++ b/web/static/i18n/pt.json @@ -1049,9 +1049,15 @@ "team_signup_welcome.validEmailError": "Por favor entre um endereço de e-mail válido", "team_signup_welcome.welcome": "Bem-vindo:", "team_signup_welcome.yes": "Sim, este endereço de email está correto", + "textbox.bold": "**negrito**", "textbox.edit": "Editar mensagem", "textbox.help": "Ajuda", + "textbox.inlinecode": "`código`", + "textbox.italic": "_itálico_", + "textbox.preformatted": "```pre-formatado```", "textbox.preview": "Pré-visualização", + "textbox.quote": ">citado", + "textbox.strike": "tachado", "tutorial_intro.allSet": "Está tudo pronto", "tutorial_intro.end": "Clique em “Próximo” para entrar Town Square. Este é o primeiro canal que sua equipe de trabalho vê quando eles se inscrevem. Use para postar atualizações que todos precisam saber.", "tutorial_intro.invite": "Convidar pessoas para equipe",