Page MenuHomePhabricator

[Cashtab] [proof of concept] Use one App.js file for webapp and extension
AbandonedPublic

Authored by bytesofman on Dec 14 2023, 22:48.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

Drop the extension-specific version of App.js. Consolidate functionality into one App.js, with state-functions specific to the WebApp and the Extension contained in their own separate components, conditionally included in App.js at build time depending on the extension build env var.

Test Plan

npm run extension
Test getAddress at components.cashtab.com
Test paybutton
npm run build
Deploy to netlify at new url, test notification request

Diff Detail

Repository
rABC Bitcoin ABC
Branch
extension-one-app-js
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 25968
Build 51510: Build Diffcashtab-tests
Build 51509: arc lint + arc unit

Event Timeline

Need to review, run more tests.

prob best to keep this as proof of concept and do this in lots of small parts

bytesofman retitled this revision from [Cashtab] Use one App.js file for webapp and extension to [Cashtab] [proof of concept] Use one App.js file for webapp and extension.Dec 14 2023, 23:44

Steps

  • WebApp functionality to its own WebApp component D14989
  • Extension functionality to its own Extension component D14990
  • Extension vs WebApp rendering differences (popout)
  • no service worker in extension
  • extension css global style
  • No swap in extension
  • deprecate extension/src/components/App.js and update extension.sh build script

Next

  • port connection in extension should be managed in state and handle disconnects