about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-11-07 08:06:06 +0100
committerEugen Rochko <eugen@zeonfederated.com>2019-11-07 09:06:06 +0200
commit7cdb8c10e97fe9e22411efef4986e6393247e0ee (patch)
tree1133370af6204a2e46e4e9412f3040fb4989be4a /app
parent66c1fe0495b7e4728ad776e9c41a70c180640ea5 (diff)
Minor improvements to poll composing UI (#12319)
- Disable the “add option” button instead of hiding it
- Allow poll option inputs to scale to full width
Diffstat (limited to 'app')
-rw-r--r--app/javascript/mastodon/features/compose/components/poll_form.js4
-rw-r--r--app/javascript/styles/mastodon/components.scss1
2 files changed, 2 insertions, 3 deletions
diff --git a/app/javascript/mastodon/features/compose/components/poll_form.js b/app/javascript/mastodon/features/compose/components/poll_form.js
index 211601d52..898f956b0 100644
--- a/app/javascript/mastodon/features/compose/components/poll_form.js
+++ b/app/javascript/mastodon/features/compose/components/poll_form.js
@@ -142,9 +142,7 @@ class PollForm extends ImmutablePureComponent {
         </ul>
 
         <div className='poll__footer'>
-          {options.size < 4 && (
-            <button className='button button-secondary' onClick={this.handleAddOption}><Icon id='plus' /> <FormattedMessage {...messages.add_option} /></button>
-          )}
+          <button disabled={options.size >= 4} className='button button-secondary' onClick={this.handleAddOption}><Icon id='plus' /> <FormattedMessage {...messages.add_option} /></button>
 
           <select value={expiresIn} onChange={this.handleSelectDuration}>
             <option value={300}>{intl.formatMessage(messages.minutes, { number: 5 })}</option>
diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss
index 417e8c899..ded668aea 100644
--- a/app/javascript/styles/mastodon/components.scss
+++ b/app/javascript/styles/mastodon/components.scss
@@ -392,6 +392,7 @@
   .autosuggest-input,
   .spoiler-input {
     position: relative;
+    width: 100%;
   }
 
   .spoiler-input {