Skip to content
Extraits de code Groupes Projets
  1. sept. 09, 2020
  2. juil. 10, 2020
  3. juil. 09, 2020
    • Sasha Sorokin's avatar
      Replace repetitive blurhash code with component (#14267) · 61c07c37
      Sasha Sorokin a rédigé
      This commit replaces all unnecessarily repeated code for decoding and
      embedding blurhash canvases with separate component - <Blurhash>.
      
      Under the hood Blurhash component will use effect dependent on its
      props. This gives a few benefits: it will only be re-rendered whenever
      the hash or width/height/dummy props update, and will not render if
      canvas won't get to the final DOM, because then effect won't fire,
      which prevents weird bugs like #14257.
      Non vérifiée
      61c07c37
  4. oct. 24, 2019
  5. oct. 03, 2019
  6. août 20, 2019
  7. août 01, 2019
  8. mai 08, 2019
  9. mai 06, 2019
  10. mai 04, 2019
  11. mai 03, 2019
  12. mai 02, 2019
  13. avr. 09, 2019
  14. jan. 31, 2019
  15. déc. 17, 2018
  16. déc. 12, 2018
    • ThibG's avatar
      Various fixes to scrollable lists and media gallery (#9501) · 55abff8a
      ThibG a rédigé
      * Always use the scrollable class for the ScrollList component
      
      Fixes #9499 as well as empty timelines' scrollbar “blinking”
      between loading state and empty state.
      
      * Do not display empty message when the list is known to have more elements
      
      Fixes #9500
      
      * Fix LoadMore usage in account media gallery
      
      (Even though that codepath is probably never actually used…)
      
      * Make account media gallery more consistent with account timeline
      
      Fixes #9498
      
      Display “load more” more consistently, add a loading indicator on first load.
      
      * Fix “load more” button when no data has been fetched
      55abff8a
  17. sept. 25, 2018
  18. sept. 14, 2018
  19. juil. 29, 2018
  20. mars 27, 2018
  21. mars 24, 2018
  22. mars 08, 2018
  23. mars 01, 2018
  24. jan. 17, 2018
  25. oct. 31, 2017
  26. oct. 27, 2017
  27. sept. 20, 2017
    • aschmitz's avatar
      Change IDs to strings rather than numbers in API JSON output (#5019) · 669fe9ee
      aschmitz a rédigé
      * 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.
      669fe9ee
  28. juin 23, 2017
  29. juin 11, 2017
    • Eugen Rochko's avatar
      Fix #3665 - Refactor timelines reducer (#3686) · 47bf7a80
      Eugen Rochko a rédigé
      * Move ancestors/descendants out of timelines reducer
      
      * Refactor timelines reducer
      
      All types of timelines now have a flat structure and use the same
      reducer functions and actions
      
      * Reintroduce some missing behaviours
      
      * Fix wrong import in reports
      
      * Fix includes typo
      
      * Fix issue related to "next" pagination in timelines and notifications
      
      * Fix bug with timeline's initial state, expandNotifications
      47bf7a80
  30. juin 06, 2017
    • Yamagishi Kazutoshi's avatar
      Improve ESLint rules for JSX (#3608) · d8ae3efe
      Yamagishi Kazutoshi a rédigé
      * 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
      d8ae3efe
  31. mai 25, 2017
  32. mai 20, 2017
    • Yamagishi Kazutoshi's avatar
      Improve eslint rules (#3147) · 2e112e24
      Yamagishi Kazutoshi a rédigé
      * 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
      2e112e24
  33. mai 19, 2017
Chargement en cours