1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00
Commit graph

8551 commits

Author SHA1 Message Date
taichi221228
5735e09738 Refactor emoji utilities by introducing type aliases
This commit introduces type aliases to the emoji utilities in JavaScript code, specifically `RawEmoji` and `GetDataArgs`. These changes help to simplify function signatures. By extracting complex types into separate type aliases, the code readability has been improved significantly.
2024-05-02 13:22:56 +09:00
taichi221228
ca30b5b3ef Remove unused JSON constant from emoji utilities
The unused constant `_JSON` was removed from the `emoji_utils.ts` file. This decluttering enhances the manageability and readability of the code.
2024-05-02 11:25:55 +09:00
taichi221228
d6015029e2 Refactor emoji utils in mastodon features
The refactoring of emoji utilities in the mastodon feature has been done to enhance readability and maintenance of the code. The types and functions involved in sanitizing and getting data have been clarified, including the introduction of an interface for skin tones. Additionally, erroneous typescript comments have been removed and the emojis type has been exported for further use.
2024-05-02 11:22:49 +09:00
taichi221228
a603a353d4 Add comments for skin_tone in emoji_utils.ts
This commit adds detailed comments explaining the usage of `skin_tone` in emoji_utils.ts, noting its absence in the type definition link and the need for a separate type with DefinitelyTyped. It also highlights potential mismatch issues between versions of `@types/emoji-mart` and `emoji-mart`, given they have different maintainers and packages.
2024-04-24 10:22:32 +09:00
taichi221228
2236a16d55 Refactor and improve emoji sanitization function
The emoji sanitization function has been refactored for better handling of emoji variations. New types have been imported from 'emoji-mart', allowing for a more precise type assignment for the emoji input and output. Bound checking operations have been adjusted to better accommodate and handle custom emojis and skin variations.
2024-04-24 10:04:33 +09:00
taichi221228
3c7ccb2e62 Refactor unifiedToNative function in emoji_utils
The unifiedToNative function in emoji_utils.ts has been refactored for cleaner coding practices. Lint disabling has been moved to a different part of the code, and type checking has been revised to specify that the input unified is of type Emoji['unified']. The function's variables have been updated to const for better securities against undesired changes.
2024-04-24 10:01:27 +09:00
taichi221228
1c4cf654d7 Remove unnecessary stringFromCodePoint function polyfill in emoji_utils
Removed the unnecessary stringFromCodePoint function polyfill from the emoji_utils.ts file. Instead, we use the built-in JavaScript function String.fromCodePoint to simplify the code.
2024-04-24 10:00:13 +09:00
taichi221228
47b82ee7c8 Refactor buildSearch function in emoji_utils.ts
The buildSearch function has been refactored for better coding practices. More explicit typings and declaration were used, and the logic related to array search has been simplified for better readability. The 'eslint-disable' comment line was moved to a more appropriate location after these changes.
2024-04-24 09:55:00 +09:00
taichi221228
6d873032de Add '@ts-expect-error' to suppress TypeScript errors 2024-04-24 09:53:56 +09:00
taichi221228
4f337b9804 Rename emoji_utils.js to TS 2024-04-23 22:20:53 +09:00
Matt Jankowski
33e829763d
Use shared form partial for admin/domain_blocks views (#29609) 2024-04-22 12:22:16 +00:00
Tim Rogers
1ca6ff8ca5
Fixed crash when supplying FFMPEG_BINARY environment variable (#30022) 2024-04-22 09:00:24 +00:00
Tim Rogers
75163d9daf
Fixed rendering error on /start when not logged in (#30023) 2024-04-22 08:53:08 +00:00
github-actions[bot]
3655fb6a22
New Crowdin Translations (automated) (#30014)
Co-authored-by: GitHub Actions <noreply@github.com>
2024-04-22 08:42:35 +00:00
github-actions[bot]
ec71c02c4b
New Crowdin Translations (automated) (#29994)
Co-authored-by: GitHub Actions <noreply@github.com>
2024-04-19 13:57:43 +00:00
Matt Jankowski
4837bfcc6a
Use shared form partial for admin/announcements views (#29608) 2024-04-19 13:57:32 +00:00
github-actions[bot]
443186ff40
New Crowdin Translations (automated) (#29980)
Co-authored-by: GitHub Actions <noreply@github.com>
2024-04-18 11:18:39 +00:00
Matt Jankowski
11e0049b08
Use enum-generated scopes/queries for BulkImport (#29975) 2024-04-18 10:13:35 +00:00
Matt Jankowski
650c548c31
Add not_featured_by scope to Tag (#28815) 2024-04-17 10:05:38 +00:00
Matt Jankowski
1d3ecd3fba
Add API::Pagination concern (#28826) 2024-04-17 09:22:45 +00:00
github-actions[bot]
c35042b7eb
New Crowdin Translations (automated) (#29972)
Co-authored-by: GitHub Actions <noreply@github.com>
2024-04-17 09:07:13 +00:00
Claire
fc89ecc6ca
Change /api/v1/announcements to return regular Status entities (#26736) 2024-04-17 09:06:23 +00:00
Matt Jankowski
6fed108703
Use Rails upsert to generate update_count! query in Counters concern (#28738)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2024-04-17 08:16:51 +00:00
Matt Jankowski
caad1e2628
Add scope Status.distributable_visibility (#29950) 2024-04-16 13:16:54 +00:00
Matt Jankowski
6b33d3f81b
Add CustomFilter.unexpired scope (#29896) 2024-04-16 09:29:34 +00:00
Claire
66ee0d4a1f
Fix incorrect label for filtered notifications badge (#29922) 2024-04-16 09:25:23 +00:00
Matt Jankowski
3159c0a547
Add scope Status.list_eligible_visibility (#29951) 2024-04-16 09:17:03 +00:00
github-actions[bot]
285d4123b5
New Crowdin Translations (automated) (#29955)
Co-authored-by: GitHub Actions <noreply@github.com>
2024-04-16 08:36:21 +00:00
Claire
4117c8f6b8
Fix unfollow button being out of frame on small screens on old browsers (#29923) 2024-04-15 11:56:48 +00:00
github-actions[bot]
4e78cb9988
New Crowdin Translations (automated) (#29939)
Co-authored-by: GitHub Actions <noreply@github.com>
2024-04-15 09:29:39 +00:00
Renaud Chaput
ee4ea83a87
Remove image_pack_tag usage (#29925) 2024-04-15 09:05:19 +00:00
Claire
c386c36866
Add / keyboard shortcut to focus the search field (#29921) 2024-04-12 09:42:12 +00:00
Matt Jankowski
13bbde2246
Use existing DEFAULT_FIELDS_SIZE constant to limit Account#fields (#29911) 2024-04-12 09:04:23 +00:00
github-actions[bot]
5992df0762
New Crowdin Translations (automated) (#29920)
Co-authored-by: GitHub Actions <noreply@github.com>
2024-04-12 08:19:48 +00:00
Matt Jankowski
449f99e168
Fix repeated concat output buffer duplicating layout markup (#29918) 2024-04-11 23:37:07 +00:00
github-actions[bot]
20b1e55f24
New Crowdin Translations (automated) (#29903)
Co-authored-by: GitHub Actions <noreply@github.com>
2024-04-11 10:30:31 +00:00
github-actions[bot]
db5a5636d9
New Crowdin Translations (automated) (#29888)
Co-authored-by: GitHub Actions <noreply@github.com>
2024-04-10 13:03:40 +00:00
Matt Jankowski
b57ee5cf5b
Fix Style/MapIntoArray cop in context helper (#29885) 2024-04-10 12:46:39 +00:00
Matt Jankowski
285f63c02e
Use composable query in User.active scope (#29775) 2024-04-08 13:53:49 +00:00
Claire
babbf6017d
Remove caching in cache_collection (#29862) 2024-04-08 13:46:13 +00:00
Claire
f3430eebbb
Fix hashtag string interpolation in welcome email (#29879) 2024-04-08 13:45:25 +00:00
github-actions[bot]
13faf26315
New Crowdin Translations (automated) (#29859)
Co-authored-by: GitHub Actions <noreply@github.com>
2024-04-08 13:44:54 +00:00
Renaud Chaput
730e2127e1
Fix webpack warnings due to unhandled extensions (LICENCE and README.md) (#29869) 2024-04-08 08:17:51 +00:00
Matt Jankowski
b61ae28f8d
Separate methods for theme style and meta color tags (#29802) 2024-04-05 09:52:43 +00:00
Matt Jankowski
c0fe8a9f13
Extract shared callback behaviour to CustomFilterCache concern (#29695) 2024-04-05 09:17:58 +00:00
Renaud Chaput
6ac90d4c5d
Add tests for our number formatting function (#29852) 2024-04-05 08:06:31 +00:00
Renaud Chaput
906a399634
Fix wrong extension for a test file (#29853) 2024-04-05 07:57:44 +00:00
Claire
38b9d31f63
Improve email address validation (#29838) 2024-04-05 07:48:45 +00:00
Matt Jankowski
601834d746
Use partial collection render for welcome mailer features (#29843) 2024-04-04 16:13:10 +00:00
Michael Stanclift
1c87cb8019
Add purple border to active compose field search inputs (#29839) 2024-04-04 11:51:06 +00:00