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

Update popup content dynamically #2347

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft

Conversation

varjolintu
Copy link
Member

@varjolintu varjolintu commented Sep 22, 2024

Instead of having a separate HTML and JavaScript files for each popup, use just single popup for everything and parse the content based on the page.popupData. The refactor also eliminates some duplicate code in the popup files.

The content should now change in real time according to database state (open/locked/login/default) if the popup is open.

Other minor changes:

  • Popup states and icon types are converted to enums.
  • browserAction.show() is renamed to browserAction.updatePopupIcon().
  • browserAction.showDefault() is renamed to browserAction.updatePopup().

TODO:

  • Use only single popup file
  • Change content dynamically when popup is open
  • There's a delay with get_status on Firefox every time the popup is opened
  • After connecting a new database the status does not update correctly

Fixes #76.

@varjolintu varjolintu marked this pull request as draft September 22, 2024 12:10
@varjolintu varjolintu added this to the 1.9.4 milestone Sep 29, 2024
@varjolintu varjolintu modified the milestones: 1.9.4, Next Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update popup when things change immediately
1 participant