Commit Graph

81 Commits

Author SHA1 Message Date
Sorin Davidoi
348d6f5e75 Lazy load components (#3879)
* feat: Lazy-load routes

* feat: Lazy-load modals

* feat: Lazy-load columns

* refactor: Simplify Bundle API

* feat: Optimize bundles

* feat: Prevent flashing the waiting state

* feat: Preload commonly used bundles

* feat: Lazy load Compose reducers

* feat: Lazy load Notifications reducer

* refactor: Move all dynamic imports into one file

* fix: Minor bugs

* fix: Manually hydrate the lazy-loaded reducers

* refactor: Move all dynamic imports to async-components

* fix: Loading modal style

* refactor: Avoid converting the raw state for each lazy hydration

* refactor: Remove unused component

* refactor: Maintain modal name

* fix: Add as=script to preload link

* chore: Fix lint error

* fix(components/bundle): Check if timestamp is set when computing elapsed

* fix: Load compose reducers for the onboarding modal
2017-07-08 00:06:02 +02:00
Damien Erambert
18d3fa953b Add a setting allowing the use of system's default font in Web UI (#4033)
* add a system_font_ui setting on the server

* Plug the system_font_ui on the front-end

* add EN/FR locales for the new setting

* put Roboto after all other fonts

* remove trailing whitespace so CodeClimate is happy

* fix user_spec.rb

* correctly write user_spect this time

* slightly better way of adding the classes

* add comments to the system-font stack for clarification

* use .system-font for the class instead

* don't use multiple lines for comments

* remove trailing whitespace

* use the classnames module for consistency

* use `mastodon-font-sans-serif` instead of Roboto directly
2017-07-06 22:39:56 +02:00
abcang
f76e71825d Improve Activity stream spoiler (#4088) 2017-07-06 21:31:03 +02:00
Mantas
34c8a46d7d Remove ugly blue highlight on Android browsers (#4031) 2017-07-06 21:26:07 +02:00
Shin Kojima
e7c0d87d98 Fix embedded SVG fill attribute (#4086)
* Fix embedded SVG fill attribute

SCSS darken/lighten functions may not return a color value, but a color
name like "white".  See following example:

https://www.sassmeister.com/gist/c41da93b87d536890ddf30a1f42e7816

This patch will normalize $color argument to FFFFFF style.

I also changed the function name from "url-friendly-colour" to
"hex-color", Because...

1. The name "url-friendly" is not meaningful enough to describe what it
   does.

2. It is familier to me using "color" rather than "colour"

    kojima:kojiMac mastodon[master]$ git grep -l colour
    app/javascript/styles/boost.scss
    spec/fixtures/files/attachment.jpg

    kojima:kojiMac mastodon[master]$ git grep -l color
    .rspec
    .scss-lint.yml
    Gemfile.lock
    app/javascript/mastodon/features/status/components/action_bar.js
    app/javascript/styles/about.scss
    app/javascript/styles/accounts.scss
    app/javascript/styles/admin.scss
    app/javascript/styles/basics.scss
    app/javascript/styles/boost.scss
    app/javascript/styles/compact_header.scss
    app/javascript/styles/components.scss
    app/javascript/styles/containers.scss
    app/javascript/styles/footer.scss
    app/javascript/styles/forms.scss
    app/javascript/styles/landing_strip.scss
    app/javascript/styles/reset.scss
    app/javascript/styles/stream_entries.scss
    app/javascript/styles/tables.scss
    app/javascript/styles/variables.scss
    app/views/admin/subscriptions/_subscription.html.haml
    app/views/layouts/application.html.haml
    app/views/layouts/error.html.haml
    app/views/manifests/show.json.rabl
    bin/webpack-dev-server
    config/initializers/httplog.rb
    public/500.html
    public/emoji/1f1e6-1f1e8.svg
    public/emoji/1f1ec-1f1f8.svg
    public/emoji/1f1f3-1f1ee.svg
    public/emoji/1f1fb-1f1ec.svg
    spec/fixtures/requests/idn.txt
    yarn.lock

* Add semicolon
2017-07-06 15:27:02 +02:00
Eugen Rochko
bf50e3e5ae Fix height issue in report modal 2017-07-01 14:50:10 +02:00
Yamagishi Kazutoshi
0e09048537 Fix broken style in media gallery (regression from #3963) (#4014) 2017-06-30 13:40:00 +02:00
Naoki Kosaka
049cea30b0 Fix media-gallery, overflow is hidden. (#4008) 2017-06-30 05:37:17 +02:00
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
Yamagishi Kazutoshi
8f2c91568c Maintain aspect ratio for preview image (#3966) 2017-06-27 13:43:53 +02:00
Eugen Rochko
5e8d037e27 Fix #3910 - Require OTP authentication to disable 2FA (#3935)
* Fix #3910 - Require OTP authentication to disable 2FA. Also, remove ability
to generate new OTP backup codes *after* initial backup codes were handed
out during activation

* Restore recovery code re-generation

* Improve display of some 2FA elements
2017-06-25 23:51:46 +02:00
Eugen Rochko
f7301bd5b9 Add overview of active sessions (#3929)
* Add overview of active sessions

* Better display of browser/platform name

* Improve how browser information is stored and displayed for sessions overview

* Fix test
2017-06-25 16:54:30 +02:00
unarist
1fc096ec75 Fix elephant in onboarding modal being very small sized on small devices (#3932) 2017-06-24 23:18:32 +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
Sorin Davidoi
d8c4781377 fix: Apply :hover, :focus and :active only when multiple columns 2017-06-23 13:48:46 +02:00
Yamagishi Kazutoshi
eb832e88f4 Replace TextIconButton for SensitiveButton to IconButton (#3759)
* Replace TextIconButton for SensitiveButton to IconButton

* line-height
2017-06-20 19:43:09 +02:00
unarist
aa58cca040 Set cursor:pointer only when necessary (#3857) 2017-06-19 18:27:07 +02:00
Eugen Rochko
4a618908e8 Account deletion (#3728)
* Add form for account deletion

* If avatar or header are gone from source, remove them

* Add option to have SuspendAccountService remove user record, add tests

* Exclude suspended accounts from search
2017-06-14 18:01:27 +02:00
Eugen Rochko
5104bd7988 Fix unclickable onboardin modal regression (#3724) 2017-06-13 00:39:31 +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
Yamagishi Kazutoshi
72133fbed6 Re-add clear notifications button (#3708)
* Re-add clear notifications button

* remove connect() in column_settings

* one line

* remove unused props
2017-06-12 12:26:23 +02:00
Eugen Rochko
9b03cf0ddd Fix #3658 - Update RTL styles (#3669) 2017-06-09 19:46:25 +02:00
Clworld
a3715598cc adjust the size of 'column-header__back-button' (retry) (#3662) 2017-06-09 16:22:28 +02:00
ふぁぼ原
e3fae6f52c adjust the size of column-header__back-button (#3654) 2017-06-09 15:05:26 +02:00
Eugen Rochko
8902e265b4 Add explit admin actions to (re)subscribe/unsubscribe remote accounts (#3640)
* Add explit admin actions to (re)subscribe/unsubscribe remote accounts
and re-download avatar/header

* Improve how admin NSFW toggle looks
2017-06-08 14:58:22 +02:00
Sorin Davidoi
8acadeea76 fix: Warn if JavaScript is disabled (#3634) 2017-06-08 00:52:56 +02:00
Eugen Rochko
b623dd12c1 Use preview image in <ImageLoader /> to provide immediate visual feedback (#3595)
before the full-size image is loaded
2017-06-06 19:30:17 +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
66ca7157db Add support key shortcut to Onboarding Modal (#3517)
* Add support key shortcut to Onboarding Modal

* this.state.pages -> this.pages
2017-06-05 10:09:14 +02:00
Yamagishi Kazutoshi
f6e2309e70 Fix column buttons overflow in Japanese (#3552) 2017-06-04 14:52:02 +02:00
unarist
1dfd27a028 Fix all icons in the column header being hilighted (#3554) 2017-06-04 14:51:06 +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
Yamagishi Kazutoshi
3ea3f24a02 Change toggle state when click label (#3530) 2017-06-03 14:40:24 +02:00
Nolan Lawson
c00ead8a72 Remove react-imageloader (#3423)
* Remove react-imageloader

* add eslint-disable-line

* improve image loading experience

* remove unneeded import

* use PureComponent

* Use componentWillMount instead of constructor
2017-05-31 17:07:25 +02:00
Eugen Rochko
3fa8512474 Fix video having black border on top due to regression from #2608 (#3392)
The combination of object-fit, relative position 50% from top and translating it
back upwards 50% is what allows us to crop the video properly, so it needs to
be +50%-50%
2017-05-28 19:11:47 +02:00
Eugen Rochko
3836d293a1 Add missing background center on public profile headers (#3340) 2017-05-27 00:54:00 +02:00
Eugen Rochko
bd21afb5ed Replace onboarding elephant with friendlier graphic, shorter animation (#3337)
on status fade-in, fix buttons not having pointer cursor
2017-05-27 00:53:25 +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
Eugen Rochko
a098d08d12 Fix style regression of buttons not inheriting document font by default (#3310) 2017-05-25 21:15:41 +02:00
Nolan Lawson
bc39ad37c4 Fix "contains" CSS for Chromium <57 (#3317)
Fixes #3277. I've tested in QupZilla on Mac and can confirm it fixes the issue, and that Chrome 58 is not affected (because it has Grid).
2017-05-25 21:14:56 +02:00
unarist
b89ab7e69d Add flex: 0 0 auto to some components to avoid bugs on iOS9 (#3313) 2017-05-25 18:59:55 +02:00
Nolan Lawson
71b266377c Remove unnecessary action bar wrapper divs (#3299) 2017-05-25 14:15:12 +02:00
unarist
807c192fcf Fix load more feature on the Account media gallery (#3293)
* Add load more button for large screens
* Fix `next` state value on the first loading
* Don't load if `isLoading || !hasMore`
* Start load on near the bottom
2017-05-25 05:22:46 +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
Eugen Rochko
be83d450eb Fix DM being highlighted when it's inside a favourite notification (#3267) 2017-05-24 04:22:46 +02:00
alpaca-tc
7ee5fc5d68 Toggle sensitive from admin page (#3261) 2017-05-23 19:45:43 +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
Eugen Rochko
d78f555254 Improve language filter preferences look (#3184) 2017-05-20 19:42:44 +02:00
Matt Jankowski
8f4b7c1820 Filter languages with opt out (#3175)
* Remove allowed_languages and add filtered_languages

* Use filtered_languages instead of allowed_languages
2017-05-20 17:32:44 +02:00