Commit Graph

1048 Commits (bc4fa6b198557a7f3989eb0865e2c77ac7451d29)

Author SHA1 Message Date
David Yip 6a2b1ba91e Another tabs-vs-spaces fix, but with ~feeling~ 2017-10-12 09:36:26 -05:00
Alda Marteau-Hardi 3cfcc7a50e Fix some consistance errors in gender neutral formulations. Add some missing ones. (#5350) 2017-10-12 16:31:14 +02:00
David Yip fe1c20cfb9 Fix tabs-vs-spaces issue pointed out by eslint. 2017-10-12 09:23:06 -05:00
JeanGauthier cb7ba23cd8 Update oc.json (#5343) 2017-10-12 15:40:45 +02:00
David Yip 13e05fece2 Merge tag 'v2.0.0rc2' into gs-master 2017-10-12 04:22:59 -05:00
Sylvhem 3ebe03b729 Fixes and updates for the French translation (#5340)
* Ajout du support des thèmes multiples

Ajoute des traductions pour les nouvelles chaînes permettant le support de thèmes multiples.

Add translations for the new strings allowing support for multiple themes.

* Mise à jour de la traduction

Met à jour les chaînes modifiées et ajoute des traductions pour celle n’en ayant pas.

Update modified strings and add new translations for the ones who are missing them.

* Remplace « ' » par « ’ »

Retire de la traduction les apostrophes droites « ' » (U+0027) au profit des apostrophes typographiques « ’ » (U+2019).
En typographie française, les apostrophes typographiques sont utilisées à la place des apostrophes droites. La traduction était incohérente et utilisait les deux.

Remove from the translation all the vertical apostrophes (U+0027) in favor of the curly ones (U+2019).
In French typography, typographic apostrophes are used instead of vertical ones. The translation was incoherent and used both.
2017-10-12 00:58:01 +02:00
Ondřej Hruška eeaa8fba43
Fix our media gallery not having alt text and tooltips 2017-10-11 22:02:24 +02:00
Ondřej Hruška b0b5ff1b0f
workaround for scrollIntoView bug ??? 2017-10-11 21:49:22 +02:00
Ondřej Hruška 0bf9261e65
Merge remote-tracking branch 'upstream/master' 2017-10-11 21:27:17 +02:00
Jeroen 6bc07d3de3 Updating Dutch strings for 2.0 (#5334) 2017-10-11 21:21:22 +02:00
Alda Marteau-Hardi 0352c40e99 Use gender neutral language as in the rest of the french translation (#5331) 2017-10-11 21:20:56 +02:00
Lynx Kotoura 07ea625cb2 Fix styles of error pages (#5335)
Signed-off-by: Lynx Kotoura <admin@sanin.link>

Signed-off-by: Lynx Kotoura <admin@sanin.link>
2017-10-11 21:18:45 +02:00
kibigo! 3cc6255a7e Removed length check which now happens in reducer 2017-10-11 11:50:11 -07:00
kibigo! 35e2cad4eb Fixed header emojification 2017-10-11 11:00:28 -07:00
kibigo! 8d6b9ba494 Merge upstream 2.0ish #165 2017-10-11 10:43:10 -07:00
Eugen Rochko 1823cf435a In thread view, only scroll first update, scroll to replied-to post (#5322) 2017-10-11 19:21:44 +02:00
Eugen Rochko 476e79b8e3 Fully disable hotkeys when input element is focused (#5324)
Because alt+n is a way to enter some kinda letter on some keyboard
2017-10-11 16:31:07 +02:00
JohnD28 19d3317a69 Update french translation : mastodon/locales/fr.json (#5318)
* Update fr.json

* Update fr.json

* Update fr.json
2017-10-11 22:07:09 +09:00
ButterflyOfFire 38600b2792 Update ar.json (#5316)
Pushing new arabic translated strings for Mastodon web client.
2017-10-11 21:19:04 +09:00
unarist b0407ece42 Fix an error when ancestors get loaded before the status itself (#5312)
When ancestors get loaded, we scroll to the target status (i.e. skip
ancestors). However, ancestors may get loaded before the status itself,
then it causes TypeError because `this.node` is undefined yet.

Since we don't show anything until the status gets loaded, we don't need
to scroll to the target status in this time. If we get the status itslef
later, it causes `componentDidUpdate` and scrolling correctly.
2017-10-11 11:25:15 +02:00
Eugen Rochko b3d7ad958f Fix #5306: Stop hotkeys in input fields even when shift is pressed (#5309)
AZERTY layouts require pressing shift to press a number at all, so
it triggers a column switch even when simply typing numbers in
textarea
2017-10-11 01:01:17 +02:00
Eugen Rochko 9815be2a44 Fix #5293 - Pre-fill frequently used emojis to avoid bugs (#5305) 2017-10-10 20:47:14 +02:00
Eugen Rochko 4bb3e4eeba Fix #5295 - Order custom emoji lexicographically (#5297) 2017-10-10 15:18:12 +02:00
unarist 784c7510d7 Fix an error when video playback buffer is empty (#5300) 2017-10-10 15:17:53 +02:00
Eugen Rochko 1c6fc0e4ce Center error layout (#5289) 2017-10-09 20:51:36 +02:00
Eugen Rochko 488584bfc1 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
Ondřej Hruška 92a3181dc6
improve static page metadata look 2017-10-08 10:46:59 +02:00
JeanGauthier 94f15338c3 i18n update Occitan (#5263)
* Update oc.json

* Update oc.yml

* Update oc.yml

* Update oc.json
2017-10-08 14:18:27 +09:00
Nolan Lawson db33a53ee8 Video preload should be a string (#5267) 2017-10-08 03:06:43 +02:00
Nolan Lawson 7de6d269d2 Use ES module build of react-router-dom (#5264) 2017-10-08 02:55:58 +02:00
Eugen Rochko 684001d729 Dynamically calculate card height for embeds instead of padding (#5265)
The padding trick was hard-coded to a 16:9 ratio, but we can use
width and height provided from OEmbed information and width
of the card itself to calculate a new height
2017-10-08 02:34:49 +02:00
Eugen Rochko 292f3cd7e0 Show buffering in video player (#5261) 2017-10-08 02:33:08 +02:00
Eugen Rochko f486ef2666 Redesign public hashtag pages (#5237) 2017-10-07 20:00:35 +02:00
Eugen Rochko d2dee6ea43 Fix custom emoji in emoji picker, persist skin tone (#5258) 2017-10-07 19:02:30 +02:00
MitarashiDango b7e65a004f Japanese translation (relative time) (#5251) 2017-10-08 01:32:03 +09:00
Nolan Lawson 057db0ecd0 Update emoji-mart to v2.1.1 (#5256) 2017-10-07 12:17:02 +02:00
Eugen Rochko 11436358b4 Fix regression from #5206 - deduplicate descendants (#5253) 2017-10-07 12:16:39 +02:00
kibigo! 6610d57f91 Basic static metadata styling 2017-10-06 22:22:34 -07:00
Eugen Rochko 45682f876d Make auto-play GIFs preference affect custom emojis in web UI (#5254) 2017-10-07 02:38:52 +02:00
Lynx Kotoura 5a2c7bd4ce Fix overflowing in web UI (#5246)
* Fix overflowing in web UI

* Revert fixing dropdown menu modal
2017-10-06 20:40:17 +02:00
K.SHIRAKASHI d5f490b1a2 Fix error on reloading status detail column (#5248) 2017-10-06 20:37:56 +02:00
MIYAGI Hikaru 6f2d88dd28 Fix error at emoji_compressed in Firefox ESR (#5241) 2017-10-06 16:40:41 +02:00
Nolan Lawson 72d939b69f Fix thinking_face emoji autocomplete (#5238) 2017-10-06 12:03:13 +02:00
Ondřej Hruška 37e141bccb
comment out unused stuff with Video 2017-10-06 09:23:28 +02:00
Nolan Lawson 97b3d0cd56 Import only Spring/Motion from react-motion (#5236) 2017-10-06 03:46:15 +02:00
Nolan Lawson fd7f0732fe Compress and combine emoji data (#5229) 2017-10-06 03:42:34 +02:00
Nolan Lawson 2aca22b8ea import only Overlay from react-overlays (#5235) 2017-10-06 03:24:33 +02:00
Eugen Rochko 7db0f8dcb2 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
Eugen Rochko b9c76e2edb When processing custom emoji, ensure a non-animated version exists (#5230)
Use the non-animated version in web UI, but return both in API
2017-10-05 23:41:47 +02:00
Ondřej Hruška f82e90bf11
workaround for notif clearing 2017-10-05 21:55:02 +02:00
Lynx Kotoura 32e8a87830 adjust public profile pages 2 (#5223) 2017-10-04 22:49:36 +02:00
MitarashiDango ecfa1c3f3b fix error (When part of conversation has already been deleted.) (#5216) 2017-10-04 16:28:39 +02:00
Eugen Rochko 632178d754 Use own, shorter relative timestamps (#5171)
* Use own, shorter relative timestamps

* Add acct to title tooltip of display name in statuses

* Improve i18n of the relative times
2017-10-04 01:23:52 +02:00
Eugen Rochko ec13cfa4f9 When a streaming API status arrives, sort it into conversations (#5206) 2017-10-04 01:01:44 +02:00
m4sk1n e6543d5fc4 i18n: Update Polish translation (#5202) 2017-10-03 21:15:41 +02:00
Nolan Lawson 82d9ade7a6 Compress emoji_data_light.js (#5201) 2017-10-03 20:43:57 +02:00
PFM 875d943c18 Add pagination in media modal (#4343)
* Add pagination in media modal

* Change array name

* Add an element class

* Avoid nested class

* Pull out the active class

* Use map instead of forEach

* Remove parentheses
2017-10-03 17:11:22 +02:00
Yamagishi Kazutoshi ecacb15cd5 Add placeholder text color to form of media attachments (#5196) 2017-10-03 13:10:57 +02:00
Yamagishi Kazutoshi eb6ec3d068 Add missing Japanese translations (#5193)
* yarn manage:translations

* Add Japanese translations for #5170

* Add Japanese translations for #5123

* Add Japanese translations for #5046

* Add Japanese translations for #5099

* Add Japanese translations for #5161

* "項目" -> "絵文字"
2017-10-03 13:10:26 +02:00
Akihiko Odaki f303a954e6 Remove aria-label of status content (#5195)
aria-label contained body of status with content warning, which should be
hidden by default. Remove the label for the case and other cases due to
consistency.
2017-10-03 13:10:06 +02:00
Jakob Kramer 395a57d03d Update German translation (#5189) 2017-10-03 09:53:18 +09:00
Eugen Rochko 0f699a4280 When muting, clear web UI like for blocks (#5172)
* When muting, clear web UI like for blocks

* Fix style issue
2017-10-03 02:01:54 +02:00
Eugen Rochko 5e5f36c216 Fix #5079, fix #5186 - Emoji picker fixes (#5187) 2017-10-03 01:56:50 +02:00
m4sk1n a767ef85fa i18n: Update translation files and Polish translation (#5180)
* Update translation files

Signed-off-by: Marcin Mikołajczak <me@m4sk.in>

* i18n: Update Polish translation

Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
2017-10-02 23:38:40 +02:00
Eugen Rochko 4453c9a9f5 Search popout (#5170) 2017-10-02 18:24:05 +02:00
Nolan Lawson b9c612b561 Code-split emoji-mart picker and data (#5175) 2017-10-02 07:22:24 +02:00
Nolan Lawson c567c87453 Toggle contain:strict on fullscreen (#5159)
* Toggle contain:strict on fullscreen

* Fix scss lint issue

* fix scss whitespace lint issue
2017-10-02 03:01:01 +02:00
Eugen Rochko cdad7977fc Improve privacy dropdown, remove react-simple-dropdown dependency (#5140)
* Improve privacy dropdown, remove react-simple-dropdown dependency

* Animate privacy warning

* Fix react-router-scroll
2017-10-01 12:20:00 +02:00
Eugen Rochko 0b3f1ec62a Reorganize preferences page (#5161) 2017-10-01 10:52:39 +02:00
Daggertooth b110cc542f Add image descriptions to title attribute to view on mouse hover/long-press. (#5137)
* Add image descriptions to `title` attribute to view on mouse hover/long-press.

* Too many title properties may spoil the broth.
2017-10-01 00:35:49 +02:00
beatrix b1217242fc Merge pull request #125 from glitch-soc/data-column
Add data-column="..." to all columns
2017-09-30 15:02:21 -04:00
MIYAGI Hikaru 7481ae1bcb trivial refactoring for emojify() (#5075)
* unite loop process
* add hint for original emojifier
2017-09-30 15:57:32 +02:00
Nolan Lawson ca0e8be20c Improve IntersectionObserverArticle perf (#5152) 2017-09-30 14:28:49 +02:00
Eugen Rochko d6fe0954e3 Make emoji autosuggestions immediate, usernames appear sooner (#5149)
* Do not debounce emoji search

* Make autosuggestions appear sooner
2017-09-30 05:11:44 +02:00
Eugen Rochko ebb8c89207 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 0060f98847 Remove react-sizeme (#5143)
* Remove react-sizeme

* Fix aspect ratio in "sensitive" mode
2017-09-29 22:46:43 +02:00
Jakob Kramer 1a72813b53 Updated German translation (#5151)
Translate "about" page, several settings pages, data export/import,
sessions overview, authorized followers page, account deletion page.

More consistent use of words:
- A toot is a Beitrag.
- An account is a Konto.

Some small improvements.
2017-09-29 21:11:28 +02:00
Eugen Rochko 887cd94e96 Increase attachment descriptions to 420 characters (#5139)
Blaze it
2017-09-29 02:30:00 +02:00
Jakob Kramer d0b4709b2a Update German translation (#5133)
Create activerecord.de.yml (50%)
Update devise.de.yml
Update doorkeeper.de.yml (100%)
Update simple_form.de.yml (100%)
2017-09-28 20:45:09 +02:00
Nolan Lawson 6e0659c838 Improve performance of modal and swipe animations (#5135)
* Improve performance of modal and swipe animations

* Fix eslint issues
2017-09-28 20:43:18 +02:00
Jakob Kramer a3202f61af Updated German translation (#5132) 2017-09-28 17:38:39 +02:00
Eugen Rochko 4ec1771165 Add ability to specify alternative text for media attachments (#5123)
* Fix #117 - Add ability to specify alternative text for media attachments

- POST /api/v1/media accepts `description` straight away
- PUT /api/v1/media/:id to update `description` (only for unattached ones)
- Serialized as `name` of Document object in ActivityPub
- Uploads form adjusted for better performance and description input

* Add tests

* Change undo button blend mode to difference
2017-09-28 15:31:31 +02:00
Ondřej Hruška e9f9e3cc89
unbreak onboarding modal 2017-09-28 11:13:37 +02:00
Ondřej Hruška cf24ce7e03
remove wrong emojify usage in old glitch components 2017-09-28 11:03:23 +02:00
Ondřej Hruška 74e4fc8f8a
fix custom emoji not shown in statuses 2017-09-28 10:13:16 +02:00
Ondřej Hruška 9a5418942c
fix some js errors due to number->string change of status ID 2017-09-28 10:04:20 +02:00
Ondřej Hruška daad07b1d5
Merge remote-tracking branch 'origin/better-themeing' into merging-upstream 2017-09-28 09:20:59 +02:00
Ondřej Hruška 83bda6c1a8
Merge commit 'b9f59ebcc68e9da0a7158741a1a2ef3564e1321e' into merging-upstream 2017-09-28 09:18:35 +02:00
Ondřej Hruška 9330ea1f4d
Merge commit '4aea3f88a6d30f102a79c2da7fcfac96465ba1a8' into merging-upstream 2017-09-28 09:12:17 +02:00
Ondřej Hruška 06e299cef5
Revert "autoscroll emoji suggestions box"
This reverts commit c89cce0219.
2017-09-28 08:56:32 +02:00
Ondřej Hruška 8a24ad5828
Revert "Merge pull request #149 from glitch-soc/mojon-suggest"
This reverts commit fa3587645d, reversing
changes made to 15c9c2fd7e.
2017-09-28 08:55:53 +02:00
Eugen Rochko e648ef0bfb Remove web UI warnings about OStatus privacy (#5102)
* Remove web UI warnings about OStatus privacy

* yarn run manage:translations
2017-09-28 00:26:33 +02:00
kibigo! 86e617a839 Better themeing support!! 2017-09-25 19:24:32 -07:00
Eugen Rochko 3b60832214 New error page graphic. Other error page improvements (#5099)
- 500.html generated with admin-set default locale if set
- Error page `<title>` includes Mastodon site title
- 500 title changed to "This page is not
  correct" (ref: <https://www.youtube.com/watch?v=2VCAP_seh1A>)
- 500 content appended with "on our end" to make clear it's
  not user's fault
2017-09-25 23:05:54 +02:00
Lynx Kotoura 259181c41a Fix size of single media in media-gallery (#5098) 2017-09-25 20:26:50 +02:00
Eugen Rochko 510df0ac55 Fix emojify() by generating a mapping to existing Twemoji files (#5080)
A new rake task emojis:generate downloads a full list of valid
unicode sequences from unicode.org and checks it against existing
Twemoji files, finally generating a map from each sequence to the
existing file (e.g. when there's multiple ways an emoji can be
expressed). The map is dumped into app/javascript/mastodon/emoji_map.json

That file is loaded by emojione_light.js (now a misnomer) which
decorates it further with shortcodes taken from emoji-mart's index.
2017-09-25 18:36:33 +02:00
Eugen Rochko 2c8e3fbbfb Generate 500.html with assets:precompile, remove loading from Google Fonts (#5067) 2017-09-25 04:04:04 +02:00
JeanGauthier 3f3de38075 OC update: different emoji picker (#5046) (#5077) 2017-09-24 12:17:47 +02:00
abcang e756c4f5ec Fix media spoiler of DetailedStatus (#5071) 2017-09-24 11:15:11 +02:00
Eugen Rochko 2f079573ed 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 dae0af1fd2 Change mobile layout breakpoint from 1024px to 630px (#5063)
630px = Drawer + 1 Column
2017-09-24 01:25:07 +02:00
Eugen Rochko 5b8d0ad71b Dropdown triangles a bit nicer, smoother scrolling on touch (#5062) 2017-09-24 00:40:10 +02:00
Eugen Rochko 233258c61b Fix media gallery CSS (#5064) 2017-09-24 00:33:26 +02:00
Eugen Rochko 9c8aad612e Require at least 2 characters before showing autosuggestions (#5065) 2017-09-24 00:33:17 +02:00
Ondřej Hruška 210e6776fc
Fix intl warning with disabled secondary toot btn
- Moved building the secondary btn text into the if to avoid trying to translate 'none' visibility
2017-09-23 23:41:25 +02:00
Ondřej Hruška 1924a71b5a
Make secondary toot button work nicer with file attachments & revert to the original behavior if it's disabled 2017-09-23 23:38:24 +02:00
Ondřej Hruška 67f8277526 Add secondary toot button (opt-in) (#153)
Add secondary toot button + other toot button enhancements. 
Squashing so it's easy to revert if needed.
2017-09-23 23:11:02 +02:00
Mingye Wang 6dfeb64326 jsx/zh-*: Fix "pin column" for Chinese (#5060) 2017-09-23 22:47:15 +02:00
m4sk1n 427beb4177 i18n: Update Polish translation (#5058) 2017-09-23 22:14:39 +02:00
Lynx Kotoura 838f255fc2 Fix overflowing tabs in account__action-bar (#5056)
* Fix numbers in accounts columns

* Support edge compact-header
2017-09-23 21:06:16 +02:00
Eugen Rochko 1e02ba111a Add emoji autosuggest (#5053)
* Add emoji autosuggest

Some credit goes to glitch-soc/mastodon#149

* Remove server-side shortcode->unicode conversion

* Insert shortcode when suggestion is custom emoji

* Remove remnant of server-side emojis

* Update style of autosuggestions

* Fix wrong emoji filenames generated in autosuggest item

* Do not lazy load emoji picker, as that no longer works

* Fix custom emoji autosuggest

* Fix multiple "Custom" categories getting added to emoji index, only add once
2017-09-23 14:47:32 +02:00
Eugen Rochko 66126f3021 Add custom emojis to the emoji picker (#5052) 2017-09-23 05:40:28 +02:00
Eugen Rochko 846cd4e838 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
Ondřej Hruška 169d83f532 Remove "extra clickable spaces" made obsolete by status re-design 2017-09-23 00:33:35 +02:00
Ondřej Hruška 31dd261375 applied blackle's fix for gallery offset with full-width media 2017-09-22 21:47:14 +02:00
Nolan Lawson b01ab55ed8 Fix PropTypes.oneOfType() warning (#5041) 2017-09-22 17:50:29 +02:00
Eugen Rochko 034fab39ab 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
Nolan Lawson 0df6442636 Use passive listener in privacy_dropdown.js (#5037) 2017-09-22 04:59:01 +02:00
Nolan Lawson 245816ab27 Eliminate re-renders for intersection_observer_article.js (#5036) 2017-09-22 04:58:33 +02:00
kibigo! c2b479efec Long display names now ellipsis properly 2017-09-21 16:55:32 -07:00
kibigo! a94dc21c79 Styling fixes for header redesign 2017-09-21 16:46:18 -07:00
David Yip 9512db920c Merge pull request #148 from glitch-soc/better-header
Improvements to status headers and content
2017-09-21 16:11:03 -05:00
Ondřej Hruška c89cce0219 autoscroll emoji suggestions box 2017-09-21 15:31:24 +02:00
syui 63819c848d fix : mobile style of /about/more (#5034) 2017-09-21 14:30:21 +02:00
beatrix fa3587645d Merge pull request #149 from glitch-soc/mojon-suggest
Emoji and Hashtag autocomplete
2017-09-20 23:02:23 -04:00
MIYAGI Hikaru a9abe89093 Fix shortname problem in emojify() (regression from #5016) (#5032)
When colon appears end of line, skiped all character containing unicode emojis. Fixed.
https://github.com/tootsuite/mastodon/pull/5016#issuecomment-331012008
2017-09-21 03:47:16 +02:00
kibigo! 9ed51cecd0 Fixed notification appearance 2017-09-20 14:52:01 -07:00
Ondřej Hruška 514edd3c23 fulltext mojo suggestions 2017-09-20 22:13:09 +02:00
Ondřej Hruška a3760b7729 TURBO shortcode search 2017-09-20 21:57:33 +02:00
Ondřej Hruška cbf00168f1 add scrollbar to mojon suggestions list when too long 2017-09-20 21:53:08 +02:00
Ondřej Hruška 4f9a493d9d cache allShortcodes 2017-09-20 21:39:22 +02:00
Ondřej Hruška 8c0733a14e typo in comment 2017-09-20 21:28:44 +02:00
Ondřej Hruška 36a35be2ad Appease Travis 2017-09-20 20:34:11 +02:00
Ondřej Hruška 3783062450 Emoji and Hashtag autocomplete 2017-09-20 20:21:09 +02:00
Nolan Lawson 798b0fc5af Reduce wasted renders for column_loading.js (#5021)
* Reduce wasted renders for column_loading.js

* Use defaultProps
2017-09-20 19:58:44 +02:00
TomoyaShibata 8cb4561145 Remove unnecessary css property (#5025) 2017-09-20 15:26:22 +02:00
aschmitz 669fe9ee06 Change IDs to strings rather than numbers in API JSON output (#5019)
* Fix JavaScript interface with long IDs

Somewhat predictably, the JS interface handled IDs as numbers, which in
JS are IEEE double-precision floats. This loses some precision when
working with numbers as large as those generated by the new ID scheme,
so we instead handle them here as strings. This is relatively simple,
and doesn't appear to have caused any problems, but should definitely
be tested more thoroughly than the built-in tests. Several days of use
appear to support this working properly.

BREAKING CHANGE:

The major(!) change here is that IDs are now returned as strings by the
REST endpoints, rather than as integers. In practice, relatively few
changes were required to make the existing JS UI work with this change,
but it will likely hit API clients pretty hard: it's an entirely
different type to consume. (The one API client I tested, Tusky, handles
this with no problems, however.)

Twitter ran into this issue when introducing Snowflake IDs, and decided
to instead introduce an `id_str` field in JSON responses. I have opted
to *not* do that, and instead force all IDs to 64-bit integers
represented by strings in one go. (I believe Twitter exacerbated their
problem by rolling out the changes three times: once for statuses, once
for DMs, and once for user IDs, as well as by leaving an integer ID
value in JSON. As they said, "If you’re using the `id` field with JSON
in a Javascript-related language, there is a very high likelihood that
the integers will be silently munged by Javascript interpreters. In most
cases, this will result in behavior such as being unable to load or
delete a specific direct message, because the ID you're sending to the
API is different than the actual identifier associated with the
message." [1]) However, given that this is a significant change for API
users, alternatives or a transition time may be appropriate.

1: https://blog.twitter.com/developer/en_us/a/2011/direct-messages-going-snowflake-on-sep-30-2011.html

* Additional fixes for stringified IDs in JSON

These should be the last two. These were identified using eslint to try
to identify any plain casts to JavaScript numbers. (Some such casts are
legitimate, but these were not.)

Adding the following to .eslintrc.yml will identify casts to numbers:

~~~
  no-restricted-syntax:
  - warn
  - selector: UnaryExpression[operator='+'] > :not(Literal)
    message: Avoid the use of unary +
  - selector: CallExpression[callee.name='Number']
    message: Casting with Number() may coerce string IDs to numbers
~~~

The remaining three casts appear legitimate: two casts to array indices,
one in a server to turn an environment variable into a number.

* Back out RelationshipsController Change

This was made to make a test a bit less flakey, but has nothing to
do with this branch.

* Change internal streaming payloads to stringified IDs as well

Per
https://github.com/tootsuite/mastodon/pull/5019#issuecomment-330736452
we need these changes to send deleted status IDs as strings, not
integers.
2017-09-20 14:53:48 +02:00
kibigo! 15c9c2fd7e Pinned toots; embeds 2017-09-20 02:50:53 -07:00
kibigo! 227dbb6adb Added GIF hover-to-play support 2017-09-20 02:19:36 -07:00
kibigo! 769f62d96f Improvements to status headers 2017-09-20 01:57:08 -07:00
kibigo! 003bfd094e Fixed disabled boost SVG (#106) 2017-09-20 00:40:54 -07:00
kibigo! fae8dce738 Fixed #133 (only parse links in status text) 2017-09-20 00:20:11 -07:00
Eugen Rochko b35406b700 Fix custom emojis with non-1:1 aspect ratio being stretched (#5017) 2017-09-20 03:38:38 +02:00
MIYAGI Hikaru 8e33fc29d7 redo #4500 with customEmojis (#5016) 2017-09-19 23:27:29 +02:00
Nolan Lawson e5c65b3067 Set touchstart listener to 'passive', remove 'once' (#5011) 2017-09-19 17:00:29 +02:00
Andrew 0401a24558 Add support for multiple themes (#4959)
* Add support for selecting a theme

* Fix codeclimate issues

* Look up site default style if current user is not available due to e.g. not being logged in

* Remove outdated comment in common.js

* Address requested changes in themes PR

* Fix codeclimate issues

* Explicitly check current_account in application controller and only check theme availability if non-nil

* codeclimate

* explicit precedence with &&

* Fix code style in application_controller according to @nightpool's suggestion, use default style in embedded.html.haml

* codeclimate: indentation + return
2017-09-19 16:36:23 +02:00
unarist 4aea3f88a6 Hide sensitive image in default on the public pages (#5009)
Additionally, this restores previous background / text color for media spoiler.
2017-09-19 16:03:45 +02:00
Eugen Rochko 81cec35dbf Custom emoji (#4988)
* Custom emoji

- In OStatus: `<link rel="emoji" name="coolcat" href="http://..." />`
- In ActivityPub: `{ type: "Emoji", name: ":coolcat:", href: "http://..." }`
- In REST API: Status object includes `emojis` array (`shortcode`, `url`)
- Domain blocks with reject media stop emojis
- Emoji file up to 50KB
- Web UI handles custom emojis
- Static pages render custom emojis as `<img />` tags

Side effects:

- Undo #4500 optimization, as I needed to modify it to restore
  shortcode handling in emojify()
- Formatter#plaintext should now make sure stripped out line-breaks
  and paragraphs are replaced with newlines

* Fix emoji at the start not being converted
2017-09-19 02:42:40 +02:00
BruWalfas c155d843f4 A few updates to the Spanish translation and some typos fixing (#4997)
* So Spanish. Much changes. Wow.

* Some little fixes

* Updated es.yml, and fixed some ortographical errors

* Some little changes to simple_form.es.yml

* Yeah, so much translations

* Spanish e-mail messages

* Remove unused message
2017-09-19 07:47:48 +09:00
Nolan Lawson 3d640dc8ac Add will-change to improve scrolling perf (#5001) 2017-09-18 23:29:15 +02:00
unarist 6db034a866 Re-allow underscore on valid_url_path_ending_chars (#4999)
Limiting allowed characters in the last character of the URL is came from twitter-text, but underscore is allowed on there, and Mastodon before #4941.
2017-09-18 21:25:40 +02:00
febrezo cf14f4945a Some improvements in the Spanish translation (#4991) 2017-09-18 11:52:34 +09:00
Lynx Kotoura 4c14ff659b Oauth code in input form and add description message (#4986)
* Oauth code in a input form and add description

* New authcode description
2017-09-17 15:23:44 +02:00
abcang 44245926f1 Fix cancellation of scroll to the right (#4978) 2017-09-17 11:59:23 +02:00
BruWalfas 7be3131240 So Spanish. Much changes. Wow. (#4976) 2017-09-17 18:16:43 +09:00
Mingye Wang c8969dca35 Minor Chinese check & jsx addition (#4973)
* zh-*: transition from "like" back to "fav"

This commit reverts the translation for the yellow-star "fav" button
back to "fav" in Chinese. Some ambuiguity between "like" and "fav" is
deliberately used in zh-TW/HK by using the existing phrase "最爱"
(favorite (adj.), lit. love-most) instead of "收藏" (favourite (v.),
"collect") in some instances.

Fixes #3511.

* zh-*: apply suggestions for PR #4557

* zh-cn: de-monetize ya account

In Chinese two separate characters, 账 and 帐, can be used to spell the
word for account (账/帐户). However, the one with a 贝 on the left is
evolved from the latter specifically for monetary purposes. Since
people usually can't figure out which one to use, it might be a good
idea to use the original not-so-money one.

* zh-*: complete jsx translation
2017-09-16 18:48:38 +02:00
Surinna Curtis b0487488a7 Re-center hidden media text vertical 2017-09-16 11:44:31 -05:00
Lynx Kotoura 1e3b1d7211 Adjust landing pages 2 (#4967)
* Adjust landing pages 2

Fix styles of terms page
Remove action buttons from timeline in about page
Adjust styles of short description
Adjust form inputs
Set autocomplete off for username and email box in registration form. Remove line breakings.

* Revert removing action buttons
2017-09-16 18:39:11 +02:00
ふぁぼ原 629fae8b3b correct URL pattern used in text length counter in WebUI (#4968) 2017-09-16 15:01:15 +02:00
Naoki Kosaka cea5597722 Fix hasSize condition in secSet and sizes. (#4969) 2017-09-16 15:00:01 +02:00
unarist 6c81f9d6e5 Fix invisible load more button (#4962)
* Fix behavior while the button is invisible
e.g. pointer cursor, couldn't open contextmenu
* Avoid rendering the button to remove blank space if no more items are available or no items are rendered
2017-09-16 00:32:43 +02:00
Eugen Rochko 0d1215e82f Remove redundant width/height values from SVGs to fix Safari bug (#4956) 2017-09-15 00:51:00 +02:00
Anna e só e77cc032c2 l10n: PT-BR translation updated (#4953)
* devise.pt-BR.yml now fully translated

* pt-BR.json now fully translated

* pt-BR.yml partially translated; 46 lines left

* pt-BR.yml now fully translated

* simple_form.pt-BR.yml fully translated

* doorkeeper.pt-BR.yml now fully translated

* E-mail instructions on app/views/user_mailer added and fully translated

* PT-BR translation for #4871

* Deleted an unwanted caracter on pt-BR.yml

* Fixing typos on pt-BR.yml

* Added translation for Pinned toots tab on pt-BR.json

* Added missing translation for navigation_bar.pins

* Fixed spelling on pt-BR.yml

* Update pt-BR.json
2017-09-15 00:02:38 +02:00
Yamagishi Kazutoshi bdcc9e2ceb Add missing Japanese translations (#4947) 2017-09-14 18:03:34 +02:00
Masoud Abkenar b39d512ade l10n: update Persian translation (#4946) 2017-09-15 00:13:38 +09:00
m4sk1n 94fba44eec i18n: Update Polish translation (#4942)
* i18n: Update Polish translation

Signed-off-by: Marcin Mikołajczak <me@m4sk.in>

* i18n: Update Polish translation

Signed-off-by: Marcin Mikołajczak <me@m4sk.in>

* Update pl.yml
2017-09-14 21:58:48 +09:00
Jeroen 721460a59b Another Dutch language update (#4944)
* Update nl.json

* Update nl.yml

* Update nl.json
2017-09-14 21:52:47 +09:00
Surinna Curtis 7ebd6ed03c Apply white-space: nowrap to account relationships icons 2017-09-14 07:37:39 -05:00
Naf 45b595cdca Add Japanese translate for #4911 (#4943) 2017-09-14 18:20:04 +09:00
Quent-in aad3df6afc l10n update OC/FR video redesign (#4938)
* l10n update for Redesign video player (#4911)

* Update videp

* Update

I hope this time format works well.

* One missing string

* Update time format

I'd like the complete name of the month in the Long format and the short one in the short format.
I hope it works now
2017-09-14 16:32:14 +09:00
Surinna Curtis 59936b7a98 Tweak title text for mute notifications toggle to be clearer 2017-09-13 22:54:14 -05:00
Surinna Curtis 4a527154b7 fix a missing import 2017-09-13 21:47:30 -05:00
Surinna Curtis df71eadaae In probably dead code, replace a dispatch of muteAccount that was skipping the modal with launching the mute modal. 2017-09-13 21:47:30 -05:00
Surinna Curtis 323d437a09 satisfy eslint 2017-09-13 21:47:30 -05:00
Surinna Curtis 3278c08c29 make the hide/unhide notifications buttons work 2017-09-13 21:47:30 -05:00
Surinna Curtis 0e0703dbd8 Show whether muted users' notifications are muted in account lists 2017-09-13 21:47:30 -05:00
Surinna Curtis 30b5254a5d Put the label for the hide notifications checkbox in a label element. 2017-09-13 21:47:30 -05:00
Surinna Curtis 0a207be99d add trailing newlines to files for Pork :) 2017-09-13 21:47:30 -05:00
Surinna Curtis 2ea9b164d3 Satisfy eslint. 2017-09-13 21:47:30 -05:00
Surinna Curtis b1576c52df Convert profile header mute to use mute modal 2017-09-13 21:47:30 -05:00
Surinna Curtis 4612f7caea Break out a separate mute modal with a hide-notifications checkbox. 2017-09-13 21:47:30 -05:00
Eugen Rochko 4f0597d579 Give video player fluid max-width (#4935) 2017-09-14 04:03:00 +02:00
Eugen Rochko 2bbf987a0a Redesign video player (#4911)
* Redesign video player

* Use new video player on static public pages too

* Use media gallery component on static public pages too

* Pause video when hiding it

* Full-screen sizing on WebKit

* Add aria labels to video player buttons

* Display link card on public status page

* Fix fullscreen from modal sizing issue

* Remove contain: strict property to fix fullscreen from columns
2017-09-14 03:39:10 +02:00
Eugen Rochko 9239e4ce4d Uploads for admin site settings (#4913)
* Improve OpenGraph tags for about pages

* Add thumbnail admin setting

* Fix error

* Fix up
2017-09-14 00:04:30 +02:00
Jeroen 331263270b Updating Dutch translation (#4927)
* Update doorkeeper.nl.yml

* Update nl.yml

* Update simple_form.nl.yml

* Update nl.json

* Update en.json

* Update en.json

* Update nl.json
2017-09-13 23:12:29 +09:00
MitarashiDango 283a5ec1a4 fix share intent. (#4926) 2017-09-13 15:20:03 +02:00
abcang 60944d5dca Fix height cache (#4909) 2017-09-13 10:24:33 +02:00
unarist af10c9fbff Add section for protocol specific information on the admin page (#4910)
This PR adds section for protocol specific information, then always show
both of OStatus and ActivityPub. Specifically, this will help admins to
check PuSH subscription status and unsubscribe manually, even `protocol`
has been changed.

This also includes below changes:

* Add `overflow: hidden` to prevent float leaking
* Add missing fields for ActivityPub
2017-09-12 23:06:10 +02:00
unarist 47d48fed8d Reset preview image if avatar/header image selection was cancelled (#4893) 2017-09-11 16:19:54 +02:00
Anna e só c2bee07dbc l10n: Full PT-BR translation (#4882)
* devise.pt-BR.yml now fully translated

* pt-BR.json now fully translated

* pt-BR.yml partially translated; 46 lines left

* pt-BR.yml now fully translated

* simple_form.pt-BR.yml fully translated

* doorkeeper.pt-BR.yml now fully translated

* E-mail instructions on app/views/user_mailer added and fully translated

* PT-BR translation for #4871

* Deleted an unwanted caracter on pt-BR.yml

* Fixing typos on pt-BR.yml

* Added translation for Pinned toots tab on pt-BR.json

* Added missing translation for navigation_bar.pins
2017-09-11 08:40:29 +09:00
Masoud Abkenar a345479de2 l10n: update Persian translation (#4880)
* l10n: update Persian translation

* l10n: fix missing Persian translation
2017-09-11 08:35:27 +09:00
Surinna Curtis 29c44fa5fa Remove unused imports 2017-09-10 16:00:26 -05:00
David Yip 932571fa22 Merge tag 'v1.6.0' into sync/upstream 2017-09-10 13:04:27 -05:00
Eugen Rochko 72e662bb0d Hide modal loading screen for media/video/boost/confirm/actions modals (#4873) 2017-09-10 10:26:01 +02:00
Eugen Rochko f2cbfb2eb3 Fix dimensions of loading component for compose drawer (#4872) 2017-09-10 08:48:11 +02:00
David Yip 67ad453373 Merge tag 'v1.6.0rc4' into sync/upstream-1.6.0rc4
Conflicts:
      app/javascript/mastodon/features/getting_started/index.js
      app/javascript/packs/public.js
      app/javascript/styles/components.scss
2017-09-09 23:56:21 -05:00
David Yip 14e1fb8d36 Add missing import (patch by @MightyPork) 2017-09-09 14:28:20 -05:00
David Yip 514fc908a3 Merge tag 'v1.6.0rc3' into sync/upstream 2017-09-09 14:28:08 -05:00
David Yip b9f7bc149b Merge branch 'origin/master' into sync/upstream
Conflicts:
	app/javascript/mastodon/components/status_list.js
	app/javascript/mastodon/features/notifications/index.js
	app/javascript/mastodon/features/ui/components/modal_root.js
	app/javascript/mastodon/features/ui/components/onboarding_modal.js
	app/javascript/mastodon/features/ui/index.js
	app/javascript/styles/about.scss
	app/javascript/styles/accounts.scss
	app/javascript/styles/components.scss
	app/presenters/instance_presenter.rb
	app/services/post_status_service.rb
	app/services/reblog_service.rb
	app/views/about/more.html.haml
	app/views/about/show.html.haml
	app/views/accounts/_header.html.haml
	config/webpack/loaders/babel.js
	spec/controllers/api/v1/accounts/credentials_controller_spec.rb
2017-09-09 14:27:47 -05:00
Eugen Rochko 6867681c7c Add script to make embedded iframes autosize (#4853) 2017-09-09 16:23:44 +02:00