-
Notifications
You must be signed in to change notification settings - Fork 324
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
Ship the new WebUI #590
Ship the new WebUI #590
Conversation
@olizilla any quick thoughts on how to improve the bundling process? |
ae3ed09
to
59ce947
Compare
This is an initial stab at bundling. This PoC is very crude: we just do regular build in `node_modules/` and copy artifacts. Refinements will be introduced in following commits.
WebUI would notice issue eventually, but this gives user an instant fix and results in better UX.
5a6e2be
to
b3d12ff
Compare
No longer requires local build. Tries to fetch it from IPFS, then fallbacks to HTTP. Should work on all platforms.
b3d12ff
to
02ee4de
Compare
I created some orchestration for fetching prebuilt webui from IPFS:
|
This ensures webui is not stuck with dead API object, which improves UX.
} | ||
} | ||
} | ||
|
||
function _isWebuiTab (url) { | ||
const bundled = !url.startsWith('http') && url.includes('/webui/index.html#/') | ||
const ipns = url.includes('/webui.ipfs.io/#/') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#/
will only be added by the app after the initial bundle has loaded (unless the user has bookmarked it explicitly)...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that was on purpose to remove false-positive matches on random websites and avoid double-reload when quickly switching between backends.
8d24e21
to
a6c4a72
Compare
Looks stable enough to ship to Beta. Let's smoke-test it there. |
This PR aims to replace old Web UI with the bundled one.
It is important to get this right, as we will use similar approach for ipfs-share-files.
Remaining work:
ipfsCompanion.ipfs
in background pagenode_modules/..
subdir and copy artifacts. Refinements will be introduced in following commitswebui shows IPFS Companion as API Providerpostinstall
stepNice to have, but can be separate PR:
.gitignore
) or using a custom ignore files (.wextignore
) mozilla/web-ext#940 lands we remove maps manually: size is now under 7MBScreenshot (check location bar)