Commit graph

53 commits

Author SHA1 Message Date
Ondřej Hruška
516eeeb43d option to add title to <Button>, use for toot buttons (#197) 2017-10-24 19:08:07 +02:00
Ondřej Hruška
d589dd7cd0 Compose buttons bar redesign + generalize dropdown (#194)
* Generalize compose dropdown for re-use

* wip stuffs

* new tootbox look and removed old doodle button files

* use the house icon for ...
2017-10-21 20:24:53 +02:00
Ondřej Hruška
eb907a5bab
formatting fix for eslint 2017-10-18 23:44:06 +02:00
David Yip
39c9cdf7fe Remove unused filesAttached property. 2017-10-18 13:20:45 -05:00
Ondřej Hruška
4421f6598f
Fix dual toot button wrong behavior after compose re-design 2017-10-16 23:32:13 +02:00
Ondřej Hruška
26f08f0791
double-decker tootbox 2017-10-16 22:10:14 +02:00
Ondřej Hruška
33e806217f
Initial doodle support 2017-10-13 18:07:01 +02:00
kibigo!
8d6b9ba494 Merge upstream 2.0ish #165 2017-10-11 10:43:10 -07: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
Ondřej Hruška
83bda6c1a8
Merge commit 'b9f59ebcc68e9da0a7158741a1a2ef3564e1321e' into merging-upstream 2017-09-28 09:18:35 +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
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
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
a3760b7729 TURBO shortcode search 2017-09-20 21:57:33 +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
Ondřej Hruška
cb42dd8497 Fix onboarding modal & add re-open button (#129)
* Added a button to open the onboarding modal

* Fixed onboarding modal

* added a show-me-around getting-started menu button
2017-08-08 21:42:29 +02:00
kibigo!
8150689b48 Merge upstream (#111) 2017-08-01 13:20:29 -07:00
Eugen Rochko
53b2b1b238 Count all URLs in text as 23 characters flat, do not count domain part of usernames (#4427)
* Count all URLs in text as 23 characters flat, do not count domain part of usernames

* Add new status text counting logic to web UI
2017-07-29 00:06:29 +02:00
Sorin Davidoi
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
Ondřej Hruška
b7cf758fbe Fix JS errors and add back commit hash 2017-07-25 21:54:12 +02:00
Ondřej Hruška
7e5691804d Merge git://github.com/tootsuite/mastodon into tootsuite-master 2017-07-25 21:36:22 +02:00
Sorin Davidoi
32fa312b2a fix(compose_from): Do not autofocus on mobile (#4344) 2017-07-24 19:54:39 +02:00
Yamagishi Kazutoshi
117eb3b2bc Change defaultMessage for spoiler placeholder (#4329) 2017-07-24 14:49:06 +02:00
Ondřej Hruška
852acbd738 amend 3ba7c1e7 to actually do what I wanted to do *facepalm* 2017-07-22 22:32:03 +02:00
Ondřej Hruška
3ba7c1e725 Textarea does not auto-expand on mobile anymore (autofocus only on desktop) 2017-07-22 21:48:56 +02:00
Ondřej Hruška
c727eae441 Updated from tootsuite 2017-07-17 20:03:57 +02:00
Sorin Davidoi
1d2616b79b fix(emojis): Handle multipoint emojis (e.g. country flags) (#4221) 2017-07-17 10:57:45 +02:00
kibigo!
09cfc079b0 Merge upstream (#81) 2017-07-15 14:33:15 -07:00
Eugen Rochko
e2685ccc81 Fix #4149, fix #1199 - Store emojis as unicode (#4189)
- Use unicode when selecting emoji through picker
- Convert shortcodes to unicode when storing text input server-side
- Do not convert shortcodes in JS anymore
2017-07-14 19:47:53 +02:00
kibigo!
5770d461b2 Moved glitch containers and commented unused files 2017-07-13 02:40:16 -07:00
Surinna Curtis
e53fbb4a09 local-only/compose advanced options tweaks.
Squashed commit of the following:

commit b9877e37f72fdd8134936e1014033b07cb6c3671
Author: Surinna Curtis <ekiru.0@gmail.com>
Date:   Wed Jul 12 00:50:10 2017 -0500

    account for the eye in the chars left count for local-only toots

commit 56ebfa96542e16daa1986cc45e07974801ee12dc
Author: Surinna Curtis <ekiru.0@gmail.com>
Date:   Wed Jul 12 00:21:02 2017 -0500

    factor out an AdvancedOptionsToggle to avoid unnecessary re-renders

commit 04cec44ab8744e4e0f52da488c9ec24b1b1422ef
Author: Surinna Curtis <ekiru.0@gmail.com>
Date:   Wed Jul 12 00:20:24 2017 -0500

    s/changeComposeAdvancedOption/toggleComposeAdvancedOption/g

commit af5815dee750d1aa8b797a9305e5ab3ce6774e3f
Author: Surinna Curtis <ekiru.0@gmail.com>
Date:   Tue Jul 11 23:55:19 2017 -0500

    clicking anywhere on the whole advanced option toggles
2017-07-12 02:14:17 -07:00
kibigo!
297921fce5 Moved glitch files to their own location ;) 2017-07-12 01:02:51 -07:00
Surinna Curtis
556cede00f Local-only option and dropdown all working 2017-07-04 21:33:53 -07:00
Surinna Curtis
85d5249479 The beginnings of an advanced options dropdown 2017-07-04 21:33:53 -07:00
Sorin Davidoi
4ce1540094 fix(features/compose): Handle external changes to the textarea (#3632) 2017-06-25 21:43:27 +02:00
Yamagishi Kazutoshi
c1a8e3d1eb Use Class and Property Decorators (#3730)
ref https://tc39.github.io/proposal-decorators/
2017-06-23 19:36:54 +02:00
Yamagishi Kazutoshi
eff9416469 Remove unused variables (#3906) 2017-06-23 16:05:04 +02:00
Gô Shoemake
29a22691d2 Fix character/grapheme count stuff (#3839)
* Bring Toot button in line with counter

Both should use stringz I guess

* Use grapheme_length for character count
2017-06-19 11:31:14 +02:00
Eugen Rochko
aebebdc5d1 Debounce autosuggestions (#3836)
* Debounce autosuggestions

* Remove duplicate import
2017-06-19 01:50:56 +02:00
Yamagishi Kazutoshi
d8ae3efec3 Improve ESLint rules for JSX (#3608)
* Add react/no-string-refs ESLint rule

* Add react/jsx-boolean-value ESLint rule

* Add react/jsx-closing-bracket-location ESLint rule

* Add react/jsx-indent ESLint rule

* Add react/jsx-curly-spacing ESLint rule

* Add react/jsx-equals-spacing ESLint rule

* Add react/jsx-first-prop-new-line ESLint rule

* Add react/jsx-no-duplicate-props ESLint rule

* Add react/jsx-tag-spacing ESLint rule
2017-06-06 13:20:07 +02:00
Yamagishi Kazutoshi
7a7bfa5170 Add quotes ESLint rules (#3602)
* Add quotes ESLint rule

* Add jsx-quotes ESlint rule

* Sort ESLint rules
2017-06-06 03:56:36 +02:00
masarakki
20b647020b refocus-after-toot (#3537) 2017-06-04 01:22:37 +02:00
Eugen Rochko
c48772fd3f Introduce react-textarea-autosize instead of using style.height side effects (#3334) 2017-05-26 18:22:23 +02:00
Yamagishi Kazutoshi
2e112e2406 Improve eslint rules (#3147)
* Add semi to ESLint rules

* Add padded-blocks to ESLint rules

* Add comma-dangle to ESLint rules

* add config/webpack and storyboard

* add streaming/

* yarn test:lint -- --fix
2017-05-20 17:31:47 +02:00
Eugen Rochko
0d59d7c680 Fix #2549 - Do not hardcode the exclamation in "toot!", wrap it in an extra locale key (#3089) 2017-05-17 00:54:24 +02:00
Yamagishi Kazutoshi
2991a7cfe6 Use ES Class Fields & Static Properties (#3008)
Use ES Class Fields & Static Properties (currently stage 2) for improve class outlook.

Added babel-plugin-transform-class-properties as a Babel plugin.
2017-05-12 14:44:10 +02:00
AA4ch1
2db53526c9 Fix compose_form.js for #2904 (#2960) 2017-05-10 14:41:39 +02:00