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

Reworked getting started experience #800

Merged
merged 34 commits into from
Feb 26, 2018
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d7b4cbb
Initial cut at Android Studio and Terminal experiences
mit-mit Feb 14, 2018
37a59b8
Use OS steps in the Terminal case
mit-mit Feb 14, 2018
54f62a5
Make new getting started default in this branch
mit-mit Feb 16, 2018
dafe244
Link to new page
mit-mit Feb 16, 2018
70b6e14
Stub out complete end to end flow
mit-mit Feb 21, 2018
e59fa96
A bit more refactoring
mit-mit Feb 21, 2018
c477f7b
System requirements and path config
mit-mit Feb 21, 2018
24d0a06
Finish create/run
mit-mit Feb 21, 2018
48af134
Setup Editor
mit-mit Feb 21, 2018
2a1b6ac
Cleanup
mit-mit Feb 21, 2018
813a45c
Finish everything, make links check
mit-mit Feb 22, 2018
ff379aa
Merge with master
mit-mit Feb 22, 2018
5d0c460
Remove files pertaining to future setup flow
mit-mit Feb 22, 2018
11ad3d7
Remove file
mit-mit Feb 22, 2018
1154ae2
Remove file
mit-mit Feb 22, 2018
de92a83
Fixes
mit-mit Feb 22, 2018
70b259d
Change URL of getting started codelab per Shams feedback
mit-mit Feb 23, 2018
58741de
Change 'tutorial' to 'codelab'
mit-mit Feb 23, 2018
07b7329
Fix links
mit-mit Feb 23, 2018
638bc37
Review feedback from Seth
mit-mit Feb 24, 2018
4e9392b
Rename pages per feedback
mit-mit Feb 24, 2018
29f1a27
Rename title
mit-mit Feb 24, 2018
028bede
Fix transition links to new section titles
mit-mit Feb 24, 2018
f147234
Consistency
mit-mit Feb 24, 2018
3eb1a30
Merge remote-tracking branch 'upstream/master' into getting-started-beta
mit-mit Feb 25, 2018
d53dd15
Review feedback Filip + merge with master
mit-mit Feb 25, 2018
b24bbec
Add IDEA
mit-mit Feb 25, 2018
6c058f4
DanTup review feedback
mit-mit Feb 25, 2018
7a3b094
Merge remote-tracking branch 'upstream/master' into getting-started-beta
mit-mit Feb 25, 2018
860da34
Update version
mit-mit Feb 25, 2018
b81044d
Increase tab padding a bit
mit-mit Feb 25, 2018
edb40c7
Remove Next Step from Install summary page per offline feedback it wa…
mit-mit Feb 25, 2018
90e0406
Simplify the install landing page
mit-mit Feb 26, 2018
2c051b6
Add back step numbers in sidebar
mit-mit Feb 26, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions _includes/setup/editor-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
Using the `flutter` command-line tools, you can use any editor to develop Flutter applications.
Type `flutter help` at a prompt to view the available tools.

We recommend using our IntelliJ plug-ins for a [rich IDE experience](/using-ide/)
supporting editing, running, and debugging Flutter apps. See [IDE Setup](/ide-setup/)
We recommend using our plug-ins for a [rich IDE experience](/using-ide/)
supporting editing, running, and debugging Flutter apps. See [Editor Setup](/get-started/editor/)
for detailed steps.
2 changes: 1 addition & 1 deletion _includes/setup/get-sdk-win.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ itself. Subsequent runs should be much faster.

The following sections describe how to perform these tasks and finish the setup process.
You'll see in `flutter doctor` output that if you choose to use an IDE, plugins
are available for IntelliJ IDEA. See [IntelliJ Setup](/ide-setup/)
are available for IntelliJ IDEA, Android Studio, and VS Code. See [Editor Setup](/get-started/editor/)
for the steps to install the Flutter and Dart plugins.

Once you have installed any missing dependencies, run the `flutter doctor` command again to
Expand Down
2 changes: 1 addition & 1 deletion _includes/setup/get-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ itself. Subsequent runs should be much faster.

The following sections describe how to perform these tasks and finish the setup process.
You'll see in `flutter doctor` output that if you choose to use an IDE, plugins
are available for IntelliJ IDEA. See [IntelliJ Setup](/ide-setup/)
are available for IntelliJ IDEA, Android Studio, and VS Code. See [Editor Setup](/get-started/editor/)
for the steps to install the Flutter and Dart plugins.

Once you have installed any missing dependencies, run the `flutter doctor` command again to
Expand Down
2 changes: 1 addition & 1 deletion _includes/setup/path-mac-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The steps for modifying this variable permanently for all terminal sessions are
Typically you add a line to a file that is executed whenever you open
a new window. For example:

1. Determine the directory where you cloned Flutter's git repo. You will
1. Determine the directory where you placed the Flutter SDK. You will
need this in Step 3.
2. Open (or create) `$HOME/.bash_profile`. The file path and filename might be
different on your machine.
Expand Down
9 changes: 5 additions & 4 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
<li class="sidebar-title">Get started</li>

<ul class="sidebar-items">
<li><a href="/setup/">Install</a></li>
<li><a href="/getting-started/">Create and run your first app</a></li>
<li><a href="/ide-setup/">Setting up the IDE</a></li>
<li><a href="/bootstrap-into-dart/">Bootstrap into Dart</a></li>
<li><a href="/get-started/install/">Install</a></li>
<li><a href="/get-started/editor/">Configure Editor</a></li>
<li><a href="/get-started/test-drive/">Test drive</a></li>
<li><a href="/get-started/codelab/">Write your first app</a></li>
<li><a href="/get-started/learn-more/">Learn more</a></li>
</ul>

<li class="sidebar-title">Build UIs</li>
Expand Down
3 changes: 2 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
<script src="{{ "/js/sidebar_toggle.js" }}"></script>
<script src="{{ "/js/customscripts.js" }}"></script>
<script src="{{ "/js/prism.js" }}"></script>

<script src="{{ "/js/tabs.js" }}"></script>

<script async="" defer="" src="//survey.g.doubleclick.net/async_survey?site=at3ul57xpub2vk3oxt2ytw365i"></script>
</body>
</html>
34 changes: 34 additions & 0 deletions _sass/_tabs.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
$tab-accent-color: $brand-color;

// General tabs. These are intended for instructions that vary according to user
// selection, e.g. around editor choice in getting started.

ul.tabs__top-bar {
margin: 0;
padding: 0;
list-style: none;
}

ul.tabs__top-bar li {
background: none;
color: $grey-color;
display: inline-block;
padding: 5px 5px;
cursor: pointer;
}

ul.tabs__top-bar li.current{
background: $tab-accent-color;
color: $background-color;
}

.tabs__content{
display: none;
border: 1px solid $tab-accent-color;
padding: 5px;
margin-bottom: 20px;
}

