feat(stage-tamagotchi): memorize scroll position#752
feat(stage-tamagotchi): memorize scroll position#752nekomeowww merged 4 commits intomoeru-ai:mainfrom
Conversation
Summary of ChangesHello @Mr-Quin, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves an issue in the Electron environment where the scroll position was not retained when navigating between different pages, leading to a suboptimal user experience. It achieves this by introducing a dedicated Vue composable ( Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
✅ Deploy Preview for airi-vtuber ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for airi-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Code Review
This pull request introduces a fix for restoring scroll position when navigating between pages in Electron. It achieves this by creating a new Vue composable, useRestoreScroll, which tracks and restores the scroll position of a designated container as the route changes. This composable is then implemented in the settings layout.
The changes in settings.vue and index.html look good. My review includes a suggestion to refactor the new useRestoreScroll composable to improve its robustness by making the scroll position storage a singleton, and by adding checks to prevent potential errors from asynchronous updates. This will ensure scroll positions are preserved even when navigating away from and back to pages using this functionality.
# Conflicts: # apps/stage-tamagotchi/src/renderer/layouts/settings.vue
Description
On electron, since the scroll element is not
document, scroll position is lost when navigating between pages.This PR fixes that.
Linked Issues
Additional Context