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 data along with icon #611

Draft
wants to merge 1 commit into
base: edge-split-view
Choose a base branch
from

Conversation

sidvishnoi
Copy link
Member

@sidvishnoi sidvishnoi commented Sep 19, 2024

TODO: Rebase after #608

Changes proposed in this pull request

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

Paves way for showing more useful messages with tab.cannotMonetizeReason (e.g. new tab, internal extension pages, non-https pages) (#584)

@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 baa45f1
Latest job logs Run #10957462997
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 2 times, most recently from 217fe8c to 68fa7fb Compare September 20, 2024 10:12
- refactor(PopupState): add all popup data related to tab under `tab` key
   - `tabUrl` -> `tab.url`
   - `isSiteMonetized` -> `tab.isMonetized`
   - `hasAllSessionsInvalid`
        -> `tab.cannotMonetizeReason === '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.cannotMonetizeReason`
  (e.g. new tab, internal extension pages, non-https pages)
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
1 participant