Skip to content
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

enhance: PizzaxデータをindexedDBに保存するように #8098

Merged
merged 76 commits into from
Nov 24, 2022

Conversation

tamaina
Copy link
Contributor

@tamaina tamaina commented Dec 29, 2021

Related to #5439

Required #8511

What

  • pizzaxをindexedDBに保存するように
  • BroadcastChannelを使ってタブ間で状態を共有するように
  • メインストリームをpizzaxインスタンスを超えて使いまわすように(disposeはきついと思うので)
  • ちょっとだけリファクター

Why

TODOに書いてあったのと#5439に示した理由もある

@tamaina
Copy link
Contributor Author

tamaina commented Dec 29, 2021

deckを開くと画面が背景色のままフリーズするんだけど、原因がわからない(

@tamaina
Copy link
Contributor Author

tamaina commented Dec 29, 2021

async setup()する場合はsuspence書かなきゃなのか

@tamaina
Copy link
Contributor Author

tamaina commented Dec 29, 2021

suspenceはそもそもexperimentalだった

init.tsでawaitするようにしよう

@tamaina
Copy link
Contributor Author

tamaina commented Dec 29, 2021

p1.a9z.devにマージしてみた

マイグレーションはちゃんと動く

@tamaina tamaina marked this pull request as ready for review December 29, 2021 18:39
@tamaina
Copy link
Contributor Author

tamaina commented May 1, 2022

deepcopyをstructuredCloneにした(Safari 15.4以上必須)

toRawも使ってみたけど、デッキのウィジェットを並べ替えたときににエラーが出た。面倒なのでdeepcopyに戻した。

@github-actions github-actions bot added the packages/frontend Client side specific issue/PR label May 27, 2022
Copy link
Contributor

@pixeldesu pixeldesu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked out the branch and tested this:

pizzaxをindexedDBに保存するように

This is the case, including the caches for the client preference registries

BroadcastChannelを使ってタブ間で状態を共有するように

This works fine as well, tested with two settings/general tabs and switching settings on/off, state was shared between the tabs without problems.


My previous localStorage values from my local instance also have been migrated properly by the newly introduced code and I didn't have any issues using it right away.

🎉

@tamaina

This comment was marked as outdated.

@tamaina

This comment was marked as outdated.

@tamaina tamaina merged commit 11d2654 into misskey-dev:develop Nov 24, 2022
@tamaina
Copy link
Contributor Author

tamaina commented Nov 24, 2022

あこれまじ?

@tamaina
Copy link
Contributor Author

tamaina commented Nov 24, 2022

c2-2にマージするつもりでdevelopにマージしてしまったどうしよう

@tamaina
Copy link
Contributor Author

tamaina commented Nov 24, 2022

とりあえずrevertするか

@tamaina
Copy link
Contributor Author

tamaina commented Nov 24, 2022

マージコミットがなくて詰んだかも
(自分のプロジェクトだったらマージ直前のdevelopツリーがあればGitHubのdevelopを挿げ替えるといったことをしてた)

@tamaina
Copy link
Contributor Author

tamaina commented Nov 24, 2022

https://github.com/misskey-dev/misskey/pull/8098/files には変更差分があるので手動でrevertするか

@rinsuki
Copy link
Contributor

rinsuki commented Nov 24, 2022

c79976f じゃなくて?

@rinsuki
Copy link
Contributor

rinsuki commented Nov 24, 2022

いやこれ逆か

tamaina added a commit that referenced this pull request Nov 24, 2022
tamaina added a commit to tamaina/misskey that referenced this pull request Nov 24, 2022
@tamaina
Copy link
Contributor Author

tamaina commented Nov 24, 2022

手動revertした

8b9dc96

syuilo pushed a commit that referenced this pull request Feb 2, 2023
* Revert "Revert #8098"

This reverts commit 8b9dc96.

* fix

* use deepClone instead of deepclone

* defaultStore.loaded

* fix load

* wait ready

* use top-level await, await in device-kind.ts
AyumuNekozuki pushed a commit to AyumuNekozuki/misskey that referenced this pull request Feb 13, 2023
* Revert "Revert misskey-dev#8098"

This reverts commit 8b9dc96.

* fix

* use deepClone instead of deepclone

* defaultStore.loaded

* fix load

* wait ready

* use top-level await, await in device-kind.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/frontend Client side specific issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants