Commit Graph

73 Commits

Author SHA1 Message Date
e373217577 Fixing customizations 2023-07-11 13:50:42 -04:00
67744ee779 Spell check input fields (#23395) 2023-02-04 16:34:21 +01:00
c49213f0ea Upgrade ESlint to v8 (#23305) 2023-01-30 01:45:35 +01:00
83a8efa9ca Add lang attribute to compose textarea and CW field (#23240)
Fixes #19858
2023-01-24 18:49:21 +01:00
83888739fd Add aria-hidden to content warning field when dimmed so that it is not confusing to screen reader users (#22568) 2023-01-05 13:39:58 +01:00
9f63c428e1 Don't autofocus the compose form (#16517)
When opening a page such as /web/timelines/home in a desktop browser, the
cursor was automatically placed in the textarea of the compose form.

When using the keyboard for navigation (using a browser plugin like vimium or
vim vixen, or just to hit 'space' to scroll down a page), you have remember to
leave the field before using that.

Since you only visit the page to write a new post some of the time, this PR
attempts to have nothing focused initially (and require the user to click or
e.g. use 'tab' to focus the textarea).

Tested:
* /web/timeslines/home no longer autofocuses the compose box
* pressing the 'n' hotkey still focuses the compose box
* clicking 'reply' for a post still focuses the compose box
* replying to a CW'ed post still focuses the compose box
* introducing the CW field still focuses the CW field
* introducing the CW field for a reply still focuses the CW field
* removing the CW field still focuses the compose box
* /web/statuses/new still autofocuses the compose box

fixes #15862
2022-12-15 17:37:05 +01:00
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
0165449e3a A11y: Explicit <form> element around compose area (#19742) 2022-11-04 17:08:08 +01:00
628c177ebe Change label of publish button to be "Publish" again (#18583) 2022-06-01 05:03:12 +02:00
0cdb077570 Add language dropdown to compose in web UI (#18420) 2022-05-16 11:18:35 +02:00
2cd31b3177 Fix reply button on media modal not giving focus to compose form (#17626)
* Avoid compose form and modal management fighting for focus

* Fix reply button on media modal footer not giving focus to compose form
2022-02-25 00:51:01 +01:00
38845592c4 Fix controls for unchangeable properties on status edit not being disabled (#17531)
Fixes #17520
2022-02-12 19:00:33 +01:00
63002cde03 Add editing for published statuses (#17320)
* Add editing for published statuses

* Fix change of multiple-choice boolean in poll not resetting votes

* Remove the ability to update existing media attachments for now
2022-02-10 00:15:30 +01:00
3a103cd317 Fix text being incorrectly pre-selected in composer textarea on /share (#17339)
Fixes #17295
2022-01-20 20:56:21 +01:00
034f37b85a Fix compose form behavior in mobile view (#15555)
* Fix ComposeForm being mounted twice in mobile view

Fixes #13094

* Fix compose form focus and pre-selection behavior in mobile view

* Split _updateFocusAndSelection out of componentDidUpdate
2021-03-24 10:19:07 +01:00
68775b6039 Fix character count not ignoring hidden CW field (#15236) 2020-11-30 12:09:34 +01:00
c07cca4727 Only scroll to the compose form if it's not horizontally in the viewport (#11246)
Avoids jumping the scroll around vertically when giving it focus and
editing long toots.
2019-07-06 18:18:08 +02:00
32a4494926 Scroll to compose form rather than reply indicator on focus (#11182) 2019-06-26 14:28:36 +02:00
01e362316c Do not scroll in the compose panel on single-column (#11093) 2019-06-16 18:46:55 +02:00
b4d67fe57a Fix ordering of keyboard access between CW field, textarea and emoji picker (#11066) 2019-06-13 17:07:43 +02:00
cc8f6b3cda Fix some React warnings (#10989) 2019-06-07 17:15:18 +02:00
c402c291f4 Fix emoji picker being always displayed (#10979)
* Fix emoji picker being always displayed

* Remove duplicate content with other pull-requests
2019-06-06 12:30:14 +02:00
8f3c32e29c Scroll to compose form when focus (#10970)
* Scroll to compose form when focus

* Get rid of constructor
2019-06-05 15:29:45 +02:00
d93b82af87 Improvement variable height in single column layout (#10917)
* Improvement variable height of compose and navigation panel in single column layout

* Fix wrong quotes and missing commas
2019-06-02 10:05:54 +02:00
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
05ef3462ba Make the "mark media as sensitive" button more obvious in web UI (#10673)
* Make the "mark media as sensitive" button more obvious in web UI

* Use eye-slash icon instead of eye icon to mean "hide"
2019-05-03 04:34:55 +02:00
bdec58b514 Minor code cleanup (#10613) 2019-04-22 14:55:24 +02:00
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
0e513ff862 Don't focus spiler input when disabled spoiler (#10017) 2019-02-12 05:10:31 +01:00
1f95190202 Refactor icons in web UI to use Icon component (#9951)
* Refactor uses of icons to an Icon component in web UI

* Refactor options passed to the Icon component

* Make tests work with absolute component paths
2019-02-01 00:14:05 +01:00
4297de34cf Split out is_changing_upload from is_submitting (#9536)
There is no reason to disable the composer textarea when some media metadata
is being modified, nor is there any reason to focus the textarea when some
media metadata has been modified (prevents clicking one image's description
field right after having modified another).
2018-12-16 21:17:56 +01:00
01c169e796 Fix JS error when posting from page without router context (#9073)
Fix #9057
2018-10-24 01:31:31 +02:00
87fdd139b8 Do not push DMs into the home feed (#8940)
* Do not push DMs into the home feed

* Show DMs column after sending a DM, if DMs column is not already shown
2018-10-11 01:31:03 +02:00
3d7f68c273 Revert Font Awesome 5 upgrade (#8810)
* Revert "Fix some icon names changed by the Font Awesome 5. (#8796)"

This reverts commit 3f9ec3de82.

* Revert "Migrate to font-awesome 5.0. (#8799)"

This reverts commit 8bae14591b.

* Revert "Fix some icons names, unavailable in fontawesome5 (free license). (#8792)"

This reverts commit b9c727a945.

* Revert "Update the icon name changed by the Font Awesome 5. (#8776)"

This reverts commit 17af4d27da.

* Revert "Add bot icon to bot avatars and migrate to newer version of Font Awesome (#8484)"

This reverts commit 4b794e134d.
2018-09-28 02:11:14 +02:00
8bae14591b Migrate to font-awesome 5.0. (#8799) 2018-09-27 17:08:56 +02:00
0ddbccf7e6 Upgrade Babel to version 7.0.0 (#5925) 2018-09-14 17:59:48 +02:00
09147186b7 Fix regression where CW is focused on reply (#7811) 2018-06-15 19:49:32 +02:00
a99179d31f Control the focus when clicking the "CW" button. (#7776)
* Focus to the spoiler text when CW turns on.
* Focus back to the textarea when CW turns off.
2018-06-10 16:13:30 +02:00
691107263c Put the CW field between the toot we are replying to and the toot field (#7508)
* Remove Collapsable and use CSS instead

* Put the CW field between the toot we are replying to and the toot field

* Use same spacing between all fields in the composing column
2018-05-31 15:16:31 +02:00
d8864b9e9d Fix caret position after selected suggestion and media upload (#7595)
* Fix media upload reseting caret position to last inserted emoji

* Fix caret position after inserting suggestions (fixes #6089)
2018-05-23 15:20:15 +02:00
39d70f375f Remove unneeded code now that attachment URL isn't appended to toots (#7593) 2018-05-22 19:32:02 +02:00
727917e91e Fix caret position after inserting emoji (#7167) 2018-04-17 13:50:33 +02:00
6a895e1ab3 Fix: Prevent submission using same logic as submit button disabling. (#6993)
This prevents submission through ctrl/cmd+enter when the submit button is disabled.
2018-04-01 22:19:43 +02:00
cfa9b6e13a Remove text requirement when media attached from statuses (#6672) 2018-03-07 08:28:52 +01:00
8bf4cc72b6 Excahnge the order of spoiler-input and unlocked warning (#6015)
* Excahnge the order of spoiler-input and unlocked warning

* Fix trailing whitespace
2017-12-13 18:01:56 +01:00
0aeec0390b Redesign tootbox (#5919)
* Redesign tootbox

* Move counter into compose-form__buttons-wrapper

Change font and remove shadow
Refactor sass codes of compose-form
2017-12-13 17:37:23 +01:00
b254e6ca5f Refactor initial state: "me" (#5563)
* Refactor initial state: "me"

* remove "me" from reducers/meta.js
2017-10-31 11:27:48 +09:00
d6fe0954e3 Make emoji autosuggestions immediate, usernames appear sooner (#5149)
* Do not debounce emoji search

* Make autosuggestions appear sooner
2017-09-30 05:11:44 +02:00
66126f3021 Add custom emojis to the emoji picker (#5052) 2017-09-23 05:40:28 +02:00
846cd4e838 Switch from EmojiOne to Twemoji, different emoji picker (#5046)
* Switch from EmojiOne to Twemoji, different emoji picker

* Make emoji-mart use a local spritesheet

* Fix emojify test

* yarn manage:translations
2017-09-23 01:41:00 +02:00