about summary refs log tree commit diff
path: root/app/javascript
AgeCommit message (Collapse)Author
2017-09-23Add emoji autosuggest (#5053)Eugen Rochko
* 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-23Add custom emojis to the emoji picker (#5052)Eugen Rochko
2017-09-23Switch from EmojiOne to Twemoji, different emoji picker (#5046)Eugen Rochko
* Switch from EmojiOne to Twemoji, different emoji picker * Make emoji-mart use a local spritesheet * Fix emojify test * yarn manage:translations
2017-09-22Fix PropTypes.oneOfType() warning (#5041)Nolan Lawson
2017-09-22Make dropdowns render into portal, expand animation (#5018)Eugen Rochko
* Make dropdowns render into portal, expand animation * Improve actions modal style
2017-09-22Use passive listener in privacy_dropdown.js (#5037)Nolan Lawson
2017-09-22Eliminate re-renders for intersection_observer_article.js (#5036)Nolan Lawson
2017-09-21fix : mobile style of /about/more (#5034)syui
2017-09-21Fix shortname problem in emojify() (regression from #5016) (#5032)MIYAGI Hikaru
When colon appears end of line, skiped all character containing unicode emojis. Fixed. https://github.com/tootsuite/mastodon/pull/5016#issuecomment-331012008
2017-09-20Reduce wasted renders for column_loading.js (#5021)Nolan Lawson
* Reduce wasted renders for column_loading.js * Use defaultProps
2017-09-20Remove unnecessary css property (#5025)TomoyaShibata
2017-09-20Change IDs to strings rather than numbers in API JSON output (#5019)aschmitz
* 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-20Fix custom emojis with non-1:1 aspect ratio being stretched (#5017)Eugen Rochko
2017-09-19redo #4500 with customEmojis (#5016)MIYAGI Hikaru
2017-09-19Set touchstart listener to 'passive', remove 'once' (#5011)Nolan Lawson
2017-09-19Add support for multiple themes (#4959)Andrew
* 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-19Hide sensitive image in default on the public pages (#5009)unarist
Additionally, this restores previous background / text color for media spoiler.
2017-09-19Custom emoji (#4988)Eugen Rochko
* 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-19A few updates to the Spanish translation and some typos fixing (#4997)BruWalfas
* 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-18Add will-change to improve scrolling perf (#5001)Nolan Lawson
2017-09-18Re-allow underscore on valid_url_path_ending_chars (#4999)unarist
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-18Some improvements in the Spanish translation (#4991)febrezo
2017-09-17Oauth code in input form and add description message (#4986)Lynx Kotoura
* Oauth code in a input form and add description * New authcode description
2017-09-17Fix cancellation of scroll to the right (#4978)abcang
2017-09-17So Spanish. Much changes. Wow. (#4976)BruWalfas
2017-09-16Minor Chinese check & jsx addition (#4973)Mingye Wang
* 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-16Adjust landing pages 2 (#4967)Lynx Kotoura
* 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-16correct URL pattern used in text length counter in WebUI (#4968)ふぁぼ原
2017-09-16Fix hasSize condition in secSet and sizes. (#4969)Naoki Kosaka
2017-09-16Fix invisible load more button (#4962)unarist
* 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-15Remove redundant width/height values from SVGs to fix Safari bug (#4956)Eugen Rochko
2017-09-15l10n: PT-BR translation updated (#4953)Anna e só
* 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-14Add missing Japanese translations (#4947)Yamagishi Kazutoshi
2017-09-15l10n: update Persian translation (#4946)Masoud Abkenar
2017-09-14i18n: Update Polish translation (#4942)m4sk1n
* 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-14Another Dutch language update (#4944)Jeroen
* Update nl.json * Update nl.yml * Update nl.json
2017-09-14Add Japanese translate for #4911 (#4943)Naf
2017-09-14l10n update OC/FR video redesign (#4938)Quent-in
* 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-14Give video player fluid max-width (#4935)Eugen Rochko
2017-09-14Redesign video player (#4911)Eugen Rochko
* 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-14Uploads for admin site settings (#4913)Eugen Rochko
* Improve OpenGraph tags for about pages * Add thumbnail admin setting * Fix error * Fix up
2017-09-13Updating Dutch translation (#4927)Jeroen
* 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-13fix share intent. (#4926)MitarashiDango
2017-09-13Fix height cache (#4909)abcang
2017-09-12Add section for protocol specific information on the admin page (#4910)unarist
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-11Reset preview image if avatar/header image selection was cancelled (#4893)unarist
2017-09-11l10n: Full PT-BR translation (#4882)Anna e só
* 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-11l10n: update Persian translation (#4880)Masoud Abkenar
* l10n: update Persian translation * l10n: fix missing Persian translation
2017-09-10Hide modal loading screen for media/video/boost/confirm/actions modals (#4873)Eugen Rochko
2017-09-10Fix dimensions of loading component for compose drawer (#4872)Eugen Rochko