Skip to content

Conversation

@prakhar0608shrma
Copy link

Summary

This PR refactors Kolibri's page visibility tracking by removing the Vuex-based pageVisibility state and replacing it with a reactive composable in browserInfo.js. This simplifies state management and allows components to directly respond to visibility changes without relying on Vuex actions.

Changes

  • Added pageVisibilityRef and usePageVisibility() composable in packages/kolibri/utils/browserInfo.js
  • Removed setPageVisibility action and debounce logic from core/frontend/state/actions.js
  • Removed store.dispatch('setPageVisibility') from core/frontend/index.js
  • Verified that no components rely on Vuex pageVisibility anymore

Testing

  • Ran yarn run devserver and confirmed visibility changes are correctly tracked when switching tabs or minimizing the window
  • Verified visibility state updates via usePageVisibility()
  • All unit and integration tests pass (yarn test, pytest)

Screenshots

N/A

@learning-equality-bot
Copy link

Season's greetings! 👋

We'd like to thank everyone for another year of fruitful collaborations, engaging discussions, and for the continued support of our work. Learning Equality will be on holidays from December 22 to January 5. We look forward to much more in the new year and wish you a very happy holiday season!

Are you preparing for Google Summer of Code? See our GSoC guidelines.

@learning-equality-bot
Copy link

👋 Thanks for contributing!

We will assign a reviewer within the next two weeks. In the meantime, please ensure that:

  • You ran pre-commit locally
  • All issue requirements are satisfied
  • The contribution is aligned with our Contributing guidelines. Pay extra attention to Using generative AI. Pull requests that don't follow the guidelines will be closed.

We'll be in touch! 😊

@nucleogenesis
Copy link
Member

Thank you for your interest in contributing to our project @prakhar0608shrma

In the future, please review our Contributor's Guidelines before submitting a pull request.

I believe that this PR is intended to fix #13143 but your changes appear to be automatically generated given the arbitrary decision to remove all comments throughout the files that are changed.

I'll close this and hope to see you reaching out in our Help Wanted issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants