Commit Graph

141 Commits (0397c58b61d8a364ff488fc5631bfc751903c242)

Author SHA1 Message Date
Sorin Davidoi 8e4d1cba00 Lazy load toots using IntersectionObserver (#3191)
* refactor(components/status_list): Lazy load using IntersectionObserver

* refactor(components/status_list): Avoid setState bottleneck

* refactor(components/status_list): Update state correctly

* fix(components/status): Render if isIntersecting is undefined

* refactor(components/status): Recycle timeout

* refactor(components/status): Reduce animation duration

* refactor(components/status): Use requestIdleCallback

* chore: Split polyfill bundles

* refactor(components/status_list): Increase rootMargin to 300%

* fix(components/status): Check if onRef is not defined

* chore: Add note about polyfill bundle splitting

* fix(components/status): Reduce animation duration to 0.3 seconds
8 years ago
Nolan Lawson 1fd18a61bd Use node instead of babel-node for streaming (#3269) 8 years ago
Yamagishi Kazutoshi 860ffc0560 Focus the submit button (#3253)
Focus the submit button when confirmation modal is opened.

Also, changed cancellation link to button.
This makes the meaning clearer.
8 years ago
Nolan Lawson 60e2b951de Add webpack-bundle-analyzer for production builds (#3170) 8 years ago
Nolan Lawson 9d04de1c8d Only load Intl data for current language (#3130)
* Only load Intl data for current language

* Extract common chunk only from application.js and public.js

* Generate locale packs, avoid caching on window object
8 years ago
Yamagishi Kazutoshi 2e112e2406 Improve eslint rules (#3147)
* Add semi to ESLint rules

* Add padded-blocks to ESLint rules

* Add comma-dangle to ESLint rules

* add config/webpack and storyboard

* add streaming/

* yarn test:lint -- --fix
8 years ago
Yamagishi Kazutoshi 4a3db71692 Remove react-autosuggest (#3140)
react-autosuggest is added from c49f6290eb

Dependence removed from b27066e154
8 years ago
Yamagishi Kazutoshi dc559d6b7a Downgrade eslint-plugin-jsx-a11y to v4.0.0 (#3131)
In Code Climate, eslint-plugin-jsx-a11y v4.0.0 is used.
Therefore, it seems that a warning is displayed.

ref https://github.com/codeclimate/codeclimate-eslint/pull/273
8 years ago
Sorin Davidoi f18a6c2cf2 feat(babel): Strip prop types (#3122)
* feat(babel): Strip prop types

* chore(babel): Indent

* fix(babel): Move babel-plugin-transform-react-remove-prop-types to dependencies
8 years ago
Nolan Lawson 4cc8ddabe5 Add transform-runtime for smaller Babel helpers (#3116) 8 years ago
Yamagishi Kazutoshi 72c8562cc9 Use babel-preset-env on Streaming Server (#2998)
* Use babel-preset-env on Streaming Server

Change the streaming server to use babel-preset-env as well as asset compilation.
This shortens the load time at first boot.

* remove babel-plugin-lodash
8 years ago
Yamagishi Kazutoshi 882e4f5322 Remove Babel plugin for ES Modules (#2975)
* Remove Babel plugin for ES Modules

Processing of ES Modules is executed by Webpack.
Don't have to do it on Babel side.

* Add plugin for test
8 years ago
Daigo 3 Dango 66328adf83 Rebuild node-sass (#3002)
Got an error in asset precompile on Heroku:
Module build failed: Error: ENOENT: no such file or directory, scandir '/tmp/.../node_modules/node-sass/vendor'

ref: https://github.com/rails/webpacker#troubleshooting
8 years ago
Yamagishi Kazutoshi 2991a7cfe6 Use ES Class Fields & Static Properties (#3008)
Use ES Class Fields & Static Properties (currently stage 2) for improve class outlook.

Added babel-plugin-transform-class-properties as a Babel plugin.
8 years ago
Yamagishi Kazutoshi 654f4f62ed Remove dependencies that are no longer needed now (#2999)
There are some dependencies that are no longer needed anymore.
As a result, it took more time to install the package than necessary.

I want to delete them and shorten the installation time.
8 years ago
Nolan Lawson 0ec77c5b3e Add dynamic polyfills for older browsers (#2985)
Fixes #2941
8 years ago
Yamagishi Kazutoshi 42eb841dc2 Remove jquery-ujs (#2939)
* Remove jquery-ujs

* fix for eslint
8 years ago
Yamagishi Kazutoshi f000673599 Remove local_time gem, and add similar (#2875) 8 years ago
Nolan Lawson 5b6c2a1e72 upgrade emojione-picker (#2874) 8 years ago
Nolan Lawson df81bc4a97 add asynchronous emojione-picker (code-splitting) (#2863) 8 years ago
Koala Yeung 6f71cfeff9 Eslintrc fix (#2850)
* eslintrc: adapt changes in eslint-plugin-jsx-a11y

* Replace 'jsx-a11y/img-has-alt' with 'jsx-a11y/alt-text'.
  Reference: evcohen/eslint-plugin-jsx-a11y@24b6193

* Replace 'jsx-a11y/onclick-has-focus' with 'jsx-a11y/interactive-supports-focus'
  Reference: evcohen/eslint-plugin-jsx-a11y@cbdfeb8

* Replace 'jsx-a11y/onclick-has-role' with 'jsx-a11y/no-noninteractive-element-interactions'
  Reference: evcohen/eslint-plugin-jsx-a11y@18c9b71

* Update eslint-plugin-jsx-a11y to 5.0.0

Follow the change in Code Climate. Make sure the same eslintrc
can be executed locally and in Code Climate.

* Convert .eslintrc.json to equivlant .eslintrc.yml

* Less quotes and commas, more readability, allow comment.
8 years ago
Eshin Kunishima 67b7d3d3b6 Replace ws with uws (#2807)
* Replace ws with uws

* fix indent

* Adjust indentation

* remove trailing space
8 years ago
Nolan Lawson 553e13144f remove legacy decorators, use lodash.debounce (#2830) 8 years ago
Yamagishi Kazutoshi 494945ff4f Move babel-plugin-lodash to dependencies from devDependencies (#2831) 8 years ago
Nolan Lawson 37caf0b36e separate .babelrc for prod/dev, add babel-plugin-lodash (#2829) 8 years ago
Koala Yeung cf0b753209 Streamline javascript translation by improving translationRunner (#2808)
* package.json: Add "build:*" targets

* Improve react-intl-translations-manager workflow.
  * Added "build:production" to build production bundle.
  * Added "build:development" to build development bundle.

* Fix json translation files

* Run `yarn manage:translations` to fix translation files.
* Fix `pl.json` for syntax error.

* translationRunner: auto detect existing languages

* Auto detect existing rfc5646 language tag in *.json filenames
  in `app/javascript/mastodon/locale` folder. No need to manually
  define every new language in the languages array here.

* translationRunner: add more functionality

* Allow script user to specify language code to check.
* Added available language check.
* Added --force flag to force creation of unexists language.
* Added --help flag and help messages.

* gitignore: ignore npm-debug.log

* Fix webpack error if NODE_ENV is not defined

Default to use 'development' in config/webpack/configuration.js
8 years ago
Yamagishi Kazutoshi e95983f5df Decode IDNA in PreviewCard (#2781) 8 years ago
Eugen Rochko f5bf5ebb82 Replace sprockets/browserify with Webpack (#2617)
* Replace browserify with webpack

* Add react-intl-translations-manager

* Do not minify in development, add offline-plugin for ServiceWorker background cache updates

* Adjust tests and dependencies

* Fix production deployments

* Fix tests

* More optimizations

* Improve travis cache for npm stuff

* Re-run travis

* Add back support for custom.scss as before

* Remove offline-plugin and babili

* Fix issue with Immutable.List().unshift(...values) not working as expected

* Make travis load schema instead of running all migrations in sequence

* Fix missing React import in WarningContainer. Optimize rendering performance by using ImmutablePureComponent instead of
React.PureComponent. ImmutablePureComponent uses Immutable.is() to compare props. Replace dynamic callback bindings in
<UI />

* Add react definitions to places that use JSX

* Add Procfile.dev for running rails, webpack and streaming API at the same time
8 years ago
Michael Deeb e4c294432f Added the repository field and a script for after npm version (#2459) 8 years ago
Ash Furrow 48652cb41e Fixes string length issue for multibyte characters. (#2443) 8 years ago
Keiji, Yoshimi 2bf7e81ed5 update emojione-picker for fixed warnings. (#2324) 8 years ago
Yamagishi Kazutoshi 1948f9e767 Remove deprecated features at React v15.5 (#1905)
* Remove deprecated features at React v15.5

- [x] React.PropTypes
- [x] react-addons-pure-render-mixin
- [x] react-addons-test-utils

* Uncommented out & Add browserify_rails options

* re-add react-addons-shallow

* Fix syntax error from resolve conflicts

* follow up 59a77923b3
8 years ago
Mingye Wang b00f4a0cf3 Use new ESLint filename (.json) (#2248)
* Use new ESLint filename (.json)

Codeclimate's ESLint 3 is complaining about the old filename. Let me try changing it.

* point eslint to new rc

(squash this)
8 years ago
Christoph Witzany 556f68ab15 Make Docker image buildable on ARM (#2065)
* after yarn upgrade

* after manually removing node-gyp as top level dependency
8 years ago
Alda Marteau-Hardi 77d1447ac4 Add the licence key in package.json (#1914) 8 years ago
Zac Anger f4045ba3d9 Add eslint-plugin-jsx-a11y (#1651)
* Add eslint-plugin-jsx-a11y.

* Fix npm script.

* Adjust npm scripts so test also runs lint.

* Fix existing lint errors.

* Don't break on a11y issues.

* Add role and tabIndex.

* Add vim and Mac files to .gitignore and .dockerignore.

* Handle htmlFor (partially), a that's actually a button.

* Fix missing tabIndex.

* Add cursor:pointer to load-more

* Revert change to load_more.

* Fixes based on review.

* Update yarn.lock.

* Don't try to install fsevents on Linux (hides warning noise).
8 years ago
Eugen b22b2cbfac Fix #1491 - Fix broken notifications, broken Link header parsing for exclude_types (#1548) 8 years ago
Gavin Mogan 3672a799d4 Dev Tooling fixes (eslint/editorconfig) (#1398)
* Add eslint to dev dependancies so it gets installed for the repo

yarn add --dev eslint babel-eslint eslint-plugin-reac

project specific version of eslint, you can globally install eslint-cli
if you want the global runtime, or add .bin to your path

* fix eslint errors about inconsitent returns

* eslint ignore the same as git ignore. allows for eslint .

* Add editorconfig file so everyones editor will be setup to follow the same standards
8 years ago
Eugen Rochko 333e44c3fc Improve emojis - use SVGs where possible 8 years ago
Eugen Rochko 952bce3023 Replace howler.js with simple <audio />, will hopefully resolve
some weird mobile browser behaviours
8 years ago
Eugen Rochko 89fc2d7f48 Fix #372 - Emoji picker 8 years ago
Eugen Rochko b44dd38360 Fix broken dependency on inner react utility function 8 years ago
Eugen Rochko 2c50687279 Improve compose form performance, upgrade JS dependencies. LightingBox
now allows to cycle through multiple images
8 years ago
Eugen Rochko 4d2be9f432 Add unique request IDs to streaming API to improve logs 8 years ago
Eugen Rochko b5bf807a34 Remove react-dnd as it was interfering with text selection. Move content
warning mentions preview into area where actual content would be
8 years ago
Eugen Rochko dbb7e5a644 Getting started on draggable columns 8 years ago
Eugen Rochko ccb8ac8573 Make the streaming API also handle websockets (because trying to get the browser EventSource interface to
work flawlessly was a nightmare). WARNING: This commit makes the web UI connect to the streaming API instead
of ActionCable like before. This means that if you are upgrading, you should set that up beforehand.
8 years ago
Eugen Rochko 1ee4a17f37 Add logging and filtering to the node.js streaming API 8 years ago
Eugen Rochko 0cfd3188b4 Add streaming API in Node.js 8 years ago
Eugen Rochko fcb5a85cdd Add sounds for notifications. Boop by @jk@mastodon.social 8 years ago
Eugen Rochko da5d366230 Fix #414 - Improve lightbox, add loading indicator 8 years ago
Eugen Rochko 7951e7ffd5 Add ruby version to Gemfile, move devDependencies in package.json to dependencies,
fix bug in process feed service
8 years ago
Eugen Rochko 312c51b5c8 Home column filters 8 years ago
Eugen Rochko 989c3f4002 Add tab bar alternative to desktop UI, upgrade react & react-redux 8 years ago
Jessica Stokes 28a2f79dff
Upgrade EmojiOne to 2.2.7
Adds support for, among other things, 🏳️‍🌈
8 years ago
Eugen 9e6ceb3201 Revert "Display native emoji on browsers which support it" 8 years ago
Misty De Meo c318e6e42e Display native emoji on browsers which support it 8 years ago
Eugen Rochko b27066e154 Re-implemented autosuggestions component for the compose form
Fix #205, fix #156, fix #124
8 years ago
Eugen Rochko bf5f8a2449 Fix #341 - Remove react-responsive in favour of simpler resize handler/window width 8 years ago
Eugen Rochko 2112a81e86 Adding content sensitivity toggle, spoilers for media 8 years ago
Eugen Rochko 0293a7dd49 Updating some npm packages 8 years ago
Eugen Rochko a6e4f754fc Add an Intl polyfill 8 years ago
Eugen Rochko 01e43c3e57 Adding react-intl i18n to the frontend. No translations yet 8 years ago
Eugen Rochko dbfe1e4be6 Infinite scroll for followers/following lists 8 years ago
Eugen Rochko c4eb63c1d4 Debounce autosuggestions requests 8 years ago
Eugen Rochko 82fd74d101 Fix modals sizing and add animation to it, fix #140 by only making the text of
status clickable (this also fixes multiple dropdown being openable at the same
time)
8 years ago
Eugen Rochko 86574ea524 Adding Emoji One 8 years ago
Eugen Rochko d0d799f911 Replace react-skylight with own solution that centers images better 8 years ago
Eugen Rochko c49f6290eb Basic username autocomplete for text area 8 years ago
Eugen Rochko de50eff6ac Add opening images in a modal window 8 years ago
Eugen Rochko 8698cd3281 Remember scroll position when navigating back, do not needlessly reload
entire timelines (only fetch since last known ID). Side effect: account
timelines no longer update in real-time
8 years ago
Kai Schaper b113cf97fb add chai-enzyme; add/improve Avatar component specs 8 years ago
Eugen Rochko 45776b55b0 Responsively changing layout to single-column + nav on smaller screens 8 years ago
Eugen Rochko ffaba617d2 Merge in react-storybook, add yarn lockfile 8 years ago
Kai Schaper 71e7537330 setup React Storybook; add example story for LoadingIndicator component 8 years ago
Kai Schaper e0a4455622 add sinon; add basic Button component test 8 years ago
Kai Schaper 998f161e1d add jsdom; add basic Avatar component test 8 years ago
Kai Schaper 1a1b9bbbc0 add required peer dependency 8 years ago
Kai Schaper d7c55853e9 set up Mocha/Chai/Enzyme for React component unit testing 8 years ago
Eugen Rochko b0168c8f3c Install npm 3 in docker (v3 warns on invalid peer dependencies instead of failing) 8 years ago
Eugen Rochko ef9d4f4e06 Use reselect to memoize denormalization in UI state
Also upgrade react-redux to latest version. This is a performance update
8 years ago
Eugen Rochko e63aebff7a Adding landing page 8 years ago
Eugen Rochko 337462aa5e Re-organizing components to be more modular, adding loading bars 8 years ago
Eugen Rochko d6a64f45fd Adding a notification stack for error messages 8 years ago
Eugen Rochko 0077fc26df Merge and unmerge timelines on follow/unfollow, solves #21, #22 8 years ago
Eugen Rochko c249ceb10c Reblogs fixed 8 years ago
Eugen Rochko 72591cc6d5 Cleaning up action names and compose drawer 8 years ago
Eugen Rochko 92afd29650 The frontend will now be an OAuth app, auto-authorized. The frontend will use an access token for API requests
Adding better errors for the API controllers, posting a simple status works from the frontend now
8 years ago
Eugen Rochko 44e57f64dd Improving statuses, adding a composer drawer, which doesn't work yet 8 years ago
Eugen Rochko a541e937ca More styling for statuses 8 years ago
Eugen Rochko 49520d6e62 Adding React.js, Redux, revamping dashboard 8 years ago