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

fix: update popup tab data along with icon #611

Merged
merged 1 commit into from
Sep 25, 2024
Merged

Conversation

sidvishnoi
Copy link
Member

@sidvishnoi sidvishnoi commented Sep 19, 2024

Changes proposed in this pull request

  • refactor(PopupState): add all popup data related to tab under tab
    • tabUrl -> tab.url
    • isSiteMonetized -> tab.status === 'monetized'
    • hasAllSessionsInvalid -> tab.status === 'all_sessions_invalid'
  • refactor(monetization): extract getPopupTabData to tabState service
  • refactor(tabEvents): use getPopupTabData instead of multiple params

Paves way to show more useful messages with tab.status (e.g. new tab, internal extension pages, non-https pages)

@github-actions github-actions bot added area: content Improvements or additions to extension content script area: background Improvements or additions to extension background script area: popup Improvements or additions to extension popup labels Sep 19, 2024
Copy link

github-actions bot commented Sep 19, 2024

Extension builds preview

Name Link
Latest commit 9b59924
Latest job logs Run #11030698841
BadgeDownload
BadgeDownload

@sidvishnoi sidvishnoi changed the base branch from main to edge-split-view September 20, 2024 09:56
@github-actions github-actions bot removed the area: content Improvements or additions to extension content script label Sep 20, 2024
@sidvishnoi sidvishnoi force-pushed the popup-tab-data branch 4 times, most recently from baa45f1 to 3031365 Compare September 25, 2024 08:07
@sidvishnoi sidvishnoi changed the title fix: update popup data along with icon fix: update popup tab data along with icon Sep 25, 2024
Base automatically changed from edge-split-view to main September 25, 2024 09:55
- refactor(PopupState): add all popup data related to tab under `tab`
   - `tabUrl` -> `tab.url`
   - `isSiteMonetized` -> `tab.status === 'monetized'`
   - `hasAllSessionsInvalid` -> `tab.status === 'all_sessions_invalid'`
- refactor(monetization): extract `getPopupTabData` to tabState service
- refactor(tabEvents): use `getPopupTabData` instead of multiple params

Paves way to show more useful messages with `tab.status`
  (e.g. new tab, internal extension pages, non-https pages)
@sidvishnoi sidvishnoi merged commit 2325cb3 into main Sep 25, 2024
12 checks passed
@sidvishnoi sidvishnoi deleted the popup-tab-data branch September 25, 2024 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: background Improvements or additions to extension background script area: popup Improvements or additions to extension popup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pass latest state when page navigates while popup is open
2 participants