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: show browser not supported popup at startup #112

Merged
merged 5 commits into from
Sep 18, 2024

Conversation

pajotg
Copy link
Contributor

@pajotg pajotg commented Jul 16, 2024

This PR adds a popup at startup when you are using a browser that doesn't support web-serial like firefox
image

Copy link
Member

@sverben sverben left a comment

Choose a reason for hiding this comment

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

Please first detect if we can use a fallback driver

Copy link
Member

@sverben sverben left a comment

Choose a reason for hiding this comment

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

Please copy the styling from the warning dialog, also differentiate between the recommended (primary) and secondary buttons with styling, in this case primary would probably be "I understand", and secondary "don't show again"

@pajotg
Copy link
Contributor Author

pajotg commented Jul 18, 2024

This is what it looks like now.
image

Please first detect if we can use a fallback driver

Im hoping detecting if navigator.usb is what you meant with this, or would it need to attempt to connect?

@rmoesbergen
Copy link
Member

Please first detect if we can use a fallback driver

Im hoping detecting if navigator.usb is what you meant with this, or would it need to attempt to connect?

The check is not correct this way, since firefox does support WebUSB, but we only support uploads to FTDI devices with WebUSB. So if you try to upload to a CH340 based device using firefox, you would not get the dialog, but the upload would fail. I don't think we can reliably check for this at startup, since you have to know which device is connected. I guess the check needs to move to after where the connection is made.

@koen1711 koen1711 self-assigned this Sep 18, 2024
@koen1711
Copy link
Member

@sverben @rmoesbergen I'm reviewing this and I see nothing wrong with this PR, all your concerns seem to be adressed? Can you confirm?

@koen1711 koen1711 merged commit 086ee2f into main Sep 18, 2024
1 check passed
@koen1711 koen1711 deleted the feat_browser_not_supported_warning branch September 18, 2024 19:48
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.

[enhancement] Detect non-supported browser (firefox) and tell user to use a chromium based browser
4 participants