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

feat: refetch home page when click elk logo #1129

Merged
merged 14 commits into from
Jan 31, 2023

Conversation

Mini-ghost
Copy link
Member

In the current version, clicking the Elk Logo in the navigation bar will reload the entire page.

2023-01-15.12.41.53.mov

According #86, this is to expect that when the Logo is clicked, page will jump to top and refresh timeline to latest.

I try to refactor it with nuxt hook to avoid refetching the whole page.

2023-01-15.12.49.39.mov

@stackblitz
Copy link

stackblitz bot commented Jan 14, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify
Copy link

netlify bot commented Jan 14, 2023

Deploy Preview for elk-docs canceled.

Name Link
🔨 Latest commit c723cb9
🔍 Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/63d7e720f0ccc00007aca00b

Copy link
Member

@antfu antfu left a comment

Choose a reason for hiding this comment

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

I think the full page reload should be fixed, but not sure if it makes sense to serve the logo as a refresh button instead of "Go to home page"?

components/nav/NavTitle.vue Show resolved Hide resolved
@frankgx97
Copy link

Would it make more sense to use the home button rather than the elk logo? Mobile devices cannot benefit from this feature since there's no elk logo at all, also considering currently there's no way to refresh timeline in PWA other than killing and relaunching the app.

@Mini-ghost
Copy link
Member Author

I think the full page reload should be fixed, but not sure if it makes sense to serve the logo as a refresh button instead of "Go to home page"?

In this PR, the link behavior is "Go to homepage" if the user is not on the homepage, otherwise "Refetch timeline data" if the user is on the homepage, is this PR title inaccurate ?

@Mini-ghost Mini-ghost requested a review from antfu January 17, 2023 00:58
@Mini-ghost Mini-ghost changed the title feat: refresh home page when click elk logo feat: refetch home page when click elk logo Jan 24, 2023
# Conflicts:
#	components/common/CommonPaginator.vue
@netlify
Copy link

netlify bot commented Jan 24, 2023

Deploy Preview for elk-zone ready!

Name Link
🔨 Latest commit c723cb9
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/63d7e72014bcd700084beffe
😎 Deploy Preview https://deploy-preview-1129--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 settings.

@patak-dev
Copy link
Member

I now get a blank timeline if I open the preview, scroll down a bit, and then press the logo.

@Mini-ghost Mini-ghost requested review from edimitchel and removed request for antfu January 24, 2023 09:09
@Mini-ghost
Copy link
Member Author

I now get a blank timeline if I open the preview, scroll down a bit, and then press the logo.

This solved!

middleware/auth.ts Outdated Show resolved Hide resolved
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.

5 participants