-
Notifications
You must be signed in to change notification settings - Fork 589
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
Browser: new architecture #5671
Conversation
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.
Good stuff!
const backgroundColor = useSharedValue<string>(defaultBackgroundColor); | ||
|
||
const safeBackgroundColor = useDerivedValue(() => { | ||
const homepageColor = isDarkMode ? globalColors.grey100 : '#FBFCFD'; |
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.
This one is used in a bunch of places inside the dapp browser. Should we add it to the colors?
}, [animatedTabIndex]); | ||
|
||
const animatedTabYPosition = useDerivedValue(() => { | ||
return withTiming(Math.floor(animatedTabIndex.value / 2) * TAB_VIEW_ROW_HEIGHT - 181, TIMING_CONFIGS.tabPressConfig); |
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.
magic number
165 + | ||
28 + |
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.
more magic numbers
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 take care of these in a follow-up PR
* fix screenshot prunning * remove logs * Avoid subscribing to browserStore --------- Co-authored-by: Christian Baroni <7061887+christianbaroni@users.noreply.github.com>
Also adds JS freeze and unfreeze scripts, and fixes a crash when opening the control panel from the homepage
Co-Authored-By: Ben Goldberg <15272675+benisgold@users.noreply.github.com>
Seems like the high image load priority might slightly delay component rendering
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@candlefinance/faster-image@1.4.3 |
* network switch fixes * Update src/components/DappBrowser/control-panel/ControlPanel.tsx Co-authored-by: Christian Baroni <7061887+christianbaroni@users.noreply.github.com> --------- Co-authored-by: Christian Baroni <7061887+christianbaroni@users.noreply.github.com>
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.
🚀 🚀 🚀
Co-authored-by: gregs <me@gregs.wtf>
…eplink-add * 'develop' of github.com:rainbow-me/rainbow: (22 commits) disable sentry (#5707) fix favorites list issues (#5659) fix: learn more webview clipped (#5687) add explorer_url and explorer_label to txn types and consume (#5690) Add names to wallet list info in backups v2 (#5692) feat: upgrading swap sdk to 0.19.0 (#5694) Add documentation (#5701) Fix supported chains bugs (#5697) useAnimatedTime, useAnimatedInterval, useAnimatedTimeout (#5699) hey (#5686) browser bugs (#5695) useSharedValueState (#5698) Connect Panel improvements (#5693) createRainbowStore (#5689) Browser: new architecture (#5671) handle injection natively (#5677) fix wallet balance in send flow (#5665) bump version to v1.9.23 (#5668) use current safari UA (#5670) Browser: browserStore (#5669) ...
What changed (plus any additional context for devs)
Homepage
componentDappBrowser
goToUrl
animatedTabUrls
, which serves as the always-up-to-date source of truth for tab URLsBrowserTab
instances in the most lightweight way possible, mapping eachtabId
in thetabIds
array onto aBrowserTab
instanceuseSyncSharedValue
from useSyncSharedValue #5662 to replace the previous queueing system, which effectively guarantees proper state syncing between the UI ↔ JS threads and fixes all broken tab layout issues resulting from out-of-sync statespauseSync
feature, and improves the equality check worklets used withinmultipleTabsOpen
,animatedWebViewHeight
, and a few other thingsTODO:
canGoBack
/canGoForward
(navigation works but both buttons are always visible)ControlPanel
to reflect the current site and allow for wallet and network switchingAccountIcon
and ensure theappSessions
store works within the new systemScreen recordings / screenshots
Demo with a hardcoded new tab URL — the browser no longer slows down for every new tab, because the number of re-renders doesn't multiply:
RPReplay_Final1713857597.MP4
What to test