Commit Graph

23 Commits

Author SHA1 Message Date
Claire 0ad919b192 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/javascript/mastodon/features/compose/components/poll_form.js`:
  glitch-soc change because of having changed the default number of
  available poll options.
  Applied upstream's changes while keeping glitch-soc's default number of
  poll options.
- `public/oops.png`:
  We had a minor graphics change, probably not worth diverging from upstream.
  Took upstream version.
2022-11-06 09:50:41 +01:00
Claire 9616f5bb22
Fix compose form submission reloading web interface (#19762)
* Fix compose form submission reloading web interface

Fix regression introduced by #19742

* Fix various compose form buttons being handled like submit buttons

* Fix coding style issue

* Fix missing onClick prop check
2022-11-05 13:43:37 +01:00
Thibaut Girka 3baacf6993 Merge branch 'master' into glitch-soc/merge-upstream 2020-05-13 22:11:49 +02:00
ThibG af6d356279
Fix first poll option not being focused when adding a poll (#13740)
Fixes #13698
2020-05-12 15:29:44 +02:00
Thibaut Girka f3eff922a3 Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- `app/javascript/mastodon/features/compose/components/poll_form.js`:
  Upstream bumped poll option character limit, but we already had
  a higher one, kept ours.
- `app/validators/poll_validator.rb`:
  Upstream bumped poll option character limit, but we already had
  a higher one, kept ours.
- `config/initializers/content_security_policy.rb`:
  Upstream added a rule, the way we compute ours is different, but
  that added rule has been ported.
- `package.json`:
  No real conflict, dependency update. Performed the same update.
- `yarn.lock`:
  No real conflict, dependency update. Performed the same update.
2020-04-02 20:32:00 +02:00
Sasha Sorokin 37b3985bfa
Improve polls: option lengths & redesign (#13257)
This commit redesign the polls and increases characters limit for the
options from 25 to 50 characters, giving pollsters more freedom.

Summarizing, the redesign is making the polls more adaptive for upcoming
changes to the options characters limit: the bar, or a "chart", is now
displayed separately from the option itself; vote check mark is moved
next to the option text, making the percentages take less space. Option
lengths are taken into account and text is wrapped to multiple lines
if necessary to avoid overflow.
2020-04-02 17:10:55 +02:00
Thibaut Girka c790ecb14d Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- `app/controllers/api/v1/statuses_controller.rb`:
  Conflict due to upstream adding a new parameter (with_rate_limit),
  too close to glitch-soc's own additional parameter (content_type).
  Added upstream's parameter.
- `app/services/post_status_service.rb`:
  Conflict due to upstream adding a new parameter (rate_limit),
  too close to glitch-soc's own additional parameter (content_type).
  Added upstream's parameter.
- `app/views/settings/preferences/appearance/show.html.haml`:
  Conflict due to us not exposing theme settings here (as we have
  a different flavour/skin menu).
  Took upstream change, while still not exposing theme settings.
- `config/webpack/shared.js`:
  Coding style fixes for a part we have rewritten.
  Discarded upstream changes.
2020-03-08 19:38:53 +01:00
Bèr Kessels fd76955f39
Code style improvements in JavaScript (#13159)
* JS-linter: fix trailing comma's

* Configure eslinter to ignore this onchange error.
2020-03-08 16:02:36 +01:00
Thibaut Girka ab5ff638f2 Merge branch 'master' into glitch-soc/master
Conflicts:
- `config/locales/en.yml`
  No real conflict, upstream added a translatable string “too close” to
  one specific to glitch-soc
- `lib/mastodon/statuses_cli.rb`
  Fixes made upstream, while changed in glitch-soc to keep bookmarked statuses
- `package.json`
  No real conflict, additional dependency in glitch-soc
2019-12-19 13:52:54 +01:00
Acid Chicken (硫酸鶏) 09a72add0e Fix tooltip messages of multiple poll switcher are reversed (#12616) 2019-12-16 23:55:02 +01:00
Thibaut Girka be4849c083 Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- app/controllers/application_controller.rb
  Minor conflict due to glitch-soc's theming system
2019-12-12 15:40:06 +01:00
Eugen Rochko 77e7b33dea
Revert "Fix an eslint warning (#12426)" (#12596)
This reverts commit 054ef83fc5.
2019-12-10 19:39:02 +01:00
Thibaut Girka abcba5c198 Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- package.json
  Not really a conflict, caused by an additional dependency in glitch-soc.
- yarn.lock
  Not really a conflict, caused by an additional dependency in glitch-soc.
2019-12-07 12:28:59 +01:00
ThibG c05ed8a625 Fix poll options not being selectable via keyboard (#12538)
* Fix poll options not being selectable via keyboard

Fixes #12384

* Improve styling of poll option checkboxes/radio buttons

* Use more appropriate ARIA roles for poll options

* Allow switching between single and multiple choice from keyboard

* Coding style

* Avoid using .bind()
2019-12-03 19:53:16 +01:00
Thibaut Girka c0f7e21685 Merge branch 'master' into glitch-soc/merge-upstream 2019-11-23 19:03:01 +01:00
Dimitri Merejkowsky 054ef83fc5 Fix an eslint warning (#12426) 2019-11-22 15:57:22 +01:00
Thibaut Girka 83774367d2 Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- `app/javascript/mastodon/features/compose/components/poll_form.js`
  conflict because of the poll option limit being different than upstream's
2019-11-07 13:43:56 +01:00
ThibG 7cdb8c10e9 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
2019-11-07 09:06:06 +02:00
Thibaut Girka b3dd0d276d Increase poll option length limit to 100 chars, number of options to 5 2019-10-10 20:13:59 +02:00
ThibG f2be71c293 Add emoji suggestions to CW and poll option fields (#10555)
* Refactor selectComposeSuggestion so that different paths can be updated

* Add suggestions in CW field

* Add emoji suggestion to poll options

* Attempt to fix CSS

* Hide suggestions by default

They will be enabled if the input has focus
2019-05-09 22:10:27 +02:00
ThibG 0e78862b61 Allow switching between singe-option and multiple-option polls (#10603) 2019-04-22 14:56:14 +02:00
Eugen Rochko 6a3f08661f
Fix scrollbar styles on compose textarea, small bugs (#10292) 2019-03-16 20:10:42 +01:00
Eugen Rochko d97cbb0da6
Add UI for creating polls (#10184)
* Add actions and reducers for polls

* Add poll button

* Disable media upload if poll enabled

* Add poll form

* Make delete & redraft work with polls
2019-03-06 04:53:37 +01:00