.tabs__content.current{
display: inherit;
}
4 changes: 2 additions & 2 deletions animations/hero-animations/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ to specify the new route, the image flies along a curved path,
as described by the [Material Design motion
spec.](https://material.io/guidelines/motion/movement.html)

[Create a new Flutter example](/getting-started/) and
[Create a new Flutter example](/get-started/test-drive/) and
update it using the files from the
[GitHub directory.](https://github.com/flutter/website/tree/master/_includes/code/animation/hero_animation/)

Expand Down Expand Up @@ -521,7 +521,7 @@ rectangular clips yield a rectangle that's the same size as the hero
widget. In other words, at the end of the transition the image is no
longer clipped.

[Create a new Flutter example](/getting-started/) and
[Create a new Flutter example](/get-started/test-drive/) and
update it using the files from the
[GitHub directory.](https://github.com/flutter/website/tree/master/_includes/code/animation/radial_hero_animation)

Expand Down
3 changes: 2 additions & 1 deletion css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ $on-laptop: 800px;
"code_pre",
"catalog",
"homepage",
"responsive_embeds"
"responsive_embeds",
"tabs"
;

aside > :not(pre) > code[class*="language-"], aside > pre[class*="language-"] {
Expand Down
14 changes: 12 additions & 2 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,18 @@
"type": 301
},
{
"source": "/get-started/",
"destination": "/setup/",
"source": "/getting-started",
"destination": "/get-started/",
"type": 301
},
{
"source": "/setup",
"destination": "/get-started/install/",
"type": 301
},
{
"source": "/ide-setup",
"destination": "/get-started/editor/",
"type": 301
}
]
Expand Down
15 changes: 12 additions & 3 deletions formatting.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,24 @@ developers may find it more productive to:
The alternative is often tiring formatting debates during code reviews, where
time may be better spent on code behavior rather than code style.

### Automatically formatting code in IntelliJ
### Automatically formatting code in Android Studio, and IntelliJ

Automatic formatting of code is supported in IntelliJ if you have the
`Dart` plugin (see [IntelliJ setup](/ide-setup/)).
Install the the `Dart` plugin (see [Editor setup](/get-started/editor/)
Copy link
Contributor

Choose a reason for hiding this comment

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

This line has an unclosed paren

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

to enable automatic formatting of code in Android Studio and IntelliJ.

To automatically format the code in the current source code window, right-click
in the code window and select `Reformat with Dart style`. You can add a keyboard
shortcut to this in Keymap section of IntelliJ Preferences.

### Automatically formatting code in VS Code
Copy link
Contributor

Choose a reason for hiding this comment

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

visual studio code , or vs code ?

Copy link
Contributor

@Sfshaza Sfshaza Feb 23, 2018

Choose a reason for hiding this comment

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

Well, color me wrong. I thought it was "VSCode", but I checked and it's "VS Code". I have to change my docs. :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Microsoft uses both 'Visual Studio Code' and 'VC Code'. I personally much prefer the latter as it's less likely to cause confusion with "big" Visual Studio.


Install the `Dart-Code` plugin (see [Editor setup](/get-started/editor/)
Copy link
Contributor

Choose a reason for hiding this comment

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

This one has unclosed paren too (also, it suggests editor page has a section in enabling automatic formatting, but I can't see it; though the next paragraph explains how to sort-of-automatically-but-not-on-type format).

Copy link
Member Author

Choose a reason for hiding this comment

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

Fidex

to enable automatic formatting of code in VS Code.

To automatically format the code in the current source code window, right-click
Copy link
Contributor

Choose a reason for hiding this comment

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

VS Code has some settings that are probably relevant here:

  • editor.formatOnSave
  • editor.formatOnType
  • editor.formatOnPaste

All of these should work with Dart Code and I think we should encourage people to turn them on (they can do so globally, or just for Dart by using language-specific settings).

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

in the code window and select `Format Document`. You can add a keyboard
shortcut to this VS Code Preferences.

### Automatically formatting code with the `flutter` command

You can also automatically format code in the command line interface (CLI) using
Expand Down
22 changes: 5 additions & 17 deletions get-started/codelab/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ You'll need to install the following:
</li>
</ul>

See [Flutter Installation and Setup](/setup/) for information on how
to set up your environment.
See [Flutter Installation and Setup](/get-started/install/) for information on
how to set up your environment.

</div>

# Step 1: Create the starting Flutter app

Create a simple, templated Flutter app, using the instructions in
[Getting Started with your first Flutter app.](/getting-started/)
[Getting Started with your first Flutter app.](/get-started/test-drive/#create-app)
Name the project **startup_namer** (instead of _myapp_).
You’ll be modifying this starter app to create the finished app.

Expand Down Expand Up @@ -985,18 +985,6 @@ In this codelab, you've:
and the new route.
* Learned about changing the look of your app's UI using Themes.

Here are some resources you might find useful:

{% comment %}
Once the "Flutter for React" doc (etc) are done, add here.
{% endcomment %}

* [Flutter API docs](https://docs.flutter.io/)
* [Building Layouts in Flutter](/tutorials/layout/) tutorial
* [Add Interactivity](/tutorials/interactive/) tutorial
* [Flutter Cookbook](/cookbook/)
* [From Java to Dart](https://codelabs.developers.google.com/codelabs/from-java-to-dart/#0) codelab

You can learn more about Flutter at [flutter.io,](https://flutter.io/)
and Dart at [www.dartlang.org.](https://www.dartlang.org/)
## Next step

[Next step: Learn More](/get-started/learn-more/)
89 changes: 89 additions & 0 deletions get-started/editor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
layout: page
title: "Get Started: Configure Editor"
permalink: /get-started/editor/
---

You can build apps with Flutter using any text editor combioned with our
command-line tools. However, we recommend using one of our editor plugins for an
even better experience. With our editor plugins, you get code completion, syntax
highlighting, widget edditing assists, run & debug support, and more.

Follow the steps before to add an editor plugin for Android Studio, IntelliJ, or
VS Code. If you want to use a different editor, that's OK, simply skip ahead to
[Next step: Create and run your first app](/get-started/test-drive/).

<ul class="tabs__top-bar">
<li class="tab-link current" data-tab="tab-install-androidsstudio">Android Studio</li>
<li class="tab-link" data-tab="tab-install-vscode">VS Code</li>
</ul>

<div id="tab-install-androidsstudio" class="tabs__content current" markdown="1">

## Android Studio setup

*Android Studio:* A complete, integrated IDE experience for Flutter.

### Install Android Studio

* [Android Studio](https://developer.android.com/studio/index.html), version 3.0 or later.

Alternatively, you can also use IntelliJ:

* [IntelliJ IDEA Community](https://www.jetbrains.com/idea/download/), version 2017.1 or later.
* [IntelliJ IDEA Ultimate](https://www.jetbrains.com/idea/download/), version 2017.1 or later.

### Install the Flutter and Dart plugins

Flutter is supported by two plugins:

* The `Flutter` plugin powers Flutter developer workflows (running,
debugging, hot reload, etc.).
* The `Dart` plugin offers code analysis (code validation as you type, code
completions, etc.).

To install these:

1. Start Android Studio.
1. Open plugin preferences (**Preferences>Plugins** on macOS,
**File>Settings>Plugins** on Windows & Linux).
1. Select **Browse repositories…**, select the Flutter plug-in and click
`install`.
1. Click `Yes` when prompted to install the Dart plugin.
1. Click `Restart` when prompted.

</div>

<div id="tab-install-vscode" class="tabs__content" markdown="1">

## Visual Studio Code (VS Code) setup

*VS Code:* A light-weight editor with Flutter run and debug support.

### Install VS Code

* [VS Code](https://code.visualstudio.com/), version 1.19 or later.
Copy link
Contributor

Choose a reason for hiding this comment

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

Currently we need 1.20.1 but we also bump along with Code updates pretty frequently (since things in Code change quite frequently) so it might be best not to mention this (or encourage latest stable)? Unlike with some IDEs, I don't think updating Code is a big deal (it doesn't bring new versions of .NET, for ex like Visual Studio does) so users probably won't be reluctant to do it (I think it auto-updates by default on all platforms too?).

Copy link
Member Author

Choose a reason for hiding this comment

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

I just updated it to 1.20.1. Would be nice if you could help update this when you take a new version dependency.


### Install the Dart Code plugin

1. Start VS Code
1. Invoke **View>Command Palette...**
1. Type 'install', and select the **'Extensions: Install Extension'** action
1. Enter `dart code` in the search field, select 'Dart Code' in the list, and
click **Install**
1. Select 'OK' to reload VS Code

## Validate your setup with the Flutter Doctor

1. Invoke **View>Command Palette...**
1. Type 'doctor', and select the **'Flutter: Run Flutter Doctor'** action
1. Review the output in the 'OUTPUT' pane for any issues

</div>

## Next step

Let's take Flutter for a test drive: create a first project, run it, and
experiencee 'hot reload'.

[Next step: Test drive Flutter](/get-started/test-drive/)
17 changes: 17 additions & 0 deletions get-started/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
layout: page
title: "Get Started: Overview"
permalink: /get-started/
---

Welcome to the Flutter Get Started Experience. We will help you:

* Install the Flutter framework
* Install the dependencies of the Flutter framework
* Create, run, and make changes to your first Flutter app
* Learn core Flutter concepts through a small step-by-step lesson
* Suggest some next steps

## Next step

[Next step: Install Flutter](/get-started/install/)
8 changes: 5 additions & 3 deletions setup.md → get-started/install.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: page
title: Flutter installation & setup
permalink: /setup/
title: "Get Started: Install"
permalink: /get-started/install/
---

This page describes how to prepare your development environment to run Flutter apps on
Expand Down Expand Up @@ -39,7 +39,7 @@ to test and iterate using a simulator or physical device.
<td>Run <code>flutter doctor</code> and resolve any issues found (<a href="/setup-macos/#run-flutter-doctor">Mac</a>) (<a href="/setup-windows/#run-flutter-doctor">Windows</a>) (<a href="/setup-linux/#run-flutter-doctor">Linux</a>)</td><td align="center">Y</td>
</tr>
<tr>
<td colspan="2"><a href="/ide-setup/">Install and configure an IntelliJ IDE to develop Flutter apps</a></td>
<td colspan="2"><a href="/get-started/editor/">Install and configure an editor to develop Flutter apps</a></td>
</tr>
<tr><td class="alert-warning" colspan="2">Using an IDE is optional. However, we recommend using an IntelliJ IDE with Flutter for code completion,
inline error checking, and visual debugging features.</td>
Expand All @@ -52,4 +52,6 @@ inline error checking, and visual debugging features.</td>
</tr>
</table>

## Next step

[Next step: Configure Editor](/get-started/editor/)
29 changes: 29 additions & 0 deletions get-started/learn-more.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
layout: page
title: "Get Started: Learn More"
permalink: /get-started/learn-more/
---
* Learn more about the Flutter framework

{% comment %}
Once the "Flutter for React" doc (etc) are done, add here.
{% endcomment %}

* [Building Layouts in Flutter](/tutorials/layout/) tutorial
* [Add Interactivity](/tutorials/interactive/) tutorial
* [A Tour of the Flutter Widget Framework](/widgets-intro/)
* [Flutter for Android Developers](/flutter-for-android/)


* Other resources

* [Flutter Cookbook](/cookbook/)
* [From Java to Dart](https://codelabs.developers.google.com/codelabs/from-java-to-dart/#0) codelab
* [Bootstrap into Dart: learn more about the language](/bootstrap-into-dart/)

Please reach out to us at our [mailing list][mailinglist]. We'd love
to hear from you!

Happy Fluttering!

[mailinglist]: mailto:flutter-dev@googlegroups.com
5 changes: 2 additions & 3 deletions setup_linux.md → get-started/setup_linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ permalink: /setup-linux/

{% include setup/android-setup.md %}

## Next steps
## Next step

Now, follow our [Getting Started guide](/getting-started/)
to run your first Flutter app on Android.
[Next step: Configure Editor](/get-started/editor/)
5 changes: 2 additions & 3 deletions setup_macos.md → get-started/setup_macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ first Flutter app.

{% include setup/android-setup.md %}

## Next steps
## Next step

Now, follow our [Getting Started guide](/getting-started/)
to run your first Flutter app on iOS or Android.
[Next step: Configure Editor](/get-started/editor/)