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

feat(wallet-mobile): Add dApp Explorer feature flag and rename variables #3190

Merged
merged 14 commits into from
Apr 14, 2024

Conversation

michaeljscript
Copy link
Collaborator

@michaeljscript michaeljscript commented Apr 11, 2024

Resolves YOMO-1296

@michaeljscript michaeljscript marked this pull request as draft April 11, 2024 09:25
@michaeljscript michaeljscript self-assigned this Apr 11, 2024
@michaeljscript michaeljscript added this to the 4.28.0 milestone Apr 11, 2024
@michaeljscript michaeljscript marked this pull request as ready for review April 11, 2024 10:44
@michaeljscript michaeljscript changed the title feat(wallet-mobile): Update Dapp Explorer imports and add feature flag feat(wallet-mobile): Add dApp Explorer feature flag and rename variables Apr 11, 2024
const {isEdit} = router.params ?? {isEdit: false}
const navigateTo = useNavigateTo()
const {addBrowserTab, setTabActive, updateTab, tabs, tabActiveIndex} = useBrowser()
const tabActive = tabs[tabActiveIndex]
const [searchValue, setSearchValue] = useState('')
const [searchValue, setSearchValue] = React.useState('')
Copy link
Member

Choose a reason for hiding this comment

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

heads up: we have a hook + provider that transforms the navbar into a searchable bar. (dunno if it's applied on nav bar this one)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We have the hook used in SelectDappFromListScreen, but this component is the search in the browser, which has a different UI, so I'd say it's okay to use a custom component

@@ -23,7 +23,7 @@ export const BrowserTabsBar = () => {

const handleCreateTab = () => {
switchTab(false)
navigateTo.browserSearch(false)
navigateTo.searchDappInBrowser({isEdit: false})
Copy link
Member

Choose a reason for hiding this comment

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

params are unsafe, later if possible move to state

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll refactor this. It looks like we don't need params nor state

screen: 'browser-view',
}),
selectDappFromList: () => navigation.navigate('discover-select-dapp-from-list'),
browseDapp: () => navigation.navigate('discover-browser', {screen: 'discover-browse-dapp'}),
navigation: () => navigation,
Copy link
Member

Choose a reason for hiding this comment

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

this should be deleted.

screen: 'browser-view',
}),
selectDappFromList: () => navigation.navigate('discover-select-dapp-from-list'),
browseDapp: () => navigation.navigate('discover-browser', {screen: 'discover-browse-dapp'}),
navigation: () => navigation,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
navigation: () => navigation,

@@ -106,7 +106,7 @@ export const BrowserProvider = ({
}

Copy link
Member

Choose a reason for hiding this comment

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

@michaeljscript this is looking confusing and with a lot of var shadowing, can you give it a look?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated

@stackchain stackchain merged commit da57048 into develop Apr 14, 2024
2 checks passed
@stackchain stackchain deleted the feat/explorer-feature-flag branch April 14, 2024 14:46
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.

3 participants