-
-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to react-router v5 #25047
Upgrade to react-router v5 #25047
Conversation
This pull request has merge conflicts that must be resolved before it can be merged. |
This pull request has resolved merge conflicts and is ready for review. |
629f87d
to
dca9117
Compare
This pull request has merge conflicts that must be resolved before it can be merged. |
This pull request has resolved merge conflicts and is ready for review. |
f40dc4c
to
4084161
Compare
It should be replaced in a later PR by |
This pull request has merge conflicts that must be resolved before it can be merged. |
This pull request has resolved merge conflicts and is ready for review. |
This pull request has merge conflicts that must be resolved before it can be merged. |
68a3256
to
804decb
Compare
This pull request has resolved merge conflicts and is ready for review. |
This pull request has merge conflicts that must be resolved before it can be merged. |
This reverts commit 1b70d7e.
Unfortunately, this change made it impossible to type posts in Japanese (Firefox 118.0.2 (64-bit)/Mozilla Firefox Snap for Ubuntu running on Xubuntu 22.04, xfwm4-4.16.1-1, fcitx-4.2.9.8-5, fcitx-skk-0.1.4-2). I could only type hiraganas in vowels, i.e., あ い う え お). Typing a consonant, the textarea accepts the single alphabet rather than letting fcitx handle it to compose a hiragana. Reverting 1b70d7e (along with limiting the Node version to |
I'm really confused about how this change could affect input methods, especially in such a convoluted way :/ Interaction between the React app and the input method is possible, with the textarea being a controlled component, but this shouldn't involve routing at all. I'm confused. |
I have installed Peek.20-10-2023.13-54.mp4 |
Thanks Claire for looking into this! (So sorry for the typo!) Oddly, I can still reproduce the problem quickly trying the build with this merged (this time, macOS Ventura 13.6 on M1, Safari 17.0, the default Japanese input. I only typed the first Screen.Recording.2023-10-20.at.7.12.03.AM.movBelow is the build after reverting this PR which doesn't show the first Screen.Recording.2023-10-20.at.7.13.24.AM.movI'll further see if this reproduces on another build as well as locally on development environment and report back. |
Good news (I'd be able to look into this locally) and bad news (it is still there on my computer) - Mastodon at 1b70d7e without my modifications reproduced the problem with node v18.18.0 and yarn 1.22.15 running on the same Xubuntu I mentioned above in an environment with
ng.mp4At 126cd77, the same keystrokes ( ok.mp4I'll continue looking into this but I'm not sure if I'd be able to dig into the React code so any help from anybody will be appreciated! |
I saw reports of people having a similar problem typing Japanese on
Editing $ rm -rf node_modules; yarn install && bundle exec rails assets:precompile
$ foreman start -e .env.dev -f Procfile.dev https://mastodon.zunda.ninja/@zundan/111280758587306196 I'll continue to downgrade other node modules. |
It turns out that there is no other node modules I can downgrade from this PR. I'm giving up here and wait for a PR for react-router v6 to land. Sorry for the noise! |
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This reverts commit 1b70d7e.
You can not extend something that is not a class, and mastodon#25047 added a `withRouter` wrapping the export. The fix is not ideal, but I will try to rewrite those components as functional ones and remove the slim version in a further PR.
I could see that the problem zunda-san reported is reproduce with textarea in mobile UI, but not so with textarea in the left navigation column in desktop. Perhaps the problem occurs in one (or some) of several compose boxes... Additionally, access to 20231028.mp4As far as I can see now, the textareas which reproduces the problem would come from same component |
If I did this, it might have worked in my environment. https://github.com/kmycode/mastodon/pull/195/files [Attention] This is laced with fixes that are unrelated to this issue. For those who came later, please refer to zunda's commit immediately after this one. Again, this is not the best solution. |
Applying a squashed change zunda@f656108, I can now type Japanese as expected with this and some following PRs merged 🎉. Thank you, again!! |
Thanks for digging into this, I can confirm I can reproduce the issue from the |
I'm still not completely sure what is happening, but this is caused by a spurious mid-compose re-render caused by However, |
Yeah this only happens in a first keystroke and no problem thereafter. A workaround mgmn@5059969 that I wrote just for my own server seems working fine without any regressions for now, but I can't describe why this resolves the problem also still wondering what the mechanism causing... Anyway, thanks for your investigation! |
commit 59893a4 Merge: 18eacc7 36c8570 Author: Claire <claire.github-309c@sitedethib.com> Date: Fri Oct 27 17:45:19 2023 +0200 Merge pull request glitch-soc#2449 from ClearlyClaire/glitch-soc/merge-upstream Merge upstream changes up to 9a3d047 commit 36c8570 Author: Claire <claire.github-309c@sitedethib.com> Date: Wed Oct 25 20:01:51 2023 +0200 Fix HAML linting issue commit 6262095 Merge: 85d4846 9a3d047 Author: Claire <claire.github-309c@sitedethib.com> Date: Wed Oct 25 19:59:17 2023 +0200 Merge commit '9a3d047f3e604e581e18346424569e28fc9c5b96' into glitch-soc/merge-upstream commit 9a3d047 Author: Matt Jankowski <matt@jankowski.online> Date: Wed Oct 25 09:56:09 2023 -0400 Run `bin/rails app:update` with Rails 7.1 (mastodon#27522) commit 235a4cf Author: Claire <claire.github-309c@sitedethib.com> Date: Wed Oct 25 15:55:57 2023 +0200 Fix batch attachment deletion when using OpenStack Swift (mastodon#27554) commit a4e6fe3 Author: Renaud Chaput <renchap@gmail.com> Date: Wed Oct 25 14:47:37 2023 +0200 Add missing ban icons (mastodon#27555) commit 70dbf84 Author: Matt Jankowski <matt@jankowski.online> Date: Wed Oct 25 08:38:01 2023 -0400 Solve simplest haml-lint `Rubocop` lints (mastodon#27529) commit fa65c82 Author: Claire <claire.github-309c@sitedethib.com> Date: Wed Oct 25 14:01:21 2023 +0200 Fix cache store pool config deprecation warnings (mastodon#27551) commit c926f5f Author: Matt Jankowski <matt@jankowski.online> Date: Wed Oct 25 08:01:00 2023 -0400 Fix haml-lint `UnnecessaryStringOutput` for views (mastodon#27531) commit 85d4846 Author: Renaud Chaput <renchap@gmail.com> Date: Tue Oct 24 22:43:55 2023 +0200 [Glitch] Fix `<ColumnBackButtonSlim>` Port cb92cdf to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com> commit 6e9f89e Merge: ba527c0 c85e0a6 Author: Claire <claire.github-309c@sitedethib.com> Date: Wed Oct 25 12:18:45 2023 +0200 Merge commit 'c85e0a6b047f1a72ad970bc04c4e1be3f028b3d1' into glitch-soc/merge-upstream Conflicts: - `app/javascript/packs/admin.jsx`: Upstream fixed `@rails/ujs` imports. Already taken care of in 8a131fb - `app/javascript/packs/public.jsx`: Upstream fixed `@rails/ujs` imports. Already taken care of in 8a131fb commit ba527c0 Merge: b19d4eb 134de73 Author: Claire <claire.github-309c@sitedethib.com> Date: Wed Oct 25 12:14:24 2023 +0200 Merge commit '134de736dcbc6aa613fd5aec21d983d92d8b0be8' into glitch-soc/merge-upstream Conflicts: - `app/javascript/mastodon/features/compose/components/poll_form.jsx`: Upstream changed how icons are handled, including on a line modified by glitch-soc to bump the number of poll options. Applied upstream's change, while keeping the increased number of poll options. commit c85e0a6 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed Oct 25 09:36:07 2023 +0200 New Crowdin Translations (automated) (mastodon#27544) Co-authored-by: GitHub Actions <noreply@github.com> commit f261b64 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Wed Oct 25 09:16:19 2023 +0200 Update dependency node to 20.9 (mastodon#27534) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit cec7f0e Author: Matt Jankowski <matt@jankowski.online> Date: Wed Oct 25 03:12:32 2023 -0400 Remove unused `#error_explanation` id from error partials (mastodon#27536) commit cb92cdf Author: Renaud Chaput <renchap@gmail.com> Date: Tue Oct 24 22:43:55 2023 +0200 Fix `<ColumnBackButtonSlim>` (mastodon#27540) commit f08ca3f Author: Renaud Chaput <renchap@gmail.com> Date: Tue Oct 24 22:43:06 2023 +0200 Fix missing icon props (mastodon#27539) commit bc3afb6 Author: Matt Jankowski <matt@jankowski.online> Date: Tue Oct 24 16:38:19 2023 -0400 Update `rails/ujs` delegate method usage (mastodon#27538) commit b19d4eb Author: Claire <claire.github-309c@sitedethib.com> Date: Tue Oct 24 20:53:58 2023 +0200 Fix HAML linting issues commit 8123e86 Author: Claire <claire.github-309c@sitedethib.com> Date: Tue Oct 3 13:12:39 2023 +0200 [Glitch] Fix double scroll bars in some columns in advanced interface Port 37bbd3c to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com> commit b73e4b5 Author: Claire <claire.github-309c@sitedethib.com> Date: Tue Oct 24 15:24:57 2023 +0200 [Glitch] Fix history handling not properly handling states after update to react-router v5 Port 15182d1 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com> commit c6f9909 Author: たいち ひ <taichi221228@icloud.com> Date: Tue Oct 24 17:06:14 2023 +0900 [Glitch] Rewrite `emoji_unicode_mapping_light` to TS Port 9482810 to glitch-soc Co-authored-by: taichi.fukuda ひ <taichi.fukuda@systemi.co.jp> Signed-off-by: Claire <claire.github-309c@sitedethib.com> commit 4ef66d6 Merge: 3c9c029 15182d1 Author: Claire <claire.github-309c@sitedethib.com> Date: Tue Oct 24 20:31:20 2023 +0200 Merge commit '15182d1e5e595b21c47b48c5d258f30a0251e753' into glitch-soc/merge-upstream Conflicts: - `.rubocop_todo.yml`: glitch-soc had extra ignores. Removed them. commit 3c9c029 Author: Claire <claire.github-309c@sitedethib.com> Date: Tue Oct 24 20:23:46 2023 +0200 Fix ActiveRecord::Migrator monkey-patch commit 8a131fb Author: Claire <claire.github-309c@sitedethib.com> Date: Tue Oct 24 20:23:31 2023 +0200 Fix `@rails/ujs` imports commit 4b0fb76 Merge: e25cc4d e93a75f Author: Claire <claire.github-309c@sitedethib.com> Date: Tue Oct 24 19:59:19 2023 +0200 Merge commit 'e93a75f1a11d6dfdcbd39dbdc22526c5508ad881' into glitch-soc/merge-upstream Conflicts and ported changes: - updated `@rails/ujs` imports commit 134de73 Author: Eugen Rochko <eugen@zeonfederated.com> Date: Tue Oct 24 19:45:08 2023 +0200 Change icons in web UI (mastodon#27385) Co-authored-by: Renaud Chaput <renchap@gmail.com> commit b188538 Author: Michael Stanclift <mx@vmstan.com> Date: Tue Oct 24 12:32:10 2023 -0500 Fix missing libyaml-dev dependency in Dockerfile (mastodon#27533) commit e25cc4d Merge: 69ea596 379115e Author: Claire <claire.github-309c@sitedethib.com> Date: Tue Oct 24 19:31:14 2023 +0200 Merge commit '379115e601361c2b5da775fbf28b7dff9dc02e71' into glitch-soc/merge-upstream Conflicts: - `config/navigation.rb`: Conflict due to glitch-soc having extra navigation items for its theming system. Ported upstream changes. commit 69ea596 Author: Eugen Rochko <eugen@zeonfederated.com> Date: Mon Oct 23 17:07:13 2023 +0200 [Glitch] Fix explore page reloading when you navigate back to it in web UI Port d9503a1 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com> commit e6c3d3c Merge: 79c154f d9503a1 Author: Claire <claire.github-309c@sitedethib.com> Date: Tue Oct 24 19:21:01 2023 +0200 Merge commit 'd9503a1965a16328b62ea7bf0bb54e87cbe30d29' into glitch-soc/merge-upstream commit 79c154f Merge: 57c0de9 fc7734d Author: Claire <claire.github-309c@sitedethib.com> Date: Tue Oct 24 19:20:14 2023 +0200 Merge commit 'fc7734df8d8d53639bf244a2f2f3c39bc2fd12a7' into glitch-soc/merge-upstream commit 57c0de9 Merge: 787d5ad 8b770ce Author: Claire <claire.github-309c@sitedethib.com> Date: Tue Oct 24 19:17:20 2023 +0200 Merge commit '8b770ce8110e6cd609a6769c66210d95e291e3e5' into glitch-soc/merge-upstream Conflicts: - `config/initializers/content_security_policy.rb`: Upstream changed how asset host CSP directives are used, and glitch-soc has a pretty different CSP file. It may be worth reconsidering the differences between upstream and glitch-soc but for now, just port the change. commit 787d5ad Merge: 5323f0e bcae744 Author: Claire <claire.github-309c@sitedethib.com> Date: Tue Oct 24 19:05:18 2023 +0200 Merge commit 'bcae7442757845191c0e82b61cd1d0cd3ca860d1' into glitch-soc/merge-upstream Conflicts: - `yarn.lock`: Caused by a glitch-soc-only dependency (`exif-js`). Kept it. commit 5323f0e Author: Claire <claire.github-309c@sitedethib.com> Date: Mon Oct 23 11:39:53 2023 +0200 [Glitch] Fix incorrect proptypes from react-router-v5 update Port 0ad6617 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com> commit 9325cb5 Author: Renaud Chaput <renchap@gmail.com> Date: Mon Oct 23 09:43:00 2023 +0200 [Glitch] Convert `<Button>` to Typescript Port 9d45a44 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com> commit 1138d44 Author: Eugen Rochko <eugen@zeonfederated.com> Date: Fri Oct 20 04:08:13 2023 +0200 [Glitch] Fix missing background behind dismissable banner in web UI Port 33bd8ec to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com> commit b0c76ea Merge: d6eacb7 0ad6617 Author: Claire <claire.github-309c@sitedethib.com> Date: Tue Oct 24 18:41:20 2023 +0200 Merge commit '0ad66175bf59a34b03d9ab2347181548d07089ea' into glitch-soc/merge-upstream Conflicts: - `app/javascript/mastodon/features/compose/components/compose_form.jsx`: Upstream changed one import, close to a glitch-soc-only import to handle different max character counts. Ported upstream's change. commit 15182d1 Author: Claire <claire.github-309c@sitedethib.com> Date: Tue Oct 24 15:24:57 2023 +0200 Fix history handling not properly handling states after update to react-router v5 (mastodon#27526) commit 6cf9f12 Author: Renaud Chaput <renchap@gmail.com> Date: Tue Oct 24 13:43:24 2023 +0200 Create custom Github Actions for common steps (mastodon#27518) commit 714e3ae Author: Matt Jankowski <matt@jankowski.online> Date: Tue Oct 24 06:06:10 2023 -0400 Use Rails 7.1 `normalizes` feature (mastodon#27521) commit 50b7ea8 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue Oct 24 11:51:34 2023 +0200 New Crowdin Translations (automated) (mastodon#27523) Co-authored-by: GitHub Actions <noreply@github.com> commit e923bb9 Author: Matt Jankowski <matt@jankowski.online> Date: Tue Oct 24 05:30:14 2023 -0400 Use `ENV.fetch` in views, fixes rubocop haml-lint issue (mastodon#27527) commit 4fdc548 Author: Matt Jankowski <matt@jankowski.online> Date: Tue Oct 24 04:08:31 2023 -0400 Regenerate lint todos (mastodon#27513) commit 9482810 Author: たいち ひ <taichi221228@icloud.com> Date: Tue Oct 24 17:06:14 2023 +0900 Rewrite `emoji_unicode_mapping_light` to TS (mastodon#25444) Co-authored-by: taichi.fukuda ひ <taichi.fukuda@systemi.co.jp> commit e93a75f Author: Matt Jankowski <matt@jankowski.online> Date: Mon Oct 23 13:58:29 2023 -0400 Rails 7.1 update (mastodon#25963) commit 379115e Author: Claire <claire.github-309c@sitedethib.com> Date: Mon Oct 23 17:46:21 2023 +0200 Add SELF_DESTRUCT env variable to process self-destructions in the background (mastodon#26439) commit 26d2a2a Author: Daniel M Brasil <danielmbrasil@protonmail.com> Date: Mon Oct 23 12:46:21 2023 -0300 Migrate to request specs in `/api/v1/media` (mastodon#25543) commit d9503a1 Author: Eugen Rochko <eugen@zeonfederated.com> Date: Mon Oct 23 17:07:13 2023 +0200 Fix explore page reloading when you navigate back to it in web UI (mastodon#27489) commit 79a6320 Author: Claire <claire.github-309c@sitedethib.com> Date: Mon Oct 23 16:21:48 2023 +0200 Fix Layout/EmptyLineAfterGuardClause issues caused by merging an old PR (mastodon#27512) commit fc7734d Author: Renaud Chaput <renchap@gmail.com> Date: Mon Oct 23 14:38:36 2023 +0200 Remove Renovate's Lock File Maintenance task (mastodon#27510) commit 3cfdab6 Author: Matt Jankowski <matt@jankowski.online> Date: Mon Oct 23 08:35:56 2023 -0400 Prune the changelog of older entries (mastodon#27432) commit d5408db Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Oct 23 14:33:17 2023 +0200 Update dependency prom-client to v15 (mastodon#27330) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 8b770ce Author: Claire <claire.github-309c@sitedethib.com> Date: Mon Oct 23 14:30:46 2023 +0200 Add warnings to report action logs (mastodon#27425) commit 44edf3a Author: Claire <claire.github-309c@sitedethib.com> Date: Mon Oct 23 14:28:32 2023 +0200 Improve error handling in mastodon:setup task (mastodon#21464) commit 99f2534 Author: Claire <claire.github-309c@sitedethib.com> Date: Mon Oct 23 14:27:57 2023 +0200 Add support for displaying unknown servers on /admin/instances/:domain (mastodon#27150) commit c3e0eb3 Author: Claire <claire.github-309c@sitedethib.com> Date: Mon Oct 23 14:27:07 2023 +0200 Change Content-Security-Policy to be tighter on media paths (mastodon#26889) commit bcae744 Author: Claire <claire.github-309c@sitedethib.com> Date: Mon Oct 23 14:19:38 2023 +0200 Fix some link anchors being recognized as hashtags (mastodon#27271) commit 53fd28b Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Oct 23 12:45:14 2023 +0200 Update dependency react-select to v5.7.7 (mastodon#27003) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit f7b3470 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Oct 23 12:36:47 2023 +0200 Update babel monorepo to v7.23.2 (mastodon#27118) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 25751c6 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Oct 23 12:35:54 2023 +0200 Update DefinitelyTyped types (non-major) (mastodon#27414) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 1322040 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Oct 23 12:20:01 2023 +0200 Update dependency core-js to v3.33.1 (mastodon#27481) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit bb5bae1 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Oct 23 12:18:16 2023 +0200 Update dependency webpack-merge to v5.10.0 (mastodon#27420) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 69d3318 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Oct 23 12:16:02 2023 +0200 Update dependency rimraf to v5.0.5 (mastodon#27140) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit cd08b43 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Oct 23 12:15:31 2023 +0200 Update dependency sass to v1.69.4 (mastodon#27004) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 6f1eb89 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Oct 23 12:14:16 2023 +0200 Update dependency ws to v8.14.2 (mastodon#26980) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 6f429d3 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Oct 23 12:13:12 2023 +0200 Update formatjs monorepo (mastodon#27416) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 773133b Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Oct 23 12:12:17 2023 +0200 Update eslint (non-major) (mastodon#27415) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 0ad6617 Author: Claire <claire.github-309c@sitedethib.com> Date: Mon Oct 23 11:39:53 2023 +0200 Fix incorrect proptypes from react-router-v5 update (mastodon#27507) commit 70fd819 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon Oct 23 10:04:54 2023 +0200 New Crowdin Translations (automated) (mastodon#27490) Co-authored-by: GitHub Actions <noreply@github.com> commit b021347 Author: Matt Jankowski <matt@jankowski.online> Date: Mon Oct 23 03:50:02 2023 -0400 Validate allowed schemes on preview card URLs (mastodon#27485) commit 9d45a44 Author: Renaud Chaput <renchap@gmail.com> Date: Mon Oct 23 09:43:00 2023 +0200 Convert `<Button>` to Typescript (mastodon#27492) commit d6eacb7 Author: Renaud Chaput <renchap@gmail.com> Date: Thu Oct 19 19:44:55 2023 +0200 [Glitch] Upgrade to react-router v5 Port 1b70d7e to glitch-soc Co-authored-by: Claire <claire.github-309c@sitedethib.com> Signed-off-by: Claire <claire.github-309c@sitedethib.com> commit 245513d Merge: 18eacc7 1b70d7e Author: Claire <claire.github-309c@sitedethib.com> Date: Sat Oct 21 14:33:33 2023 +0200 Merge commit '1b70d7ed7c0fd3a9fcf028bf76b8c62ac8b3897f' into glitch-soc/merge-upstream commit ab0fb81 Author: Matt Jankowski <matt@jankowski.online> Date: Fri Oct 20 09:32:16 2023 -0400 Configure brakeman to ignore url safe preview card urls (mastodon#25883) commit 1368853 Author: Claire <claire.github-309c@sitedethib.com> Date: Fri Oct 20 10:45:46 2023 +0200 Fix processing LDSigned activities from actors with unknown public keys (mastodon#27474) commit 284c719 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri Oct 20 10:11:40 2023 +0200 New Crowdin Translations (automated) (mastodon#27480) Co-authored-by: GitHub Actions <noreply@github.com> commit 33bd8ec Author: Eugen Rochko <eugen@zeonfederated.com> Date: Fri Oct 20 04:08:13 2023 +0200 Fix missing background behind dismissable banner in web UI (mastodon#27479) commit 1b70d7e Author: Renaud Chaput <renchap@gmail.com> Date: Thu Oct 19 19:44:55 2023 +0200 Upgrade to react-router v5 (mastodon#25047) Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Like all my in-progress refactors, this is a draft and I did not test is as fully as I wanted, so if you have some time and want to run it locally and try to see if everything works, please do and comment any issues you find!
End-goal: React Router v6
The end-goal is to move the project to React Router v6. But as a first step, we need to migrate to v5 and have it working, then go through the upgrade from "old" v5 to the "new" v5 API, and then upgrade to v6.
This PR is only the first step, from v4 to v5 using the same "old" API. It introduces the React Hooks API, so it will be very welcome for the Typescript + Function Component refactor.
Changes
The biggest (and only) change is
this.context.router
not existing anymore (it switched to the new React hook context).It has been either removed when not used, or replaced by
withRouter
+ propsIn one case,
withRouter
messed up withref
, so I used a wrapper function component to be able to calluseLocation()
To check
Something I did not test yet is the scroll restauration feature (currently using
react-router-scroll-4
). It will probably need to be updated based on the official docs on the topic.I am also unsure of the handling of components outside of a router, but I did not know where this feature was used, so could not test it. I check for the existence of
this.props.history
, but this may not be empty, orwithRouter
might return an error?