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

fix: change page reload and account switch logic #2975

Merged
merged 14 commits into from
Sep 25, 2024

Conversation

userquin
Copy link
Member

@userquin userquin commented Sep 23, 2024

This PR includes:

  • move page reload logic to the new plugin from the users module
  • we need to reload the page (any client openened: tabs or browser instances): there is no way to make it working with Chrome 129 via visibilty listeners.
  • fix masto plugin, rn calling masto in the server
  • fix hashtags and lists pages: add the folder and the index page using nuxt page on root
  • removed masto.ts plugin and moved the logic to 0.setup-users.ts plugin: client logic will activate the watcher once user signed (✔️ we should use finally instead then: DONE)

NOTE: almost impossible to test 2 previous fixes from main, any page refresh and the current token broken (masto error)

Error building elk.zone (nitropack patched locally)

imagen

EDIT: no idea what's doing Google when releasing v129

closes #2972

Copy link

netlify bot commented Sep 23, 2024

Deploy Preview for elk-docs canceled.

Name Link
🔨 Latest commit f4430b7
🔍 Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/66f41d0693ee490008e88e16

Copy link

netlify bot commented Sep 23, 2024

Deploy Preview for elk-zone ready!

Name Link
🔨 Latest commit f4430b7
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/66f41d0674dad600088c0ac5
😎 Deploy Preview https://deploy-preview-2975--elk-zone.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@userquin userquin added the do NOT merge yet Do not merge this PR into the target branch yet label Sep 23, 2024
@userquin
Copy link
Member Author

Looks like we have some problem with sign-in logic (I added some await, FF and Chrome ara not able to load home page)

@userquin
Copy link
Member Author

I need to review the useAsyncIDBKeyval composable...

@userquin
Copy link
Member Author

userquin commented Sep 24, 2024

When switching accounts on some [[account]] page:

screenshot

imagen

@userquin userquin removed the do NOT merge yet Do not merge this PR into the target branch yet label Sep 24, 2024
composables/idb/index.ts Outdated Show resolved Hide resolved
@userquin userquin added the do NOT merge yet Do not merge this PR into the target branch yet label Sep 24, 2024
@userquin
Copy link
Member Author

Cannot sign out in PR preview.

plugins/0.setup-users.ts Outdated Show resolved Hide resolved
@userquin userquin removed the do NOT merge yet Do not merge this PR into the target branch yet label Sep 25, 2024
components/nav/NavSide.vue Outdated Show resolved Hide resolved
return '/notifications'
}

return `/notifications/${lastAccessedNotificationRoute}`
Copy link
Member Author

Choose a reason for hiding this comment

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

shouldn't eslint fail here (computed without .value)?

Copy link
Member Author

Choose a reason for hiding this comment

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

RemovableRef is a type from VueUse using type instead interface (type RemovableRef<T> = Omit<Ref, 'value'> & {...}), maybe some check not being resolved: https://github.com/vuejs/eslint-plugin-vue/blob/2dc606ca589ff5cdcd197c3c64ace7e575a6347d/lib/utils/index.js#L1130

Copy link
Member

@shuuji3 shuuji3 left a comment

Choose a reason for hiding this comment

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

Tested on Firefox 130.0.1 (64-bit) on Linux.

Although I didn't fully trace the code change, I confirmed that

  • the reported reloading bug was fixed
  • list and hashtag pages are working as previously
  • last selected notification and explorer tabs are remembered correctly
  • there's reloading happening when switching accounts but I think that should not affect usability so significantly and acceptable for now

@danielroe danielroe added this pull request to the merge queue Sep 25, 2024
Merged via the queue into main with commit 44074ff Sep 25, 2024
15 checks passed
@danielroe danielroe deleted the userquin/fix-page-reload-with-channel branch September 25, 2024 15:57
@mattcen
Copy link

mattcen commented Sep 25, 2024

Thanks for the quick resolution folks! Really appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Losing my place when clicking the tab
4 participants