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: Move LauncherView to App.js #1047

Merged
merged 2 commits into from
Dec 6, 2023
Merged

Conversation

doubleface
Copy link
Contributor

This is needed to allow mespapiers app to control clisk konnectors.

Also needed to convert launcher context to a global context to allow it
to be used in multiple places (CozyWebView, App)

Checklist

Before merging this PR, the following things must have been done:

  • Faithful integration of the mockups at all screen sizes
  • Tested on iOS
  • Tested on Android
  • Localized in English and French
  • All changes have test coverage
  • Updated README & CHANGELOG, if necessary

src/App.js Outdated Show resolved Hide resolved
__tests__/jest.config.js Show resolved Hide resolved
onClose={(): void => {
setConcurrentKonnector(undefined)
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
launcherEvent.emit('launchResult', { cancel: true })
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure to understand this one. How do we distinguish this launchResult from the one that would be emited by the "already running" connector?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, there is no distinction. The current account/konnector opened in harvest will receive this message. And since the current opened connector is the one which caused to open the "already running" connector, this is the one we want to cancel.

src/components/webviews/CozyWebView.js Outdated Show resolved Hide resolved
src/components/webviews/CozyWebView.js Outdated Show resolved Hide resolved
src/App.js Show resolved Hide resolved
@doubleface doubleface force-pushed the feat/LauncherInCozyWebview branch 2 times, most recently from 5e9989d to 0af81fa Compare December 5, 2023 18:14
@doubleface doubleface requested review from Crash-- and Ldoppea December 6, 2023 07:41
@doubleface
Copy link
Contributor Author

@Crash-- @Ldoppea I think the PR is now ready

doubleface added 2 commits December 6, 2023 10:59
This is needed to allow mespapiers app to control clisk konnectors.

Also needed to convert launcher context to a global context to allow it
to be used in multiple places (CozyWebView, App)
When running a second clisk konnector, the dialog preventing the second
run is displayed. But the FlowProvider in harvest will keep its running
state, blocking the user to do anything else.

Now we cancel this running state (since no second konnector is actually
running).
@doubleface doubleface force-pushed the feat/LauncherInCozyWebview branch from 0af81fa to d5afa34 Compare December 6, 2023 09:59
@doubleface doubleface merged commit 4928e23 into master Dec 6, 2023
1 check passed
@doubleface doubleface deleted the feat/LauncherInCozyWebview branch December 6, 2023 11:00
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