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

Mv3 review pr [do not merge] ⚠️ #1078

Closed
wants to merge 30 commits into from

Conversation

meandavejustice
Copy link
Collaborator

@meandavejustice meandavejustice commented Apr 25, 2022

See #666 for context why are forced by Google to do this.

This pr is just so @lidel can do a review of the current state of the mv3 branch.

The current feature set was chosen in order to prove what functionality is possible with mv3 in chrome. It is by no means complete. We have a good baseline for the future.

Features:

  • notify user to reload page when dnslink or xipfspath header detected on first load
  • dnslink urls are added to declarativeNetRequest api rules
  • copy cid and sharable links with notifications
  • display peer count in popup
  • open options page from popup (placeholder)
  • on/off button in popup
  • dweb.link => localhost replacement rule via declarativeNetRequest (more sophisticated rules will be added eventually, they are a work in progress)

There is a quite a lot of unavoidable boilerplate in this pr, the main action happens in the following files:

meandavejustice and others added 30 commits January 10, 2022 20:07
- adds mv3/ directory
- setup fast builds with esbuild
- setup prettier for formatting
- setup eslint
- setup typescript
- adds BASIC handling of ipfs.io & dweb.link URLs to local node via
declarativeNetRequest api (manifest v3)
- adds BASIC handling of DNSLink requests by parsing, talking to local
node via ipfs-http-client, and adding rule to declarativeNetRequest
ruleset
- adds boilerplate for popup
- adds mv3/ directory
- setup fast builds with esbuild
- setup prettier for formatting
- setup eslint
- setup typescript
- adds BASIC handling of ipfs.io & dweb.link URLs to local node via
declarativeNetRequest api (manifest v3)
- adds BASIC handling of DNSLink requests by parsing, talking to local
node via ipfs-http-client, and adding rule to declarativeNetRequest
ruleset
- adds boilerplate for popup
- add welcome page
- add options page
- add clipboard functionality
- add status updates to popup
- add basic UI styling to popup
- on installed checks
- on uninstalled checks
- runtime checks
- options/state cleanup
- add firefox request handling for when they support mv3
id expects and integer
@lidel lidel mentioned this pull request Sep 26, 2022
return state;
}

browser.runtime.onConnect.addListener((port: Runtime.Port) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⭐ MV3 Specific ⭐ This needs to be added for service_workers to stay alive.

}
});

// firefox specific requests
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⭐ MV3 Specific ⭐

const log = debug("ipfs-companion:request");
log.error = debug("ipfs-companion:request:error");

export default function createRequestModifier(getState, runtime) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⭐ MV3 Specific ⭐ This is how we are creating the request from chrome to local node

@meandavejustice
Copy link
Collaborator Author

After chatting with @whizzzkid, were going to go add mv3 version in a different way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants