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: Make the DataProxyProvider work in Flagship app #2697

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

Ldoppea
Copy link
Member

@Ldoppea Ldoppea commented Jan 13, 2025

In previous implementation we disabled the DataProxy in Flagship app because this feature was not implemented yet in that environment

We are working on implementing it in the Flagship app, so we want the DataProxyProvider to be able to use the Flagship's implementation

This commit implements this by checking the feature availability on the Flagship app and then by redirecting the DataProxy calls through the webviewIntent

Related PR: cozy/cozy-flagship-app#1279


log.log('Initializing DataProxy intent in Flagship app')
const isSearchAvailable =
(await webviewIntent?.call('isAvailable', 'search')) ?? false
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: webviewIntent?.call : ?. has already been checked L74

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed here

return
}

if (!flag('cozy.search.enabled')) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Maybe the flagship flag condition could be centralized with the iframe flag condition ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed here

In previous implementation we disabled the DataProxy in Flagship app
because this feature was not implemented yet in that environment

We are working on implementing it in the Flagship app, so we want the
DataProxyProvider to be able to use the Flagship's implementation

This commit implements this by checking the feature availability on the
Flagship app and then by redirecting the DataProxy calls through the
webviewIntent
@Ldoppea Ldoppea force-pushed the feat/dataproxy-flagship branch from 42705b3 to a1afc01 Compare January 16, 2025 10:43
@Ldoppea Ldoppea merged commit 9d770b9 into master Jan 16, 2025
2 checks passed
@Ldoppea Ldoppea deleted the feat/dataproxy-flagship branch January 16, 2025 11:31
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