Commit graph

296 commits

Author SHA1 Message Date
Annika Backstrom
25f6f41052 Add hotkey for follow requests (#8307) 2018-08-20 03:44:16 +02:00
M Somerville
298ee84488 Fix #8264 - Do not override ctrl/cmd+click. (#8265)
This includes clicks on hashtags, mentions, display names and media in the
timeline; and usernames in reply-indicator, detailed status, and the boost
modal.
2018-08-18 12:50:32 +02:00
Eugen Rochko
60df87f6f0
Compensate for scrollbar disappearing when media modal visible (#8100)
* Compensate for scrollbar disappearing when media modal visible

Make auth pages backgrounds lighter

* Fix typo
2018-07-31 01:14:33 +02:00
Yamagishi Kazutoshi
06c83527f5 Do not scroll up when modal is opened (#8095) 2018-07-29 16:52:06 +02:00
ThibG
d199806969 Prevent scrolling main frame when navigating in image gallery with arrow keys (#8073) 2018-07-26 04:50:50 +02:00
ThibG
955d5d36e8 Use LoadingBar instead of blur to indicate that an image is loading (fixes #4060) (#7562) 2018-07-15 01:18:09 +02:00
Maciek Baron
f3af1a96a8 Check if router is injected in media modal (#7941) 2018-07-04 15:34:28 +02:00
Maciek Baron
bbbe3ed6ba Allow the media modal to be closed by pressing back (#7934) 2018-07-03 16:12:05 +02:00
Eugen Rochko
cdb101340a
Keyword/phrase filtering (#7905)
* Add keyword filtering

    GET|POST       /api/v1/filters
    GET|PUT|DELETE /api/v1/filters/:id

- Irreversible filters can drop toots from home or notifications
- Other filters can hide toots through the client app
- Filters use a phrase valid in particular contexts, expiration

* Make sure expired filters don't get applied client-side

* Add missing API methods

* Remove "regex filter" from column settings

* Add tests

* Add test for FeedManager

* Add CustomFilter test

* Add UI for managing filters

* Add streaming API event to allow syncing filters

* Fix tests
2018-06-29 15:34:36 +02:00
ふぁぼ原
20bb90ced6 On the mobile UI, move the search column to the right (#7877) 2018-06-26 20:35:11 +02:00
Hinaloe
b347d55432 DataTransfer.types may Array-like object (#7827) 2018-06-18 01:10:58 +09:00
Yamagishi Kazutoshi
64d7a63f18 Submit report using meta key (#7729) 2018-06-04 13:09:52 +02:00
Eugen Rochko
0deb9fa6b9
Remove trending hashtags (#7711)
* Delete trends_controller.rb

* Update routes.rb

* Update trending_tags.rb

* Update index.js

* Update index.js

* Update search_results.js

* Update async-components.js

* Update index.js

* Delete trends.js

* Delete trends.js

* Delete trends_container.js

* Delete trends.js

* Update search_results.js

* Update search_results_container.js
2018-06-04 02:18:18 +02:00
Eugen Rochko
73c0c36e7b
Improve trends layout (#7700)
* Allow collapsing trends, responsively hide trends

* Add trends column
2018-06-01 19:18:37 +02:00
Eugen Rochko
3623aea6c9
Redirect / to home on mobile layout, to getting started on desktop (#7677) 2018-05-30 18:42:06 +02:00
Eugen Rochko
5ea643b279
Save onlyMedia prop when pinning column (#7575) 2018-05-21 17:49:10 +02:00
Yamagishi Kazutoshi
46061dc041 Add exact attribute to WrappedRoute for community timeline (#7572)
* Add extra attribute to WrappedRoute for community timeline

* fix
2018-05-21 16:26:00 +02:00
Yamagishi Kazutoshi
7403e5d306 Add media timeline (#6631) 2018-05-21 12:43:38 +02:00
Yamagishi Kazutoshi
d9b2f84c92 Open video modal on public UI (#7469) 2018-05-13 13:48:14 +02:00
Yamagishi Kazutoshi
e0b1e17bd0 Show media modal on public timeline (#7413) 2018-05-08 13:33:09 +02:00
ThibG
b1938d7853 Do not crash in getStatusIds when there is a gap in the timeline (fixes #7400) (#7415)
Fixes a crash occurring when the “gap” disconnection indicator is to be
displayed in a filtered timeline.
2018-05-08 13:28:55 +02:00
ThibG
5c7bed6bbc Various improvements to the report UI (#7342)
* Also display replies in report modal

* Allow report modal to be up to 80% of viewport height

* Use narrow no-break space where needed in the French translation
2018-05-06 20:38:17 +02:00
Lynx Kotoura
74dae9458d Add color variables of texts for better accesibility (#7125)
* Add variables for text colors

* Change variables in sass files

* Apply text color variables for recently added colors

* Fix text colors of emoji mart anchors

* Fix text colors of search__input

* Fix text colors of text area of compose-form

* Fix icon colors of privacy dropdown and modal

* Inverted icon colors by classname

* Change variables in boost.scss

* Change action-button-color

* Fix text colors of pre-header
2018-04-18 16:52:15 +02:00
Kaito Sinclaire
156b916caf Direct messages column (#4514)
* Added a timeline for Direct statuses
* Lists all Direct statuses you've sent and received
* Displayed in Getting Started
* Streaming server support for direct TL

* Changes to match other timelines in 2.0
2018-04-18 13:09:06 +02:00
Neil Moore
fad7b9f5f2 Adds keyboard hotkey for revealing/hiding statuses (#7173)
Resolves #5550
2018-04-18 03:33:59 +02:00
Emelia Smith
c9cbb8de70 Add search item to tab bar for mobile devices (#7072)
* Add search item to tab bar for mobile devices

* Fix missing prop validation
2018-04-08 14:26:58 +02:00
Emelia Smith
7a81082704 Revert "Add double-tap zoom functionary to ZoomableImage (#6944)" (#7035)
Unfortunately the new hammer.js functionality wasn't correctly tested and didn't work across devices and browsers, as such, it's best to revert PR #6944 until we can revisit this functionality and make it work across all devices and browsers that are supported by Mastodon.

This reverts commit 5021c4e9ca.
2018-04-04 11:58:15 +02:00
unarist
2c51bc0ca5 Add missing rejection handling for Promises (#7008)
* Add eslint-plugin-promise to detect uncaught rejections

* Move alert generation for errors to actions/alert

* Add missing rejection handling for Promises

* Use catch() instead of onReject on then()

Then it will catches rejection from onFulfilled. This detection can be
disabled by `allowThen` option, though.
2018-04-02 14:51:02 +02:00
ThibG
a6c129ddbd Add some UI for user-defined domain blocks (#6628)
* Keep list of blocked domains

Might be overkill, but I'm trying to follow the same logic as for blocked users

* Add basic domain block UI

* Add the domain blocks UI to Getting Started

* Fix undefined URL in `fetchDomainBlocks`

* Update all known users' domain_blocking relationship instead of just one's
2018-03-30 12:38:00 +02:00
Yuto Tokunaga
5021c4e9ca Add double-tap zoom functionary to ZoomableImage (#6944)
add <div.zoomable-image__margin/> to keep margin of the image on zooming
move setting `scrollLeft` and `scrollTop` of container from callback of
`setState` to `componentDidUpdate`
add 'hammerjs' package for touch gesture detection
rewrite `ZoomableImage` using 'hammerjs'
2018-03-28 20:40:51 +02:00
Akihiko Odaki
cbf97c03bb Allow clients to fetch notifications made while they were offline (#6886) 2018-03-24 22:07:23 +01:00
Akihiko Odaki
9a1a55ce52 Allow clients to fetch statuses made while they were offline (#6876) 2018-03-24 15:25:15 +01:00
Akihiko Odaki
ff7941e652 Show media modal on public pages (#6801) 2018-03-24 12:52:26 +01:00
Akihiko Odaki
4e71b104e6 Internationalize unexpected error message (#6887) 2018-03-24 10:54:19 +01:00
Eugen Rochko
f66a786029
Hide floating action button on thread views (#6859) 2018-03-22 09:33:14 +01:00
Yuto Tokunaga
fa5c867e0e Avoid using JS to set height in MediaModal (#6750)
avoid using JS to set height of ReactSwipeableViews component
reduce max-height of <img/> to 80% to avoid the screen covered by image
2018-03-12 03:52:05 +01:00
Eugen Rochko
56eb5c3f34
Fix focal point cropping in MediaGallery, fix focal point modal (#6740)
* Use object-position with object-fit instead of JS top/left

* Fix focal point modal
2018-03-11 15:12:33 +01:00
Eugen Rochko
a1b065700a
Fix focal point modals broken by #5956 (#6676) 2018-03-07 12:01:53 +01:00
Akihiko Odaki
913a38111f Remove pointer events on the entire UI when a dropdown menu is open (#6648)
* Remove pointer events on the entire UI when a dropdown menu is open

This prevents operations to change the location of the menu such as
scrolling.

* Fix mistake from merge
2018-03-07 02:26:43 +01:00
Akihiko Odaki
a07cfee644 Extract columns area from UI component (#6650)
UI component used to toggle isComposing state by directly manipulating the
DOM element to avoid the expensive rendering.

However, it is hacky, and is not effective for other states. Instead,
this change makes the rendering cheaper by extracting the huge columns
area.
2018-03-06 07:45:31 +01:00
Akihiko Odaki
13cf92df27 Use React.PureComponent instead of React.Component (#6653) 2018-03-06 07:28:26 +01:00
Akihiko Odaki
61e6275781 Use withRouter for TabsBar (#6652)
TabsBar refers to router, which is a private context property of
react-router. withRouter is a recommended alternative. It also allows to
track location changes even if React.PureComponent is used.
2018-03-06 07:28:05 +01:00
Akihiko Odaki
b0664a5e6c Replace onScrollToBottom with onLoadMore (#6615)
onScrollToBottom was a function to run instead of onScrollToTop and
onScroll when scrolling to the bottom. The behavior to prevent
onScrollToTop was inconvenient because the viewport can be at the bottom
and at the top at the same time if the viewport is larger than the
container.

onScrollToBottom was also called when the button to load more is clicked
on contray to the name suggests, which led notifications and
status_list_container components to mark the scrolled location is not at
the top mistakenly.

onLoadMore is a replacement for onScrollToBottom. It will be called
independently from onScrollToTop and onScroll.
2018-03-05 19:31:40 +01:00
Yuto Tokunaga
4e929b2d17 [RFC] Improved media modal (#5956)
* Improved media modal

ImageLoader: Impliment pinch zoom by CSS `transform: scale(X)`
ImageLoader: Impliment panning by CSS `overflow: scroll`
ImageLoader: Larger image
MediaModal: Larger close button
MediaModal: Close the modal by swiping vertically
MediaModal: Show/hide close button and right/left navigation on tapping image
MediaModal: Change the `pointer-event` CSS prpp to get more blank space to close the modal
ImageLoader: Zoom/reset zoom on double tap
MediaModal: disable vertical swiping while horizontally swiped
ImageLoader: prevent propagating touchmove event to MediaModal
MediaModal: Adjust size and potision of buttons
ImageLoader: Adjust scroll potision on pinch zoom

* Remove "swipe to close" and "double tap to zoom" features

* remove unused prop and functions

removed `onScroll` prop and `handleScroll` func in ImageLoader

* separate zoom functionary to ZoomableImage component

adjust styling of ImageLoader
add styling for ZoomableImage

* adjust size and potision of close button of media modal

* Fix for gif video

add `onClick` prop to ExtendedVideoPlayer
specify `onClick` prop to video tag for switching nav of `MediaModal`
add `.video-modal` class to scss to separate styling for `VideoModal`

* fix styling for centering

specify height of `ZoomableImage` by pixel
clean styling for `ImageLoader`

* fix lint errors

* small fix

* fixed designated parts
2018-03-04 20:32:24 +01:00
Eugen Rochko
e72db6d9dd
Move "compose" on mobile to floating action button (#6594)
* Move "compose" on mobile to floating action button

* Fix contrast on floating action button
2018-03-02 07:12:40 +01:00
Eugen Rochko
7901f9f63e
When search enabled, display hint in search popout (#6593)
* When advanced search is enabled, show different hint in search popout

* Change "getting started" icon in tabs bar from asterisk to hamburger
2018-03-02 06:02:42 +01:00
Eugen Rochko
379cdfaac5
Fix #6586: Add close modal icon to report dialog (#6591) 2018-03-02 04:36:00 +01:00
Eugen Rochko
5131012505
Add "Toots/Toots with replies/Media" tab below profile header (#6572)
* Add "Toots/Toots with replies/Media" tab below profile header

* Add focal point display to account gallery timeline

* Fix visual glitch of standalone GIFV
2018-03-01 02:48:44 +01:00
Eugen Rochko
41a01bec23
Federated reports (#6570)
* Fix #2176: Federated reports

* UI for federated reports

* Add spec for ActivityPub Flag handler

* Add spec for ReportService
2018-02-28 06:54:55 +01:00
Akihiko Odaki
7cb49eaa3a Do not use function name to track components (#6542)
UglifyJS2 is allowed to mangle function names, and function names can also
be duplicate if they are from different scopes. Therefore function names
are not reliable as identifiers.

Functions as keys for Map object is a cheaper and more reliable
alternative.
2018-02-24 19:10:57 +01:00
Eugen Rochko
90f12f2e5a
Focal points (#6520)
* Add focus param to media API, center thumbnails on focus point

* Add UI for setting a focal point

* Improve focal point icon on upload item

* Use focal point in upload preview

* Add focalPoint property to ActivityPub

* Don't show focal point button for non-image attachments
2018-02-22 00:35:46 +01:00
Eugen Rochko
daefbd66a6
Fix style of legacy column headers (#6342)
* Fix regression from #6199: Style of legacy column headers

* Fix tests

* Clean up variables
2018-01-24 04:03:51 +01:00
Eugen Rochko
31d1485887
Display number of follow requests in getting started menu, and (#6313)
if notifications column is not mounted, also display number of
unread notifications there.
2018-01-21 13:20:20 +01:00
Eugen Rochko
79b34a0fa2
Restore onboarding modal (#6303)
* Restore onboarding modal
Revert 5ba8b3a396895ecec083c5258aaf9084d584a7c4

* Change greeting elephant graphic, fix up some design issues

* Fix wrong link color in onboarding modal
2018-01-20 01:32:37 +01:00
Eugen Rochko
d799921c75
Replace tutorial modal with welcome e-mail (#6273)
* Remove onboarding modal

* Welcome e-mail

* Send welcome e-mail after confirmation

* Remove obsolete translations
2018-01-18 19:17:25 +01:00
Eugen Rochko
7badad7797
Fix home regeneration (#6251)
* Fix regeneration marker not being removed after completion

* Return HTTP 206 from /api/v1/timelines/home if regeneration in progress
Prioritize RegenerationWorker by putting it into default queue

* Display loading indicator and poll home timeline while it regenerates

* Add graphic to regeneration message

* Make "not found" indicator consistent with home regeneration
2018-01-17 23:56:03 +01:00
Yamagishi Kazutoshi
0a103c7749 Upgrade ESLint to version 4.x (#6276) 2018-01-17 16:57:15 +01:00
neetshin
2091ae92be Make columns-area unscrollable when modal opened (#6241)
* Add aria-autocomplete='list' in Textaria

ref: https://www.w3.org/TR/wai-aria-1.1/#aria-autocomplete

* Make detect empty string brefore assign upload description

* Change code elements in keyboard-shortcuts component to kbd

* Add validation for onMuteNotifications

* Make columns-area unscrollable when modal opend

* Make columns-area unscrollable when modal opened
2018-01-15 06:51:00 +01:00
nightpool
c235711ffe Refactor /api/web APIs to use the centralized axios instance (#6223)
Also adds the ability to decouple the centralized axios logic from the
state dispatcher
2018-01-08 20:01:33 +01:00
Chris
081956742c removed references to hideOnMobile in column_link and getting_started (#6082)
* removed references to hideOnMobile in column_link and getting_started

* move keyboard shortcuts back below blocked users
2017-12-24 04:47:02 +01:00
Eugen Rochko
3487460f00
Fix regression from #6014 (#6018) 2017-12-13 20:33:04 +01:00
Eugen Rochko
cc75d47926
Fix layout for RTL (#6014) 2017-12-13 18:28:13 +01:00
Eugen Rochko
70ce2a2095
Polish video player CSS, add timer on fullscreen/modal/public pages (#5928) 2017-12-09 00:55:58 +01:00
Eugen Rochko
e20895f251
Add list of lists component to web UI (#5811)
* Add list of lists component to web UI

* Add list adding

* Add list removing

* List editor modal

* Add API account search limited by following=true relation

* Rework list editor modal

* Remove mandatory pagination of GET /api/v1/lists/:id/accounts

* Adjust search input placeholder

* Fix rspec (#5890)

* i18n: (zh-CN) Add missing translations for #5811 (#5891)

* i18n: (zh-CN) yarn manage:translations -- zh-CN

* i18n: (zh-CN) Add missing translations for #5811

* Fix some issues

- Display loading/missing state for list timelines
- Order lists alphabetically in overview
- Fix async list editor reset
- Redirect to /lists after deleting unpinned list
- Redirect to / after pinning a list

* Remove dead list columns when a list is deleted or fetch returns 404
2017-12-05 23:02:27 +01:00
Joshua Wood
ff78c1177a Add Keyboard Shortcuts Legend (#5823)
* Add Keyboard Shortcuts Legend

Adds a "Keyboard Shortcuts" legend (displayed in the rightmost column)
which is toggled via a new "?" hotkey. When subsequently pressed from
the Keyboard Shortcuts legend, "?" will navigate back to the previous
location.

* Add hidden table headings.

Makes the headings available for accessibility but hides them visually.
2017-11-27 21:31:58 +01:00
Akihiko Odaki
bf7757cbbc Allow to open a modal for embedded photo (#5777) 2017-11-25 15:41:45 +01:00
Eugen Rochko
31ac5f0e00
Display list column (#5750) 2017-11-25 00:35:37 +01:00
Surinna Curtis
031a5a8f92 Optional notification muting (#5087)
* Add a hide_notifications column to mutes

* Add muting_notifications? and a notifications argument to mute!

* block notifications in notify_service from hard muted accounts

* Add specs for how mute! interacts with muting_notifications?

* specs testing that hide_notifications in mutes actually hides notifications

* Add support for muting notifications in MuteService

* API support for muting notifications (and specs)

* Less gross passing of notifications flag

* Break out a separate mute modal with a hide-notifications checkbox.

* Convert profile header mute to use mute modal

* Satisfy eslint.

* specs for MuteService notifications params

* add trailing newlines to files for Pork :)

* Put the label for the hide notifications checkbox in a label element.

* Add a /api/v1/mutes/details route that just returns the array of mutes.

* Define a serializer for /api/v1/mutes/details

* Add more specs for the /api/v1/mutes/details endpoint

* Expose whether a mute hides notifications in the api/v1/relationships endpoint

* Show whether muted users' notifications are muted in account lists

* Allow modifying the hide_notifications of a mute with the /api/v1/accounts/:id/mute endpoint

* make the hide/unhide notifications buttons work

* satisfy eslint

* In probably dead code, replace a dispatch of muteAccount that was skipping the modal with launching the mute modal.

* fix a missing import

* add an explanatory comment to AccountInteractions

* Refactor handling of default params for muting to make code cleaner

* minor code style fixes oops

* Fixed a typo that was breaking the account mute API endpoint

* Apply white-space: nowrap to account relationships icons

* Fix code style issues

* Remove superfluous blank line

* Rename /api/v1/mutes/details -> /api/v2/mutes

* Don't serialize "account" in MuteSerializer

Doing so is somewhat unnecessary since it's always the current user's account.

* Fix wrong variable name in api/v2/mutes

* Use Toggle in place of checkbox in the mute modal.

* Make the Toggle in the mute modal look better

* Code style changes in specs and removed an extra space

* Code review suggestions from akihikodaki

Also fixed a syntax error in tests for AccountInteractions.

* Make AddHideNotificationsToMute Concurrent

It's not clear how much this will benefit instances in practice, as the
number of mutes tends to be pretty small, but this should prevent any
blocking migrations nonetheless.

* Fix up migration things

* Remove /api/v2/mutes
2017-11-15 03:56:41 +01:00
unarist
49a285ce15 Show confirmation dialog on leaving WebUI while composing (#5616)
* Show confirmation dialog on leaving WebUI while composing

Currently, Back button and Back hotkey can cause leaving from WebUI, as well as browser's back button. Users may hit those buttons accidentally, and their composing text will be lost.

So this prevents it by showing confirmation dialog from `onbeforeunload` event.

* Fix message and comments
2017-11-09 14:34:41 +01:00
Sorin Davidoi
5521e94e24 refactor(features/ui): Avoid useless renders in WrappedSwitch (#5580) 2017-11-01 12:17:53 +01:00
Nolan Lawson
b254e6ca5f Refactor initial state: "me" (#5563)
* Refactor initial state: "me"

* remove "me" from reducers/meta.js
2017-10-31 11:27:48 +09:00
Nolan Lawson
ec487166db Directly use <Motion/> if not reducing motion (#5546) 2017-10-27 19:06:54 +02:00
Nolan Lawson
3de22a82bf Refactor initial state: reduce_motion and auto_play_gif (#5501) 2017-10-28 00:04:44 +09:00
Nolan Lawson
8392ddbf87 Remove unnecessary translateZ(0) when doing scale() (#5473) 2017-10-19 18:27:55 +02:00
Nolan Lawson
8980aa804f Fix reduced motion breaking public galleries (#5423) 2017-10-16 21:08:01 +02:00
Nolan Lawson
fa0be3f834 Add option to reduce motion (#5393)
* Add option to reduce motion

* Use HOC to wrap all Motion calls

* fix case-sensitive issue

* Avoid updating too frequently

* Get rid of unnecessary change to _simple_status.html.haml
2017-10-16 09:36:15 +02:00
Yamagishi Kazutoshi
d5b767c374 Replace JavaScript Testing Framework from Mocha to Jest (#5412) 2017-10-16 09:33:08 +02:00
Eugen Rochko
476e79b8e3 Fully disable hotkeys when input element is focused (#5324)
Because alt+n is a way to enter some kinda letter on some keyboard
2017-10-11 16:31:07 +02:00
Eugen Rochko
b3d7ad958f Fix #5306: Stop hotkeys in input fields even when shift is pressed (#5309)
AZERTY layouts require pressing shift to press a number at all, so
it triggers a column switch even when simply typing numbers in
textarea
2017-10-11 01:01:17 +02:00
Nolan Lawson
7de6d269d2 Use ES module build of react-router-dom (#5264) 2017-10-08 02:55:58 +02:00
Nolan Lawson
057db0ecd0 Update emoji-mart to v2.1.1 (#5256) 2017-10-07 12:17:02 +02:00
Eugen Rochko
7db0f8dcb2 Implement hotkeys for web UI (#5164)
* Fix #2102 - Implement hotkeys

Hotkeys on status list:

- r to reply
- m to mention author
- f to favourite
- b to boost
- enter to open status
- p to open author's profile
- up or k to move up in the list
- down or j to move down in the list
- 1-9 to focus a status in one of the columns
- n to focus the compose textarea
- alt+n to start a brand new toot
- backspace to navigate back

* Add navigational hotkeys

The key g followed by:

- s: start
- h: home
- n: notifications
- l: local timeline
- t: federated timeline
- f: favourites
- u: own profile
- p: pinned toots
- b: blocked users
- m: muted users

* Add hotkey for focusing search, make escape un-focus compose/search

* Fix focusing notifications column, fix hotkeys in compose textarea
2017-10-06 01:07:59 +02:00
PFM
875d943c18 Add pagination in media modal (#4343)
* Add pagination in media modal

* Change array name

* Add an element class

* Avoid nested class

* Pull out the active class

* Use map instead of forEach

* Remove parentheses
2017-10-03 17:11:22 +02:00
Nolan Lawson
b9c612b561 Code-split emoji-mart picker and data (#5175) 2017-10-02 07:22:24 +02:00
Nolan Lawson
c567c87453 Toggle contain:strict on fullscreen (#5159)
* Toggle contain:strict on fullscreen

* Fix scss lint issue

* fix scss whitespace lint issue
2017-10-02 03:01:01 +02:00
Eugen Rochko
ebb8c89207 Upgrade to React 16 (#5119)
* Upgrade to React 16.0.0

* Disable some uncritical tests while chai-enzyme remains incompatible
2017-09-30 04:29:56 +02:00
Nolan Lawson
6e0659c838 Improve performance of modal and swipe animations (#5135)
* Improve performance of modal and swipe animations

* Fix eslint issues
2017-09-28 20:43:18 +02:00
Eugen Rochko
4ec1771165 Add ability to specify alternative text for media attachments (#5123)
* Fix #117 - Add ability to specify alternative text for media attachments

- POST /api/v1/media accepts `description` straight away
- PUT /api/v1/media/:id to update `description` (only for unattached ones)
- Serialized as `name` of Document object in ActivityPub
- Uploads form adjusted for better performance and description input

* Add tests

* Change undo button blend mode to difference
2017-09-28 15:31:31 +02:00
Eugen Rochko
1e02ba111a Add emoji autosuggest (#5053)
* Add emoji autosuggest

Some credit goes to glitch-soc/mastodon#149

* Remove server-side shortcode->unicode conversion

* Insert shortcode when suggestion is custom emoji

* Remove remnant of server-side emojis

* Update style of autosuggestions

* Fix wrong emoji filenames generated in autosuggest item

* Do not lazy load emoji picker, as that no longer works

* Fix custom emoji autosuggest

* Fix multiple "Custom" categories getting added to emoji index, only add once
2017-09-23 14:47:32 +02:00
Eugen Rochko
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
Nolan Lawson
b01ab55ed8 Fix PropTypes.oneOfType() warning (#5041) 2017-09-22 17:50:29 +02:00
Eugen Rochko
034fab39ab Make dropdowns render into portal, expand animation (#5018)
* Make dropdowns render into portal, expand animation

* Improve actions modal style
2017-09-22 04:59:17 +02:00
Nolan Lawson
798b0fc5af Reduce wasted renders for column_loading.js (#5021)
* Reduce wasted renders for column_loading.js

* Use defaultProps
2017-09-20 19:58:44 +02:00
abcang
44245926f1 Fix cancellation of scroll to the right (#4978) 2017-09-17 11:59:23 +02:00
Eugen Rochko
2bbf987a0a Redesign video player (#4911)
* Redesign video player

* Use new video player on static public pages too

* Use media gallery component on static public pages too

* Pause video when hiding it

* Full-screen sizing on WebKit

* Add aria labels to video player buttons

* Display link card on public status page

* Fix fullscreen from modal sizing issue

* Remove contain: strict property to fix fullscreen from columns
2017-09-14 03:39:10 +02:00
abcang
60944d5dca Fix height cache (#4909) 2017-09-13 10:24:33 +02:00
Eugen Rochko
72e662bb0d Hide modal loading screen for media/video/boost/confirm/actions modals (#4873) 2017-09-10 10:26:01 +02:00
Eugen Rochko
f2cbfb2eb3 Fix dimensions of loading component for compose drawer (#4872) 2017-09-10 08:48:11 +02:00
Eugen Rochko
6867681c7c Add script to make embedded iframes autosize (#4853) 2017-09-09 16:23:44 +02:00
voidSatisfaction
85c7c42098 Add Pinned toot column (#4817)
* Add Pinned_toot_section

* Fix add frozen_string_literal

* Fix delete no need controller and tests

* Fix replace query strings to axios params

* Fix change value to accountId and disabling more button
2017-09-07 09:58:11 +02:00
Surinna Curtis
8cc1ed3c55 Don't unconditionally call preventDefault and stopPropagation on all keyup events (#4777)
* UploadArea should only preventDefault for Escape

This will make accessibility for some things less effortful, since we won't have to define a prior event handler to do whatever should be happening by default.

* Remove workaround for fixed bug in SettingToggle

SettingToggle was toggling itself in response to keydown of space, and then the keyup was doing it again
2017-09-02 16:27:16 +02:00
Yamagishi Kazutoshi
2305f7c391 Use system's default font on non web UI pages (#4553)
* Use system's default font on non web UI pages

* Remove import for Redirect
2017-09-01 16:13:31 +02:00
Akihiko Odaki
69957ed10a Fix the usages of Detect Passive Events (#4749) 2017-08-31 11:20:54 +02:00
Eugen Rochko
d1a78eba15 Embed modal (#4748)
* Embed modal

* Proxy OEmbed requests from web UI
2017-08-31 03:38:35 +02:00
MitarashiDango
fec13735a7 error fixed (when loading pages in single column mode.) (#4746) 2017-08-30 17:30:25 +02:00
abcang
f59ed3a4fa Scroll smoothly to the right (#4735) 2017-08-29 17:06:19 +02:00
MitarashiDango
7be620775e fix error when single columns mode. (#4734) 2017-08-29 16:11:28 +02:00
Akihiko Odaki
9958eba356 Do not scroll the columns area due to redirection (#4541)
Commit 9d1f8b9d6a scrolls the columns area
when the route changes since the user is likely to want to see the
rightmost column in such cases.

However, redirection is automatic and does not indicate users' intension.
Do not scroll the columns area due to one.
2017-08-29 14:16:21 +02:00
Yamagishi Kazutoshi
fbe1115114 Remove eslint-disable comments (#4681)
Do not reject console.error and console.warn with ESLint rules.
2017-08-24 12:15:36 +02:00
Ondřej Hruška
820099813f add scrollTop to ui/components/column (#4563) 2017-08-09 00:21:58 +02:00
Ondřej Hruška
61bfce5aa9 add missing @ to the onboarding modal (#4560) 2017-08-08 22:13:04 +02:00
Sorin Davidoi
8eb6d171e6 feat: Cache status height to avoid expensive renders (#4439)
* feat: Cache status height to avoid expensive renders

* feat: Escape content and emojify in reducers

* fix(css): Remove backface-visibility: hidden from .scrollable

* fix(statuses): Avoid creating DOMParses inside a loop
2017-08-07 20:32:03 +02:00
Ondřej Hruška
5942347407 Refactor Avatar and AvatarOverlay to have 'account' as prop instead of src and staticSrc (#4526)
* Refactored Avatar and AvatarOverlay (DRY) to have 'account' as prop.
Also removed animate attribute from compose navigation bar, which should
have never been there. Added test for avatar overlay.

* fix broken tests

* god dammit another bug in tests! travis please let this pass

* formatting in avatar overlay
2017-08-07 19:44:55 +02:00
MitarashiDango
5ee45fa571 fix columns_area.js (#4528) 2017-08-05 20:33:41 +02:00
Akihiko Odaki
9d1f8b9d6a Scroll columns area to right when children property is changed (#4517)
The feature to pin column could hide the rightmost column, which is
specified with children property of ColumnsArea.

The user is likely to see the column when the property changed, so scroll
the area in such cases.
2017-08-04 18:57:46 +02:00
Sorin Davidoi
e44f03bc71 Improve accessibility (part 7) (#4457)
* fix(media_modal): Keyboard navigation

* fix(column_back_button): Use native button

* fix(media_gallery): Keyboard navigation

* fix(status_content): Make CW content focusable
2017-07-31 00:18:15 +02:00
Sorin Davidoi
4f04981dde feat(tabs_bar): Avoid optimization for non-touch devices (#4444)
* fix(tabs_bar): Check if transition is necessary

* feat(tabs_bar): Only apply optimization for touch devices
2017-07-29 21:20:34 +02:00
みたらしだんご
a46ba4a8f5 fix tabs_bar.js (#4436) 2017-07-29 14:19:49 +02:00
Sorin Davidoi
634b71ed1d Accessability fixes (#4432)
* fix(modal_root): Read type from props, not from component

* fix(status_list): Do not user event.path
2017-07-28 22:55:19 +02:00
Sorin Davidoi
3d378ed0b4 fix(tabs_bar): Allow animation to end before navigating (#4429)
* fix(tabs_bar): Allow animation to end before navigating

* fix(tabs_bar): Do not use event.path
2017-07-28 22:55:13 +02:00
Yamagishi Kazutoshi
12874eafa6 Unify webpackChunkName to lowercase (#4412) 2017-07-28 13:34:55 +02:00
Sorin Davidoi
3e01a7e677 fix(web_push_notification): Do not hard reload tab (#4380)
* fix(web_push_notification): Do not hard reload tab

* fix(web_push_notification_worker): Guard against null subscription

* refactor: Incorporate pull request feedback
2017-07-28 05:06:01 +02:00
Sorin Davidoi
b7d47c2aef Improve accessibility (part 4) (#4408)
* fix(dropdown_menu): Keyboard navigation

* fix(icon_button): Add aria-pressed attribute

* fix(privacy_dropdown): Make accessible

* fix(emoji_picker_dropdown): Make accessible

* fix(icon_button): Support tabIndex

* fix(actions_modal): Remove icon from tab order

* fix(dropdown_menu): Add role=group

* fix(setting_toggle): Toggle via space key

* fix(dropdown_menu): Remove redundant handling of Space key

* fix(emoji_picker_dropdown): Remove redundant Space key handling

* fix(privacy_dropdown): Remove redundant Space key handling

* fix(status): Switch to article and add aria-posinset, aria-setsize

* fix(status_list): Use role=feed and pass more ARIA props to Status

* chore(eslint): jsx-a11y/role-supports-aria-props
2017-07-28 04:37:30 +02:00
Sorin Davidoi
6884dd79ba Improve accessibility (part 3) (#4405)
* fix(compose): Add aria-label for the navigation links

* fix(search): Add input label

* fix(navigation_bar): Link description

* fix(autosuggest_textarea): Add input label

* fix(compose_form): Add input label

* fix(upload_button): Add input label

* fix(account/header): Add link content

* fix(column_header): Use h1 tag

* fix(column_header): Labels move buttons moving column

* fix(settings_text): Add label to input

* fix(column_header): Remove role from h1

* fix(modal_root): Use role=dialog

* fix(modal_root): Focus restauration

* fix(modal_root): Apply inert to sibligs

* fix(column_header): Add role=button

* chore(eslint): Disable jsx-a11y/label-has-for
2017-07-28 00:54:48 +02:00
Sorin Davidoi
f9075577e4 fix(actions_modal): Warning about missing prop (#4406) 2017-07-27 23:01:50 +02:00
Sorin Davidoi
50d38d7605 fix(dropdown_menu): Open as modal on mobile (#4295)
* fix(dropdown_menu): Open as modal on mobile

* fix(dropdown_menu): Open modal on touch

* fix(dropdown_menu): Show status

* fix(dropdown_menu): Max dimensions and reduce padding

* chore(dropdown_menu): Test new functionality

* refactor: Use DropdownMenuContainer instead of DropdownMenu

* feat(privacy_dropdown): Open as modal on touch devices

* feat(modal_root): Do not load actions-modal async
2017-07-27 22:31:59 +02:00
Sorin Davidoi
a248be4fce fix(columns_area): Manually set tabs style when swiping (#4320) 2017-07-26 19:03:56 +02:00
Sorin Davidoi
b8adb4d7fa fix(column): Crash when heading is undefined (#4378) 2017-07-26 15:03:23 +02:00
Sorin Davidoi
6a6a62f13f Improve accessibility (part 2) (#4377)
* fix(column_header): Invalid ARIA role

* fix(column): Remove hidden nodes from the DOM

* refactor(column_link): Remove unused property hideOnMobile

* fix(column_header): Use aria-pressed

* fix(column_header): Make collapsed content not focusable, add focusable property

* fix(column_loading): Make header non-focusable

* fix(column_settings): Use role to group the toggles
2017-07-26 13:46:53 +02:00
Sorin Davidoi
2f8bfb3d38 Improve accessibility (#4369)
* fix(compose): Use nav and remove redundant aria-label

* fix(tabs_tab): Use nav and add aria-label

* fix(app): Add aria-label for settings toggle button

* chore: Run yarn manage:translations
2017-07-26 02:01:27 +02:00
Sorin Davidoi
23e854cb91 fix(components/bundle): Exit early in load function (#4349) 2017-07-25 01:05:44 +02:00
Sorin Davidoi
3757546f1b fix(columns_area): Show correct title for preview columns (#4310) 2017-07-23 14:03:35 +02:00
Sorin Davidoi
c1bc5e14eb feat(compose): More space on mobile devices (#4282)
* feat(compose): More space on mobile devices

* feat(compose): Hide navigation when typing on mobile devices

* fix(compose): Make animation faster

* fix(navigation_bar): Remove hardcoded title

* fix(compose): Prevent accidental bluring

* fix(compose): Increase max-height to 600px
2017-07-21 01:38:24 +02:00
Yamagishi Kazutoshi
3267e4a785 Add unfollow modal (optional) (#4246)
* Add unfollow modal

* unfollowing someone

* remove unnecessary prop
2017-07-18 17:14:43 +02:00
Yamagishi Kazutoshi
f5382ec085 Exclude self toots from regular expression filter (#4245)
* Exclude self toots from regular expression filter

* refactor
2017-07-18 15:20:38 +02:00
unarist
695439775e Fix column swiping (#4211)
This fixes broken behavior and enable animation only on swiping.
2017-07-15 17:25:04 +02:00
Eugen Rochko
3fbf1bf35a Fix #3773 - Pin favourites column (#4201) 2017-07-15 00:49:34 +02:00
Sorin Davidoi
a9067167bb Improve swiping (#4188)
* feat(components/columns_area): Toggle animation settings

* fix(components/media_modal): Center non-visible views

* fix(components/media_modal): Check for null

* refactor(columns_area): Better logic
2017-07-14 00:49:01 +02:00
Sorin Davidoi
a9a0c854e1 fix(components/media_modal): Style issues (#4187) 2017-07-13 22:18:18 +02:00
unarist
5abb3d8150 Rerender modal on property changes (#4175)
Render function for BundleContainer must not be methods.
React doesn't know dependency of the method, so they won't rerender on property updates.

In this case, when you close modal and open another modal immediately,
old modal will be open instead of new one.
2017-07-12 20:51:44 +02:00
Naoki Kosaka
b21ab498f8 Fix media modal prev button behavior. (#4158) 2017-07-11 19:56:45 +02:00
Sorin Davidoi
cc68d1945b refactor: Rewrite immutablejs import statements using destructuring (#4147) 2017-07-11 01:00:14 +02:00
Lynx Kotoura
1c6cbdd4e4 Fix duplication of tag in columns_area.js (#4131)
Deleted ">" just a typo.
2017-07-10 04:37:10 +02:00
Sorin Davidoi
4122a837fa fix(components/media_modal): Aspect ratio (#4128)
* fix(components/media_modal): Aspect ratio

* fix: Remove useless style
2017-07-09 18:49:07 +02:00
Sorin Davidoi
fc4c74660b Swipeable views (#4105)
* feat: Replace react-swipeable with react-swipeable-views

* fix: iOS 9
2017-07-09 15:02:26 +02:00
unarist
caf938562e Avoid async import if the component is previously loaded (#4127) 2017-07-09 14:52:03 +02:00
unarist
ce3a371eee Fix initial loading of pinned Notifications column (#4126) 2017-07-09 13:04:30 +02:00
Sorin Davidoi
37c832cdf7 refactor: Make all reducers sync (#4125) 2017-07-09 12:16:08 +02:00
Sorin Davidoi
91cacb1e8f fix: Rerender Bundle on route change (#4120) 2017-07-08 18:34:55 +02:00
unarist
46f5d3a2e9 Fix first loading of notifications when the column is pinned (#4114) 2017-07-08 17:22:24 +02:00