Commit graph

271 commits

Author SHA1 Message Date
Eugen Rochko 12e7c81dd8 Turn report screen into a modal (#3965) 2017-06-27 18:07:21 +02:00
Sorin Davidoi be92babd00 Responsive images in media gallery (#3963)
* feat(components/media_gallery): Responsive images

* fix(components/media_gallery): Link to image URL
2017-06-27 13:46:37 +02:00
PFM 099a3b4eac Fix "undefined" in className (#3939) 2017-06-25 16:02:56 +02:00
unarist 21c2bc119c Clean column collapsible (#3931)
* Remove unused column_collapsable.js
* Remove old styles
* Extract `> div`  style to independent class
2017-06-24 23:18:11 +02:00
Daniel Hunsaker c0979381a4 Fix a typo and give CW'd statuses the right cursor (#3918) 2017-06-23 23:13:27 +02:00
Yamagishi Kazutoshi c1a8e3d1eb Use Class and Property Decorators (#3730)
ref https://tc39.github.io/proposal-decorators/
2017-06-23 19:36:54 +02:00
Yamagishi Kazutoshi eff9416469 Remove unused variables (#3906) 2017-06-23 16:05:04 +02:00
unarist cc382c5006 Don't attach IntersectionObserver for wrapped statuses (#3883)
(This patch has been merged as bugfix and reverted, but still valuable as
improvement)

Previously, we've attached IntersectionObserver twice for boosted statuses:
wrapper Status and wrapped Status. but wrapped Status don't need to manage
intersection and visibility by itself, because it's a part of wrapper Status.
2017-06-21 06:47:36 +02:00
Eugen Rochko 946a166791 Revert #3851 (#3878) 2017-06-21 01:37:15 +02:00
Eugen Rochko 31cd649041 Revert "Don't attach IntersectionObserver for wrapped statuses" (#3877)
* Revert "Bump version to 1.4.4"

This reverts commit 1585b0c6cc.

* Revert "Fix conversations (fixes #3869) (#3870)"

This reverts commit 15b43f555d.

* Revert "Fix streaming server. Redis connection subscribe for each channel. (#3828)"

This reverts commit d8ec832806.

* Revert "Filter direct statuses in Status.as_home_timeline (#3842)"

This reverts commit bab5a18232.

* Revert "Fix RemoteFollow behavior (#3868)"

This reverts commit a20cf3b64e.

* Revert "Update fabricator for MediaAttachment to attach a file according to type (#3862)"

This reverts commit 356df7ae6b.

* Revert "Upgrade React Router (#3677)"

This reverts commit 8f03fdce7f.

* Revert "Do not call setState from unmounted component (#3853)"

This reverts commit 1fc6cb4997.

* Revert "Replace TextIconButton for SensitiveButton to IconButton (#3759)"

This reverts commit eb832e88f4.

* Revert "Fix RTL detection on Ruby side (#3867)"

This reverts commit b16b69350e.

* Revert "i18n: Fixed typo in Polish translation (#3864)"

This reverts commit da6fa029f6.

* Revert "Don't attach IntersectionObserver for wrapped statuses (#3863)"

This reverts commit 94ad0706f5.
2017-06-21 01:33:14 +02:00
Sorin Davidoi 8f03fdce7f Upgrade React Router (#3677)
* chore(yarn): Remove react-router

* chore(yarn): Remove react-router-scroll

* chore(yarn): Remove history

* chore(yarn): Add react-router-dom

* chore: Remove usages of react-router-scroll

* refactor: Upgrade to react-router-web

* refactor: Use fork of react-router-scroll

This reverts commit 2ddea9a6c8d39fc64b7d0b587f3fbda7a45a7fa2.

* fix: Issues mentions in the PR feedback
2017-06-20 20:40:03 +02:00
alpaca-tc 1fc6cb4997 Do not call setState from unmounted component (#3853)
Stop an executing task if the component already unmounted.
2017-06-20 20:37:09 +02:00
unarist 94ad0706f5 Don't attach IntersectionObserver for wrapped statuses (#3863)
This fixes a bug that sometimes boosted statuses being hidden on scrolling.

Previously, we've attached IntersectionObserver twice for boosted statuses:
wrapper Status and wrapped Status. This will call intersection handler twice,
so this may results race condition...probably.
2017-06-20 04:12:51 +02:00
unarist bf8c2c4348 Clicking on the CW text should expand the status (#3855) 2017-06-20 01:34:10 +02:00
unarist aa58cca040 Set cursor:pointer only when necessary (#3857) 2017-06-19 18:27:07 +02:00
alpaca-tc cf6fe4f8cb Unobserve status on unmount (#3851) 2017-06-19 11:29:57 +02:00
Nolan Lawson 1f2abd8d67 Fix jittery scrolling for Chromium browsers (#3776) (#3832) 2017-06-18 02:59:29 +02:00
Sorin Davidoi 0f52e42c2d fix(status): Content jump due to height changes (#3734) 2017-06-13 20:46:21 +02:00
Eugen Rochko 37dbfa4cd7 Unread indicator was invisible behind column header, adjusted (#3720)
* Unread indicator was invisible behind column header, adjusted

* Unread indicator now a CSS pseudo-element

* Adjust flex
2017-06-12 20:02:17 +02:00
Eugen Rochko 8015fd7600 Improve RTL detection (#3682)
- Use plaintext
- Strip out URLs
- Strip out mentions
- Strip out hashtags
- Strip out whitespace from "overall" count
- Consistent between JS and Ruby
2017-06-10 15:06:50 +02:00
Sorin Davidoi 8cf8ce4ac0 fix(components/autosuggest_textarea): Race condition regarding onBlur (#3631) 2017-06-07 20:05:53 +02:00
ふぁぼ原 7623766241 Add regex filters on the community timeline and the public timeline. (#3564)
* Add regex filter on the community timeline and the public timeline

* correcting

* Adjust the height of header buttons

* Remove trailing spaces

* Remove trailing spaces

* Solve some code duplication

* reset the state of the locale files in app/javascript/mastodon/locales

* adjust to upstream

* adjust to upstream

* change keys of locale settings
2017-06-06 16:56:10 +02:00
Yamagishi Kazutoshi d8ae3efec3 Improve ESLint rules for JSX (#3608)
* Add react/no-string-refs ESLint rule

* Add react/jsx-boolean-value ESLint rule

* Add react/jsx-closing-bracket-location ESLint rule

* Add react/jsx-indent ESLint rule

* Add react/jsx-curly-spacing ESLint rule

* Add react/jsx-equals-spacing ESLint rule

* Add react/jsx-first-prop-new-line ESLint rule

* Add react/jsx-no-duplicate-props ESLint rule

* Add react/jsx-tag-spacing ESLint rule
2017-06-06 13:20:07 +02:00
Yamagishi Kazutoshi 7a7bfa5170 Add quotes ESLint rules (#3602)
* Add quotes ESLint rule

* Add jsx-quotes ESlint rule

* Sort ESLint rules
2017-06-06 03:56:36 +02:00
Yamagishi Kazutoshi e969c78645 Disable ESLint rule jsx/anchor-has-content (#3601) 2017-06-06 03:55:56 +02:00
unarist 61fcdbbf7e Add back button to hashtag timeline again (#3587) 2017-06-05 17:10:40 +02:00
unarist c26cea262b Prevent pinned columns from scroll to top on URL changing (#3586) 2017-06-05 15:20:46 +02:00
Eugen Rochko 8ee2eb5d2e Allow mounting arbitrary columns (#3207)
* Allow mounting arbitrary columns

* Refactor column headers, allow pinning/unpinning and moving columns around

* Collapse animation

* Re-introduce scroll to top

* Save column settings properly, do not display pin options in
single-column view, do not display collapse icon if there is
nothing to collapse

* Fix one instance of public timeline being closed closing the stream
Fix back buttons inconsistently sending you back to / even if history exists

* Getting started displays links to columns that are not mounted
2017-06-04 01:39:38 +02:00
Nolan Lawson 3363f2f4d6 Fix isIntersecting in Chrome (#3525) 2017-06-03 14:43:10 +02:00
Yamagishi Kazutoshi fda5c699c2 Add ESLint rule (object-curly-spacing) (#3498) 2017-06-01 17:25:10 +02:00
Nolan Lawson 0e12a8dab9 Improve scheduling of requestIdleCallback tasks (#3477) 2017-05-31 15:11:33 +02:00
Yamagishi Kazutoshi b1d4b74a44 Change PureComponent to ImmutablePureComponent (#3460)
* Change PureComponent to ImmutablePureComponent

Change PureComponent to ImmutablePureComponent in AttachmentList.

* rm React.
2017-05-31 02:14:26 +02:00
Nolan Lawson 34a93ccf57 Add IntersectionObserverWrapper to cut down on re-renders (#3406) 2017-05-29 18:17:51 +02:00
Nolan Lawson b5e8994844 Prevent wasted render in load_more.js (#3402) 2017-05-29 17:52:45 +02:00
Nolan Lawson 24d645b7d0 Fix IntersectionObserver isIntersecting in Edge (#3365) 2017-05-28 16:45:42 +02:00
Nolan Lawson 28cbfb9f10 Simplify isIntersecting in status_list.js (#3371) 2017-05-28 16:26:35 +02:00
Eugen Rochko c48772fd3f Introduce react-textarea-autosize instead of using style.height side effects (#3334) 2017-05-26 18:22:23 +02:00
Yamagishi Kazutoshi 4b11675bdc Change anchor to button element (#3321)
Fix warning for ESLint (jsx-a11y/href-no-hash).
2017-05-26 14:10:37 +02:00
unarist c6db416ff7 Fix "Cannot read property" on missing status (#3322)
I've found this issue when I clicked replies to muted user on the timeline.

Properties I've removed in here were added with lazy loading using
IntersectionObserver (8e4d1cba), but those statuses are not need to be
tracked anyway because it will be rendered as only empty div.
2017-05-26 14:07:48 +02:00
Nolan Lawson b00cb2aed3 Improve shouldComponentUpdate for status and status_action_bar (#3323) 2017-05-26 14:05:52 +02:00
Nolan Lawson 7c67cb5997 implement shouldComponentUpdate for relative_timestamp (#3320) 2017-05-26 03:25:41 +02:00
unarist 3e3ec9b2c8 Fix an error on dragging into status_content component (#3308) 2017-05-25 16:27:44 +02:00
Nolan Lawson 71b266377c Remove unnecessary action bar wrapper divs (#3299) 2017-05-25 14:15:12 +02:00
Yamagishi Kazutoshi 3572138b16 Fix hovering default value for avatar component (#3290) 2017-05-25 03:08:05 +02:00
unarist 9f69aa3cb1 Prevent contents of the status placeholder from overflowing (#3287)
Since long lines may overflow and cause the status-list horizontally scrollable,
I added `overflow: hidden` to placeholder contents to prevent it.
2017-05-25 02:23:54 +02:00
Yamagishi Kazutoshi 1ec7c87001 Remove unnecessary constructors (#3280) 2017-05-24 17:55:16 +02:00
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
2017-05-24 17:55:00 +02:00
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.
2017-05-23 13:10:41 +02:00
Yamagishi Kazutoshi 1d436a4322 Refactoring. Removed useless import. (#3254)
original: https://github.com/tootsuite/mastodon/pull/2618
2017-05-23 13:08:01 +02:00
unarist 361a606edb Keep children of the column-collapsable until the transition is completed (#3218) 2017-05-22 15:01:27 +02:00
unarist 07af8c05fd Fix "Edit profile" on the account action bar (#3222) 2017-05-22 14:57:50 +02:00
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
2017-05-20 17:31:47 +02:00
Nolan Lawson 419226d1f6 Remove unnecessary status__info-time div (#3172) 2017-05-20 16:48:49 +02:00
Sorin Davidoi 2c405aed55 Performance improvements (#3168)
* refactor(components/status_list): Avoid quering scrollTop if not necessary

* refactor(components/dropdown_menu): Do not render items if not expanded

* refactor: Cherry-pick react-motion imports

* refactor(compose/privacy_dropdown): Do not render options if not open

* refactor(components/column_collapsable): Do not render children if collapsed
2017-05-20 14:58:13 +02:00
Eugen Rochko de475cf8d3 Add account media gallery view to web UI (#3120)
* Add account media gallery view to web UI

* Link media view from account dropdown

* Adjust link
2017-05-20 01:28:25 +02:00
Sorin Davidoi 1548695c83 Avoid useless renders (#3141)
* feat(eslint): Set react/jsx-no-bind: error

* refactor(notifications/setting_toggle): Do not use bind

* refactor(components/dropdown_menu): Do not use bind

* refactor(components/autosuggest_textarea): Do not use bind

* refactor(compose/privacy_dropdown): Do not use bind

* refactor(compose/upload_form): Do not use bind

* refactor(components/status): Do not use bind

* refactor(components/onboarding_modal): Do not use bind

* refactor: PR feedback

* chore(notifications/setting_toggle): Lint

* refactor: PR feedback
2017-05-19 20:58:12 +02:00
Yamagishi Kazutoshi b8b7b506a2 Replace inline styles with stylesheet (#3115) 2017-05-19 11:42:54 +02:00
unarist 3722f90865 Make .column-collapse animation simple (#3086)
* Always set `overflow: auto` to allow scroll just after opening
* Remove bounce animation which may cause unintended behavior due to max-height
* Use CSS transition instead of react-motion
* Some CSS refactoring including className changing
2017-05-17 00:24:46 +02:00
Eugen Rochko 191696ab30 Fix #2646 - Do not override ctrl/cmd+click on Permalinks (#3073) 2017-05-15 22:36:38 +02:00
Eugen Rochko d0dd9eb5b5 Feature conversations muting (#3017)
* Add <ostatus:conversation /> tag to Atom input/output

Only uses ref attribute (not href) because href would be
the alternate link that's always included also.

Creates new conversation for every non-reply status. Carries
over conversation for every reply. Keeps remote URIs verbatim,
generates local URIs on the fly like the rest of them.

* Conversation muting - prevents notifications that reference a conversation
(including replies, favourites, reblogs) from being created. API endpoints
/api/v1/statuses/:id/mute and /api/v1/statuses/:id/unmute

Currently no way to tell when a status/conversation is muted, so the web UI
only has a "disable notifications" button, doesn't work as a toggle

* Display "Dismiss notifications" on all statuses in notifications column, not just own

* Add "muted" as a boolean attribute on statuses JSON

For now always false on contained reblogs, since it's only relevant for
statuses returned from the notifications endpoint, which are not nested

Remove "Disable notifications" from detailed status view, since it's
only relevant in the notifications column

* Up max class length

* Remove pending test for conversation mute

* Add tests, clean up

* Rename to "mute conversation" and "unmute conversation"

* Raise validation error when trying to mute/unmute status without conversation
2017-05-15 03:04:13 +02:00
Paul bc1a91f4cd Fix only typo (#3035) 2017-05-14 12:58:50 +02:00
beatrix fd03a3d957 tiny js fix for 'show more' button in chrome (#3045) 2017-05-13 22:07:58 +02:00
beatrix 3dcb5fa28f Revert HTML CW changes (#3020)
* selectively Revert "Fix regressions from #2683 (#2970)"

This reverts commit 72698bc3b4.

* Revert "Handle hashtags in spoiler_texts (partial fix for #699) (#2683)"

This reverts commit e2491680e6.
2017-05-13 04:03:43 +02:00
Eugen Rochko 1d5dcfcd46 Make direct statuses stand out more (#3025)
Resolves #2515
2017-05-13 01:38:51 +02:00
Wonderfall b65950bb2e fix #3008 : props was not defined (#3022) 2017-05-12 20:58:41 +02:00
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.
2017-05-12 14:44:10 +02:00
Yamagishi Kazutoshi 44a3584e2d Remove unnecessary message in video player (#3007)
Remove unnecessary messages added in #1879.
It is duplicated with other keys, causing the correct message not to be displayed.
2017-05-12 14:43:06 +02:00
Eugen Rochko 72698bc3b4 Fix regressions from #2683 (#2970)
* Fix regressions from #2683

Properly format spoiler text HTML, while keeping old logic for blankness intact
Process hashtags and mentions in spoiler text
Format spoiler text for Atom
Change "show more" toggle into a button instead of anchor
Fix style regression on dropdowns for detailed statuses

* Fix lint issue

* Convert spoiler text to plaintext in desktop notifications
2017-05-11 00:28:10 +02:00
fusshi- 29d8313b28 Disabled auto focus on toot form when search results are shown. (#2942) 2017-05-10 02:51:43 +02:00
kawax 383c0b7802 Show boosted user's avatar (#2518)
* Show boosted user's avatar

* add .status__avatar-boost

* margin

* apply to notifications too.

* account__avatar-boost

* Add inline prop to Avatar component

* Add AvatarOverlay component

* rename mixins.scss

* move files for latest master

* fixed for webpack
2017-05-03 11:43:37 +02:00
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
2017-05-03 02:04:16 +02:00