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

Replace localStorage usage with drift tables (#1045) #1049

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

SleepySquash
Copy link
Contributor

Resolves #1045

Synopsis

Currently localStorage is used to synchronize some data between Web tabs. However, we now have drift database, which does the synchronization without any need to use workarounds.

Solution

Replace the localStorage usage with drift:

  • Remove credentials_* related usage.
  • Replace call_* related usage with drift tables.
  • Replace prefs_call_* related usage with drift tables.

Checklist

  • Created PR:
    • In draft mode
    • Name contains issue reference
    • Has type and k:: labels applied
  • Before review:
    • Documentation is updated (if required)
    • Tests are updated (if required)
    • Changes conform code style
    • CHANGELOG entry is added (if required)
    • FCM (final commit message) is posted or updated
    • Draft mode is removed
  • Review is completed and changes are approved
    • FCM (final commit message) is approved
  • Before merge:
    • Milestone is set
    • PR's name and description are correct and up-to-date
    • All temporary labels are removed

@SleepySquash SleepySquash added enhancement Improvement of existing features or bugfix k::refactor Refactor changes of existing code platform::web Specific to Web platform labels Jun 24, 2024
@SleepySquash SleepySquash added this to the 0.1.0-alpha.14 milestone Jun 24, 2024
@SleepySquash SleepySquash self-assigned this Jun 24, 2024
@SleepySquash SleepySquash modified the milestones: 0.1.0, 0.2.0 Jun 27, 2024
@SleepySquash
Copy link
Contributor Author

In order to understand whether there's any tabs of the Web application opened at all, we should implement a mechanism based on the localStorage to properly monitor the tabs being opened and closed. Why do we need it? For example, to understand whether there's any calls happening in the popups: if there are, then should consider the call as active. Without that user might close the popup before it even initializes any Dart code, which will make the call stuck.

@SleepySquash SleepySquash modified the milestones: 0.1.3, 0.2.0 Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing features or bugfix k::refactor Refactor changes of existing code platform::web Specific to Web platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace localStorage usage with drift subscriptions
1 participant