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
master
ThibG 5 years ago committed by Eugen Rochko
parent 66c1fe0495
commit 7cdb8c10e9
  1. 4
      app/javascript/mastodon/features/compose/components/poll_form.js
  2. 1
      app/javascript/styles/mastodon/components.scss

@ -142,9 +142,7 @@ class PollForm extends ImmutablePureComponent {
</ul> </ul>
<div className='poll__footer'> <div className='poll__footer'>
{options.size < 4 && ( <button disabled={options.size >= 4} className='button button-secondary' onClick={this.handleAddOption}><Icon id='plus' /> <FormattedMessage {...messages.add_option} /></button>
<button className='button button-secondary' onClick={this.handleAddOption}><Icon id='plus' /> <FormattedMessage {...messages.add_option} /></button>
)}
<select value={expiresIn} onChange={this.handleSelectDuration}> <select value={expiresIn} onChange={this.handleSelectDuration}>
<option value={300}>{intl.formatMessage(messages.minutes, { number: 5 })}</option> <option value={300}>{intl.formatMessage(messages.minutes, { number: 5 })}</option>

@ -392,6 +392,7 @@
.autosuggest-input, .autosuggest-input,
.spoiler-input { .spoiler-input {
position: relative; position: relative;
width: 100%;
} }
.spoiler-input { .spoiler-input {

Loading…
Cancel
Save