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(connect-web): automatic fallback to core in popup #13031

Merged
merged 2 commits into from
Jul 4, 2024

Conversation

martykan
Copy link
Member

@martykan martykan commented Jun 21, 2024

Description

Implement automatic fallback for core in popup.

  • New param coreMode
    • auto - automatically choose the best option based on the environment
    • iframe (default) - always use iframe, same way as before
    • popup - always use popup,
  • Switch to popup on error (Init_IframeBlocked, Init_IframeTimeout, Transport_Missing, …)
  • Checking for bridge state is done using a new event TRANSPORT.GET_INFO, which will trigger Transport_Missing during init if in auto mode

Related Issue

Resolve #12488

Followup

  • Deprecate useCoreInPopup param
  • Update documentation
  • Use auto as default?

@martykan martykan force-pushed the feat/connect-automatic-popup-fallback branch from dea89ca to dce6325 Compare June 24, 2024 08:22
@martykan martykan force-pushed the feat/connect-automatic-popup-fallback branch 12 times, most recently from 6793afb to 7423600 Compare June 26, 2024 12:37
@mroz22
Copy link
Contributor

mroz22 commented Jul 1, 2024

this can be probably merged separately? 6252066 also do we have a way how to automatically detect bundling stuff we don't want to bundle? (I know I asked this some time ago but I forgot) :/

@@ -137,6 +137,13 @@ export const parseConnectSettings = (input: Partial<ConnectSettings> = {}) => {
settings.useCoreInPopup = input.useCoreInPopup;
}

if (
Copy link
Contributor

Choose a reason for hiding this comment

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

more like a note for me:
btw defaults are set only on the 'front-end' level?

@martykan martykan force-pushed the feat/connect-automatic-popup-fallback branch 3 times, most recently from a84b894 to 36ce3df Compare July 3, 2024 09:56
@martykan martykan force-pushed the feat/connect-automatic-popup-fallback branch from 36ce3df to 25d47c2 Compare July 3, 2024 10:34
@martykan martykan force-pushed the feat/connect-automatic-popup-fallback branch from 25d47c2 to b15c51c Compare July 3, 2024 15:02
Copy link
Contributor

@mroz22 mroz22 left a comment

Choose a reason for hiding this comment

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

good, just some left behind console.logs

@martykan martykan force-pushed the feat/connect-automatic-popup-fallback branch from b15c51c to 1a441e7 Compare July 4, 2024 11:53
@martykan martykan marked this pull request as ready for review July 4, 2024 12:09
@martykan martykan requested a review from szymonlesisz as a code owner July 4, 2024 12:09
@martykan martykan merged commit e4e1fcc into develop Jul 4, 2024
75 of 85 checks passed
@martykan martykan deleted the feat/connect-automatic-popup-fallback branch July 4, 2024 16:36
@Hannsek
Copy link
Contributor

Hannsek commented Jul 6, 2024

Why auto is not set as a default?

@martykan
Copy link
Member Author

martykan commented Jul 6, 2024

To keep the default behavior the same as before, so we don't accidentally break anything.
The goal is to make it default, but after testing it as opt-in

@Hannsek
Copy link
Contributor

Hannsek commented Jul 6, 2024

I'd push for making it default asap, as I doubt that anyone will change it to auto manually

@mroz22
Copy link
Contributor

mroz22 commented Jul 8, 2024

lets start experimenting with it for the next release

@martykan martykan mentioned this pull request Jul 11, 2024
3 tasks
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.

Add webUSB as a secondary transport option to connect-web package
4 participants