Commit Graph

172 Commits (6092325a486b25e831b2c102df77a32f24c9de2c)

Author SHA1 Message Date
ThibG ec135f2603 Fix scrolling behavior (#7151)
* Update React.JS

* Use React's new lifecycles for scrollable lists

* Clean up dead code

* Make CodeClimate happy
2018-04-16 21:04:24 +02:00
Emelia Smith 07ffc4fa11 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 7551951094.
2018-04-04 11:58:15 +02:00
unarist d88504ec84 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
Yuto Tokunaga 7551951094 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 e829c21cc6 Cache media (#6902) 2018-03-27 12:32:30 +02:00
Yamagishi Kazutoshi 8706d8a6eb Add polyfill for Object.values (#6697) 2018-03-08 13:07:25 +01:00
Yamagishi Kazutoshi 2dea9c5a1c Run tests with npm-run-all (#6688) 2018-03-08 04:43:57 +01:00
Akihiko Odaki c717f76652 Do not use npm (#6656)
Both of yarn and npm are used in Mastodon, but the combined usage requires
a redundant dependency and may lead to data inconsistency.

Considering that yarn has autoclean feature which npm does not have,
this change replaces all npm usage with yarn.

This change requires documentation update. Most notably, the following
command must be executed before assets precompilation if any system
dependency of node-sass has changed:

yarn install --force --pure-lockfile
2018-03-06 21:36:46 +01:00
TrashMacNugget d73bbd5830 Specify AGPLv3+ (#6546)
* Specify AGPLv3+

Since the documentation doesn't specify you can use Mastodon as AGPLv3 or any later version.

* Use newest version of SPDX AGPLv3+ identifier
2018-02-27 01:52:27 +01:00
Yamagishi Kazutoshi ea55e437f7 Upgrade ESLint to version 4.x (#6276) 2018-01-17 16:57:15 +01:00
Yamagishi Kazutoshi 4d91c45ce1 Add supported Node.js version to package.json (#6096) 2017-12-25 15:02:07 +01:00
Yamagishi Kazutoshi 8a2424e31a Update dependencies for Node.js (2017-12-03) (#5876)
* Update babel-plugin-lodash to version 3.3.2

* Update enzyme to version 3.2.0

* Update enzyme-adapter-react-16 to version 1.1.0

* Update intersection-observer to version 0.5.0

* Update intl-messageformat to version 2.2.0

* Update node-sass to version 4.7.2

* Update postcss-loader to version 2.0.9

* Update React to version 16.2.0

* Update react-textarea-autosize to version 5.2.1

* Update stringz to version 0.3.0

* Update webpack to version 3.9.1

* Update webpack-bundle-analyzer to version 2.9.1

* Update webpack-dev-server to version 2.9.5

* Update webpack-merge to version 4.1.1

* Update fsevents to version 1.1.3

* yarn upgrade
2017-12-03 16:55:53 +01:00
Yamagishi Kazutoshi f0d800d9a9 Update extract-text-webpack-plugin to version 3.0.2 (#5584) 2017-11-05 13:07:59 +01:00
Yamagishi Kazutoshi 178463a82f Remove babel-plugin-react-transform (#5582) 2017-11-01 17:49:46 +01:00
Yamagishi Kazutoshi 395a88eb5d Upgrade compression-webpack-plugin to version 1.0.1 (#5581) 2017-11-01 14:42:19 +01:00
Yamagishi Kazutoshi c858c1a2b8 Replace react-router-scroll to react-router-scroll-4 (#5568) 2017-11-01 06:58:38 +09:00
Yamagishi Kazutoshi 53d0c69dc0 Update dependencies for Node.js (2017-10-30) (#5565)
* Update autoprefixer to version 7.1.6

* Update babel-plugin-preval to version 1.6.1

* Update babel-plugin-transform-react-remove-prop-types to version 0.4.10

* Update babel-preset-env to version 1.6.1

* Update cross-env to version 5.1.1

* Update enzyme-adapter-react-16 to version 1.0.2

* Update eslint-plugin-import to version 2.8.0

* Update immutable to version 3.8.2

* Update express to 4.16.2

* Update intl-relativeformat to version 2.1.0

* Update postcss-loader to version 2.0.8

* Update react-immutable-pure-component to version 1.1.1

* Update react-motion to version 0.5.2

* Update react-notification to version 6.8.2

* Update react-overlays to version 0.8.3

* Update react-redux-loading-bar to version 2.9.3

* Update resolve-url-loader to version 2.2.0

* Update style-loader to version 0.19.0

* Update webpack to version 3.8.1

* Update webpack-dev-server to version 2.9.3

* yarn upgrade
2017-10-31 12:23:24 +01:00
masarakki 2fa2051ecf remove-duplicated-jest-config (#5465) 2017-10-19 13:51:38 +02:00
Yamagishi Kazutoshi 8c97598548 Enable coverage for Jest (#5442) 2017-10-18 11:39:36 +02:00
Yamagishi Kazutoshi dd505c5d8c Enable ESLint rules import/* (#5414)
* Enable ESLint rules import/*

* fix
2017-10-16 11:12:09 +02:00
Yamagishi Kazutoshi fb5040885c Replace JavaScript Testing Framework from Mocha to Jest (#5412) 2017-10-16 09:33:08 +02:00
Eugen Rochko f8ec132261 Track frequently used emojis in web UI (#5275)
* Track frequently used emojis in web UI

* Persist emoji usage, but debounce commits to the settings API

* Fix #5144 - Add tooltips to picker

* Display only 2 lines of frequently used emojis
2017-10-08 21:47:15 +02:00
Nolan Lawson 14db4829dc Update emoji-mart to v2.1.1 (#5256) 2017-10-07 12:17:02 +02:00
Eugen Rochko 32998720eb 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
Nolan Lawson 05842e15db Fix emoji sequence bug in substring-trie (#5191)
Fixes #5188
2017-10-03 13:11:22 +02:00
Eugen Rochko 2fac5e21c2 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 0b668dc4d3 Remove react-sizeme (#5143)
* Remove react-sizeme

* Fix aspect ratio in "sensitive" mode
2017-09-29 22:46:43 +02:00
Eugen Rochko 9ad1bfbc18 In detail status view, display attachment uncropped if there's only one (#5054)
* In detail status view, display attachment uncropped if there's only one

* Make media spoiler the size of the media it hides, enable on static
2017-09-24 05:58:30 +02:00
Eugen Rochko 16a5d1450c 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
Eugen Rochko f7810f56a1 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
Yamagishi Kazutoshi e082d777a4 Update react-intl to version 2.4.0 (#4820) 2017-09-06 16:25:19 +02:00
Sorin Davidoi 1a0d4d8fbc fix(mocha): Run all tests (#4433) 2017-07-28 22:53:16 +02:00
Yamagishi Kazutoshi a7e8fb346e Update webpack and related dependencies (without extract-text-webpack-plugin) (#4410) 2017-07-28 05:16:12 +02:00
Yamagishi Kazutoshi c2486004f2 Remove Storybook (#4397) 2017-07-27 22:30:27 +02:00
Yamagishi Kazutoshi fdea9d72bc Update intersection-observer to version 0.4.0 (#4398) 2017-07-27 16:20:48 +02:00
Sorin Davidoi 3e17162902 fix(column): Use passive wheel listener (#4348)
* chore(yarn): Install detect-passive-events

* fix(column): Use passive listener
2017-07-25 01:05:51 +02:00
Ondřej Hruška 15649f2799 Fix broken CSS reload due to webpack upgrade (#4250) 2017-07-18 18:42:45 +02:00
Yamagishi Kazutoshi beb1944379 Move babel-plugin-preval to dependencies (#4209) 2017-07-15 12:47:43 +02:00
Sorin Davidoi 8207918890 🎄🔨 Force tree shake emojione (#4202)
* chore(yarn): Install babel-plugin-preval as development dependency

* feat(babel): Add preval as a plugin

* feat(emojione_light): Prevaled module what tree-shaked emojione

* refactor(emoji): Use emojione_light

* feat: Preload emojione_picker bundle

* fix(emojione_light): Do not use Object.entries

* fix(emojify): Update tests

* chore(emojione_light): Remove silly ascii art
2017-07-14 20:30:12 +02:00
unarist e9f905bc87 Add object-fit polyfill for Edge (#4182) 2017-07-14 01:59:34 +02:00
Sorin Davidoi ecab38fd66 Web Push Notifications (#3243)
* feat: Register push subscription

* feat: Notify when mentioned

* feat: Boost, favourite, reply, follow, follow request

* feat: Notification interaction

* feat: Handle change of public key

* feat: Unsubscribe if things go wrong

* feat: Do not send normal notifications if push is enabled

* feat: Focus client if open

* refactor: Move push logic to WebPushSubscription

* feat: Better title and body

* feat: Localize messages

* chore: Fix lint errors

* feat: Settings

* refactor: Lazy load

* fix: Check if push settings exist

* feat: Device-based preferences

* refactor: Simplify logic

* refactor: Pull request feedback

* refactor: Pull request feedback

* refactor: Create /api/web/push_subscriptions endpoint

* feat: Spec PushSubscriptionController

* refactor: WebPushSubscription => Web::PushSubscription

* feat: Spec Web::PushSubscription

* feat: Display first media attachment

* feat: Support direction

* fix: Stuff broken while rebasing

* refactor: Integration with session activations

* refactor: Cleanup

* refactor: Simplify implementation

* feat: Set VAPID keys via environment

* chore: Comments

* fix: Crash when no alerts

* fix: Set VAPID keys in testing environment

* fix: Follow link

* feat: Notification actions

* fix: Delete previous subscription

* chore: Temporary logs

* refactor: Move migration to a later date

* fix: Fetch the correct session activation and misc bugs

* refactor: Move migration to a later date

* fix: Remove follow request (no notifications)

* feat: Send administrator contact to push service

* feat: Set time-to-live

* fix: Do not show sensitive images

* fix: Reducer crash in error handling

* feat: Add badge

* chore: Fix lint error

* fix: Checkbox label overlap

* fix: Check for payload support

* fix: Rename action "type" (crash in latest Chrome)

* feat: Action to expand notification

* fix: Lint errors

* fix: Unescape notification body

* fix: Do not allow boosting if the status is hidden

* feat: Add VAPID keys to the production sample environment

* fix: Strip HTML tags from status

* refactor: Better error messages

* refactor: Handle browser not implementing the VAPID protocol (Samsung Internet)

* fix: Error when target_status is nil

* fix: Handle lack of image

* fix: Delete reference to invalid subscriptions

* feat: Better error handling

* fix: Unescape HTML characters after tags are striped

* refactor: Simpify code

* fix: Modify to work with #4091

* Sort strings alphabetically

* i18n: Updated Polish translation

it annoys me that it's not fully localized :P

* refactor: Use current_session in PushSubscriptionController

* fix: Rebase mistake

* fix: Set cacheName to mastodon

* refactor: Pull request feedback

* refactor: Remove logging statements

* chore(yarn): Fix conflicts with master

* chore(yarn): Copy latest from master

* chore(yarn): Readd offline-plugin

* refactor: Use save! and update!

* refactor: Send notifications async

* fix: Allow retry when push fails

* fix: Save track for failed pushes

* fix: Minify sw.js

* fix: Remove account_id from fabricator
2017-07-13 22:15:32 +02:00
Yamagishi Kazutoshi 7507e7c8fe Update dependencies for Node.js (2017-07-12) (#4167)
* Update @storybook/addon-actions to version 3.1.8

* Update @storybook/react to version 3.1.8

* Update autoprefixer to version 7.1.2

* Update babel-loader to version 7.1.1

* Update babel-preset-env to version 1.6.0

* Update chai to version 4.1.0

* Update js-yaml to version 3.9.0

* Update jsdom to version 11.1.0

* Update postcss-smart-import to version 0.7.5

* Update sinon to version 2.3.7

* Update substring-trie to version 1.0.1

* Update webpack to version 3.2.0

* Update webpack-manifest-plugin to version 1.1.2

* yarn upgrade

* Upgrade extract-text-webpack-plugin to version 3.0.0

* Upgrade intl-relativeformat to version 2.0.0
2017-07-12 15:55:17 +02:00
Nolan Lawson d65ec2570c Use babel-plugin-transform-react-inline-elements (#4109) 2017-07-09 17:34:05 +02:00
Sorin Davidoi 420c4d8dc8 Swipeable views (#4105)
* feat: Replace react-swipeable with react-swipeable-views

* fix: iOS 9
2017-07-09 15:02:26 +02:00
Yamagishi Kazutoshi da380ee179 Update webpack-dev-server to v2.5.1 (#4094) 2017-07-07 14:12:45 +02:00
Yamagishi Kazutoshi 189c3c16a2 Change webpack-dev-server repository (#4061) 2017-07-04 15:19:54 +02:00
Yamagishi Kazutoshi 40a69352cc Upgrade chai-enzyme, precss and uws (#4010)
* Update chai-enzyme to v0.8.0

* Upgrade precss to v2.0.0

* Upgrade uws to v8.14.0
2017-07-03 11:56:58 +02:00
Nolan Lawson 28da1d54d5 Faster emojify() by avoiding str.replace() entirely (#4049) 2017-07-03 11:02:36 +02:00
Yamagishi Kazutoshi b8a4d69f71 Remove babel-cli (#4011) 2017-06-30 13:40:14 +02:00
Yamagishi Kazutoshi 022878b743 Upgrade jsdom to version 11.0.0 (#3994) 2017-06-29 13:03:03 +02:00