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

Auto-detect the user's host machine to prevent extra clicks to install the SDK #11672

Open
johnpryan opened this issue Feb 4, 2025 · 2 comments
Assignees
Labels
e2-days Effort: < 5 days infra.structure Relates to the tools that create docs.flutter.dev p2-medium Necessary but not urgent concern. Resolve when possible.

Comments

@johnpryan
Copy link
Contributor

Right now, when a user installs Flutter, they need to click through multiple steps before they can begin reading instructions:

  1. "Choose your platform to get started" (https://docs.flutter.dev/get-started/install)
  2. "Choose your first type of app" (https://docs.flutter.dev/get-started/install/macos)
  3. "Start building Flutter iOS Apps on macOS" (https://docs.flutter.dev/get-started/install/macos/mobile-ios)

Instead, we could reorganize the "Set up Flutter" page to immediately show content, but select the correct "tab" for the user's host machine, detected by the browser using the user-agent header. We could also store this value in localStorage so that whenever that developer returns to docs.flutter.dev, they get their previously selected host device (if they are reading the docs on a machine that isn't their host device, such as a mobile phone)

This would also let us reorganize the TOC to be something like this:

  • Set up Flutter
    • Windows
    • macOS
    • Linux
    • ChromeOS
  • Run Flutter on a target device
    • iOS
    • Android
    • web
    • macOS (Desktop)
    • Windows (Desktop)
    • Linux (Desktop)

In fact, we could even consider dropping the subsections from the TOC, since those will be accessible via the tabs.

Here's an example in the GCP docs where they select a tab based on the browser's user-agent: https://cloud.google.com/sdk/docs/install

@johnpryan johnpryan added the infra.structure Relates to the tools that create docs.flutter.dev label Feb 4, 2025
@sfshaza2 sfshaza2 added p2-medium Necessary but not urgent concern. Resolve when possible. e2-days Effort: < 5 days labels Feb 5, 2025
@sfshaza2
Copy link
Contributor

sfshaza2 commented Feb 5, 2025

cc @parlough @antfitch

@antfitch
Copy link
Contributor

antfitch commented Feb 5, 2025

I think splitting the current flow up to look like this is a fine idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2-days Effort: < 5 days infra.structure Relates to the tools that create docs.flutter.dev p2-medium Necessary but not urgent concern. Resolve when possible.
Projects
None yet
Development

No branches or pull requests

4 participants