Commit Graph

677 Commits (3283868e28794d7abe217c525aadf5e7b9e2fa66)

Author SHA1 Message Date
Eugen Rochko 0f699a4280 When muting, clear web UI like for blocks (#5172)
* When muting, clear web UI like for blocks

* Fix style issue
7 years ago
Eugen Rochko 5e5f36c216 Fix #5079, fix #5186 - Emoji picker fixes (#5187) 7 years ago
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>
7 years ago
Eugen Rochko 4453c9a9f5 Search popout (#5170) 7 years ago
Nolan Lawson b9c612b561 Code-split emoji-mart picker and data (#5175) 7 years ago
Nolan Lawson c567c87453 Toggle contain:strict on fullscreen (#5159)
* Toggle contain:strict on fullscreen

* Fix scss lint issue

* fix scss whitespace lint issue
7 years ago
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
7 years ago
Eugen Rochko 0b3f1ec62a Reorganize preferences page (#5161) 7 years ago
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.
7 years ago
MIYAGI Hikaru 7481ae1bcb trivial refactoring for emojify() (#5075)
* unite loop process
* add hint for original emojifier
7 years ago
Nolan Lawson ca0e8be20c Improve IntersectionObserverArticle perf (#5152) 7 years ago
Eugen Rochko d6fe0954e3 Make emoji autosuggestions immediate, usernames appear sooner (#5149)
* Do not debounce emoji search

* Make autosuggestions appear sooner
7 years ago
Eugen Rochko ebb8c89207 Upgrade to React 16 (#5119)
* Upgrade to React 16.0.0

* Disable some uncritical tests while chai-enzyme remains incompatible
7 years ago
Nolan Lawson 0060f98847 Remove react-sizeme (#5143)
* Remove react-sizeme

* Fix aspect ratio in "sensitive" mode
7 years ago
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.
7 years ago
Eugen Rochko 887cd94e96 Increase attachment descriptions to 420 characters (#5139)
Blaze it
7 years ago
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%)
7 years ago
Nolan Lawson 6e0659c838 Improve performance of modal and swipe animations (#5135)
* Improve performance of modal and swipe animations

* Fix eslint issues
7 years ago
Jakob Kramer a3202f61af Updated German translation (#5132) 7 years ago
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
7 years ago
Eugen Rochko e648ef0bfb Remove web UI warnings about OStatus privacy (#5102)
* Remove web UI warnings about OStatus privacy

* yarn run manage:translations
7 years ago
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
7 years ago
Lynx Kotoura 259181c41a Fix size of single media in media-gallery (#5098) 7 years ago
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.
7 years ago
Eugen Rochko 2c8e3fbbfb Generate 500.html with assets:precompile, remove loading from Google Fonts (#5067) 7 years ago
JeanGauthier 3f3de38075 OC update: different emoji picker (#5046) (#5077) 7 years ago
abcang e756c4f5ec Fix media spoiler of DetailedStatus (#5071) 7 years ago
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
7 years ago
Eugen Rochko dae0af1fd2 Change mobile layout breakpoint from 1024px to 630px (#5063)
630px = Drawer + 1 Column
7 years ago
Eugen Rochko 5b8d0ad71b Dropdown triangles a bit nicer, smoother scrolling on touch (#5062) 7 years ago
Eugen Rochko 233258c61b Fix media gallery CSS (#5064) 7 years ago
Eugen Rochko 9c8aad612e Require at least 2 characters before showing autosuggestions (#5065) 7 years ago
Mingye Wang 6dfeb64326 jsx/zh-*: Fix "pin column" for Chinese (#5060) 7 years ago
m4sk1n 427beb4177 i18n: Update Polish translation (#5058) 7 years ago
Lynx Kotoura 838f255fc2 Fix overflowing tabs in account__action-bar (#5056)
* Fix numbers in accounts columns

* Support edge compact-header
7 years ago
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
7 years ago
Eugen Rochko 66126f3021 Add custom emojis to the emoji picker (#5052) 7 years ago
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
7 years ago
Nolan Lawson b01ab55ed8 Fix PropTypes.oneOfType() warning (#5041) 7 years ago
Eugen Rochko 034fab39ab Make dropdowns render into portal, expand animation (#5018)
* Make dropdowns render into portal, expand animation

* Improve actions modal style
7 years ago
Nolan Lawson 0df6442636 Use passive listener in privacy_dropdown.js (#5037) 7 years ago
Nolan Lawson 245816ab27 Eliminate re-renders for intersection_observer_article.js (#5036) 7 years ago
syui 63819c848d fix : mobile style of /about/more (#5034) 7 years ago
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
7 years ago
Nolan Lawson 798b0fc5af Reduce wasted renders for column_loading.js (#5021)
* Reduce wasted renders for column_loading.js

* Use defaultProps
7 years ago
TomoyaShibata 8cb4561145 Remove unnecessary css property (#5025) 7 years ago
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.
7 years ago
Eugen Rochko b35406b700 Fix custom emojis with non-1:1 aspect ratio being stretched (#5017) 7 years ago
MIYAGI Hikaru 8e33fc29d7 redo #4500 with customEmojis (#5016) 7 years ago
Nolan Lawson e5c65b3067 Set touchstart listener to 'passive', remove 'once' (#5011) 7 years ago
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
7 years ago
unarist 4aea3f88a6 Hide sensitive image in default on the public pages (#5009)
Additionally, this restores previous background / text color for media spoiler.
7 years ago
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
7 years ago
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
7 years ago
Nolan Lawson 3d640dc8ac Add will-change to improve scrolling perf (#5001) 7 years ago
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.
7 years ago
febrezo cf14f4945a Some improvements in the Spanish translation (#4991) 7 years ago
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
7 years ago
abcang 44245926f1 Fix cancellation of scroll to the right (#4978) 7 years ago
BruWalfas 7be3131240 So Spanish. Much changes. Wow. (#4976) 7 years ago
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
7 years ago
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
7 years ago
ふぁぼ原 629fae8b3b correct URL pattern used in text length counter in WebUI (#4968) 7 years ago
Naoki Kosaka cea5597722 Fix hasSize condition in secSet and sizes. (#4969) 7 years ago
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
7 years ago
Eugen Rochko 0d1215e82f Remove redundant width/height values from SVGs to fix Safari bug (#4956) 7 years ago
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
7 years ago
Yamagishi Kazutoshi bdcc9e2ceb Add missing Japanese translations (#4947) 7 years ago
Masoud Abkenar b39d512ade l10n: update Persian translation (#4946) 7 years ago
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
7 years ago
Jeroen 721460a59b Another Dutch language update (#4944)
* Update nl.json

* Update nl.yml

* Update nl.json
7 years ago
Naf 45b595cdca Add Japanese translate for #4911 (#4943) 7 years ago
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
7 years ago
Eugen Rochko 4f0597d579 Give video player fluid max-width (#4935) 7 years ago
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
7 years ago
Eugen Rochko 9239e4ce4d Uploads for admin site settings (#4913)
* Improve OpenGraph tags for about pages

* Add thumbnail admin setting

* Fix error

* Fix up
7 years ago
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
7 years ago
MitarashiDango 283a5ec1a4 fix share intent. (#4926) 7 years ago
abcang 60944d5dca Fix height cache (#4909) 7 years ago
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
7 years ago
unarist 47d48fed8d Reset preview image if avatar/header image selection was cancelled (#4893) 7 years ago
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
7 years ago
Masoud Abkenar a345479de2 l10n: update Persian translation (#4880)
* l10n: update Persian translation

* l10n: fix missing Persian translation
7 years ago
Eugen Rochko 72e662bb0d Hide modal loading screen for media/video/boost/confirm/actions modals (#4873) 7 years ago
Eugen Rochko f2cbfb2eb3 Fix dimensions of loading component for compose drawer (#4872) 7 years ago
Eugen Rochko 6867681c7c Add script to make embedded iframes autosize (#4853) 7 years ago
Eugen Rochko bdc8b4fd91 Disable mouse-based pause from #4859 (#4865)
It wasn't working ideally and introduced some annoying false positivies
7 years ago
unarist c7908e2d09 Fix scroll behavior and others on paused timeline (#4864)
Resolved:

* Lot of redundant renders while mouse moving
* Scroll jumping when timeline loaded
* Scroll position isn't kept when statuses below the scrollTop was deleted then new status arrived

Unresolved:

* Scroll position isn't kept when statuses over the scrollTop was deleted then new status arrived
-> It needs to know which statuses are over the scrollTop
* New status indicator should be active when new statuses arrived while mouse moved recently
-> It needs a) update indicator in ScrollableList, or b) set scrollTop status while mouse moving
7 years ago
Yamagishi Kazutoshi c9d04f1c39 Fix second report (regression from 3b81baaaaf) (#4863) 7 years ago
Lynx Kotoura 3c45d3963a Scrollable tables in settings pages (#4857)
* Scrollable tables in settings pages

* Add space before curly brace
7 years ago
Eugen Rochko baa8b82179 Fix #1004 - Temporarily pause timeline if there's been recent mouse movement (#4859) 7 years ago
unarist 1ae5d49a71 Refresh timeline after toot while the timeline is disconnected (#4858)
To reflect status posting immediately, we've inserted the status into timelines directly. However, status insertion changes "latest status", and it means next timeline refresh only fetches statuses since the inserted status. This behavior is very bad for disconnected timeline and mobile views.

After this patch, it refreshes timeline for disconnected timelines, instead of direct insertion.
7 years ago
Quent-in dabc309ca3 i10n update OC and FR (#4849)
* Missing "navigation_bar.pins"

* Missing "navigation_bar.pins"
7 years ago
Eugen Rochko 95f018a3d4 "Mute conversation" option on all own toots, not just in notifications (#4844)
That way you can mute notifications for a toot before you get replies
to it or boosts or favourites
7 years ago
m4sk1n 7c2d84910c i18n: Update Polish translation (#4845)
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
7 years ago
Quent-in b00cc4b9bd i10n OC / FR update Pinned toots (#4842)
* Added column.pins

New strings

* Added column.pins

* Update confirmation_instructions.oc.html.erb

* Update confirmation_instructions.oc.text.erb

* Update password_change.oc.html.erb

* Update password_change.oc.text.erb

* Update reset_password_instructions.oc.html.erb

* Update reset_password_instructions.oc.text.erb

* Update confirmation_instructions.oc.html.erb

* Update confirmation_instructions.oc.text.erb
7 years ago
PFM 7d853b514a Use <button> instead of <div role="button"> (#4835) 7 years ago
voidSatisfaction 85c7c42098 Add Pinned toot column (#4817)
* Add Pinned_toot_section

* Fix add frozen_string_literal

* Fix delete no need controller and tests

* Fix replace query strings to axios params

* Fix change value to accountId and disabling more button
7 years ago
Quent-in be75b13d68 i10n update OC and FR files (#4824)
* Onboarding: corrections

Some missing letters and spaces or better wording

* Embed

Translated as Intégrer in FR / Embarcar in OC
7 years ago
Olivier Humbert 9417c9bb8f Update fr.json (#4830)
typo
7 years ago