Skip to content

Feature Request: Update popup to show when Rapid is open in the current tab #9

@cubeydice

Description

@cubeydice

Description

image

Currently, the popup shows "test test test". Update to show whether Rapid is running in the current tab and alert developers to use the tool, similar to React's popup shown below.

Screenshot 2024-07-26 at 1 10 08 AM

Details

To do this, you may need to use message passing to retrieve whether Rapid is running in the opened tab's window.
In src > injected > injected.js, there is a script currently injected into the page to post a message with rapid's version number.

const sendRapidContext = () => { window.postMessage({rapid: { rapidVersion, currHistIndex, diffObj }}, '*'); }

The service worker in src > service-worker > background.js currently listens for this message and sends it to the devtools panel. It will need to also be sent to the popup.

Resources

I recommend the following resources on how to get this to work:
Chrome extensions: Handling messaging from injected scripts
Backbone-Debugger

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions