Commit Graph
77 Commits
Author SHA1 Message Date
Sorin DavidoiandEugen Rochko e20258a2e5 chore(yarn): Upgrade react-swipeable-views (smoother swiping) (#5830) 2017-11-27 20:22:47 +01:00
Sorin DavidoiandEugen Rochko 5521e94e24 refactor(features/ui): Avoid useless renders in WrappedSwitch (#5580) 2017-11-01 12:17:53 +01:00
Sorin DavidoiandEugen Rochko 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
Sorin DavidoiandEugen Rochko ac53736814 fix(status_list): Use correct keys for keyboard navigation (#4487) 2017-08-02 13:09:09 +02:00
Sorin DavidoiandEugen Rochko d4c4820c03 fix(web_push_notifications): Send message with welcome notifications (#4471)
* fix(web_push_notifications): Send grouping title in welcome notification

* fix(web_push_notifications): Read message from last notification
2017-08-01 06:00:13 +02:00
Sorin DavidoiandEugen Rochko 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 DavidoiandEugen Rochko 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
Sorin DavidoiandEugen Rochko c71874b84c Improve accessibility (part 6) (#4435)
* fix(status_action_bar): Use aria-pressed for reblog and favourite button

* fix(column_back_button): Keyboard accessible

* fix(status_content): Make focusable and accessible

* fix(dropdown_menu): Use aria-expanded instead of aria-pressed

* fix(emoji_picker_dropdown): Use aria-expanded instead of aria-hidden

* feat(icon_button): Add aria-expanded

* fix(privacy_dropdown): Use aria-expanded instead of aria-hidden
2017-07-29 01:58:53 +02:00
Sorin DavidoiandEugen Rochko 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 DavidoiandEugen Rochko 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
Sorin DavidoiandEugen Rochko 7e0c00a555 fix(mocha): Run all tests (#4433) 2017-07-28 22:53:16 +02:00
Sorin DavidoiandEugen Rochko 296bfa23aa fix(actions-modal): Inconsistent margins (#4418) 2017-07-28 13:34:06 +02:00
Sorin DavidoiandEugen Rochko 534da4f24f Improve accessibility (part 5) (#4417)
* fix(status): Add tabIndex=0

* fix(status_list): Make keyboard navigable
2017-07-28 13:33:40 +02:00
Sorin DavidoiandEugen Rochko e67fc997dc feat(web_push_notifications): Group notifications (#4388) 2017-07-28 05:06:22 +02:00
Sorin DavidoiandEugen Rochko 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 DavidoiandEugen Rochko 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 DavidoiandEugen Rochko 9004151e34 feat: Web Share for detailed status and account (#4402)
* feat: Web Share for detailed status and account

* fix(account/action_bar): Move share under mention
2017-07-28 00:55:15 +02:00
Sorin DavidoiandEugen Rochko 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 DavidoiandEugen Rochko f9075577e4 fix(actions_modal): Warning about missing prop (#4406) 2017-07-27 23:01:50 +02:00
Sorin DavidoiandEugen Rochko 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 DavidoiandEugen Rochko e1798d0eb0 fix(push_subscription): Use star icon for favourite action (#4396) 2017-07-27 15:46:33 +02:00
Sorin DavidoiandEugen Rochko a248be4fce fix(columns_area): Manually set tabs style when swiping (#4320) 2017-07-26 19:03:56 +02:00
Sorin DavidoiandEugen Rochko 8b43d6bf9c fix(web_push_notification_worker): Guard against deleted notifications (#4379) 2017-07-26 16:14:39 +02:00
Sorin DavidoiandEugen Rochko b8adb4d7fa fix(column): Crash when heading is undefined (#4378) 2017-07-26 15:03:23 +02:00
Sorin DavidoiandEugen Rochko 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 DavidoiandEugen Rochko 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 DavidoiandEugen Rochko 7232cdf7e8 feat(status_action_bar): Web share button (#4365) 2017-07-25 20:38:39 +02:00
Sorin DavidoiandEugen Rochko 696bcff6bf fix(status_list): Guard against missing ref (#4353) 2017-07-25 02:13:05 +02:00
Sorin DavidoiandEugen Rochko ebf5a06084 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
Sorin DavidoiandEugen Rochko 23e854cb91 fix(components/bundle): Exit early in load function (#4349) 2017-07-25 01:05:44 +02:00
Sorin DavidoiandEugen Rochko de105d64d5 fix(getting_started): No scrollbar if not needed (#4350) 2017-07-25 01:05:35 +02:00
Sorin DavidoiandEugen Rochko 32fa312b2a fix(compose_from): Do not autofocus on mobile (#4344) 2017-07-24 19:54:39 +02:00
Sorin DavidoiandEugen Rochko 9075c90c46 feat: Enable push subscription for mobile devices by default (#4321) 2017-07-23 23:27:23 +02:00
Sorin DavidoiandEugen Rochko ff26b72333 fix(getting_started): Scroll on mobile (#4312) 2017-07-23 14:50:26 +02:00
Sorin DavidoiandEugen Rochko 3757546f1b fix(columns_area): Show correct title for preview columns (#4310) 2017-07-23 14:03:35 +02:00
Sorin DavidoiandEugen Rochko 3817704806 feat(compose): Change media query for compact mode to max-height: 400px (#4291) 2017-07-21 14:22:29 +02:00
Sorin DavidoiandEugen Rochko 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
Sorin DavidoiandEugen Rochko f24b81e27f feat(css): Remove border radius from WebKit's scrollbars (#4278) 2017-07-20 00:20:54 +02:00
Sorin DavidoiandEugen Rochko e01966f7b8 fix(status_list): Update scroll position after toots are appended (#4277) 2017-07-19 22:38:26 +02:00
Sorin DavidoiandEugen Rochko dcb9497148 fix(push_subscription): Guard against malformed favourite notification (#4271) 2017-07-19 22:37:52 +02:00
Sorin DavidoiandEugen Rochko 015269914e fix: Handle errors without response (#4274) 2017-07-19 19:38:50 +02:00
Sorin DavidoiandEugen Rochko 72108b20e2 feat(emoji): Add back title attribute (#4253) 2017-07-18 22:49:24 +02:00
Sorin DavidoiandEugen Rochko 8387b3928e fix(push-subscriptions): Refactor how Sidekiq jobs are handled (#4226) 2017-07-18 16:25:40 +02:00
Sorin DavidoiandEugen Rochko 719ab720a7 feat(push-notifications): Open link in current tab if possible (#4228)
* fix(push-notification): Open link in current tab if possible

* feat(sw): Skip waiting and claim clients
2017-07-18 00:19:17 +02:00
Sorin DavidoiandEugen Rochko 1d2616b79b fix(emojis): Handle multipoint emojis (e.g. country flags) (#4221) 2017-07-17 10:57:45 +02:00
Sorin DavidoiandEugen Rochko 72bd73f605 Small style fixes (#4206)
* fix(components/media_modal): Center horizontally in Firefox

* fix(components/status_list): Do not remove load more button
2017-07-14 22:31:25 +02:00
Sorin DavidoiandEugen Rochko c1f201c49a 🎄🔨 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
Sorin DavidoiandEugen Rochko 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 DavidoiandEugen Rochko a9a0c854e1 fix(components/media_modal): Style issues (#4187) 2017-07-13 22:18:18 +02:00
Sorin DavidoiandEugen Rochko 0c7c188c45 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
Sorin DavidoiandEugen Rochko cc68d1945b refactor: Rewrite immutablejs import statements using destructuring (#4147) 2017-07-11 01:00:14 +02:00
Sorin DavidoiandEugen Rochko 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 DavidoiandEugen Rochko fc4c74660b Swipeable views (#4105)
* feat: Replace react-swipeable with react-swipeable-views

* fix: iOS 9
2017-07-09 15:02:26 +02:00
Sorin DavidoiandEugen Rochko 37c832cdf7 refactor: Make all reducers sync (#4125) 2017-07-09 12:16:08 +02:00
Sorin DavidoiandEugen Rochko 91cacb1e8f fix: Rerender Bundle on route change (#4120) 2017-07-08 18:34:55 +02:00
Sorin DavidoiandEugen Rochko 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
Sorin DavidoiandEugen Rochko 60da49f856 fix(components/columns_area): Increase delta for swipe detection (#4037) 2017-07-02 15:55:50 +02:00
Sorin DavidoiandEugen Rochko 64d9c016bd fix(components/status): Up & down jump due to content being added to the DOM (#3972) 2017-06-27 18:43:53 +02:00
Sorin DavidoiandEugen Rochko 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
Sorin DavidoiandEugen Rochko 4ce1540094 fix(features/compose): Handle external changes to the textarea (#3632) 2017-06-25 21:43:27 +02:00
Sorin DavidoiandEugen Rochko d23293c762 feat(components/onboarding_modal): Swipe between pages (#3934) 2017-06-24 23:17:39 +02:00
Sorin DavidoiandEugen Rochko 2211e8d1cd Revocable sessions (#3616)
* feat: Revocable sessions

* fix: Tests using sign_in

* feat: Configuration entry for the maximum number of session activations
2017-06-23 18:50:53 +02:00
Sorin Davidoi d8c4781377 fix: Apply :hover, :focus and :active only when multiple columns 2017-06-23 13:48:46 +02:00
Sorin Davidoi bc6e958229 feat: Swipeable media 2017-06-23 13:48:46 +02:00
Sorin Davidoi a6d8d1036a feat: Swipeable columns 2017-06-23 13:48:46 +02:00
Sorin Davidoi 3d403a013d chore(yarn): Install react-swipeable 2017-06-23 13:40:58 +02:00
Sorin DavidoiandEugen Rochko 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
Sorin DavidoiandEugen Rochko 0f52e42c2d fix(status): Content jump due to height changes (#3734) 2017-06-13 20:46:21 +02:00
Sorin DavidoiandEugen Rochko 8acadeea76 fix: Warn if JavaScript is disabled (#3634) 2017-06-08 00:52:56 +02:00
Sorin DavidoiandEugen Rochko 8cf8ce4ac0 fix(components/autosuggest_textarea): Race condition regarding onBlur (#3631) 2017-06-07 20:05:53 +02:00
Sorin DavidoiandEugen Rochko 9304114b57 Ignore .idea folder (#3516)
Used by Intellij IDEA / WebStorm / RubyMine.
2017-06-02 16:19:11 +02:00
Sorin DavidoiandEugen Rochko 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
Sorin DavidoiandEugen Rochko 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
Sorin DavidoiandEugen Rochko b369fc2de4 feat: Use CSS contain to avoid computations (#3158) 2017-05-20 01:26:46 +02:00
Sorin DavidoiandEugen Rochko 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
Sorin DavidoiandEugen Rochko 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
2017-05-19 02:42:21 +02:00
Sorin DavidoiandEugen Rochko 07e875972a refactor: Import from react-router/lib (#3117) 2017-05-18 19:14:03 +02:00