Flutter-intellij: Persistent confusion about hot restart vs. hot reload.

Created on 10 May 2017  路  9Comments  路  Source: flutter/flutter-intellij

@Hixie reported in team chat:

Flutter - One DrawerFlutter - One Drawer
https://youtu.be/RL_V2QLwaRg <- we still have work to do on the IDE hot reload hot restart UI. This guy is a regular in our gitter, totally gets it, has done many videos about flutter, and even he didn't notice that he spent the whole video using restart instead of hot reload.

@lukechurch

usability

Most helpful comment

I still think the right solution is to have a single button with a drop-down next to it, and the drop-down offers hot reload, hot restart, cold restart, run with --profile, run with --release, run on another emulator/device, etc, and the button by default does a cold start on the first device if nothing is running, and a hot reload if something is running.

All 9 comments

When I was recording that video, I remembered thinking why isn't the drawer keeping state like my other times I tested it, but kept on trucking because I wanted to finish it.

The lightning icon doesn't tell me the story of it's purpose by looking at it. My usual restart experience happens with the reload in the lower left of the debug pain. So I was thinking instead of the lightning icon, if you could replace it with a refresh or update icon would help me target it automatically. :)

Something like this material design update icon might help me aim for the right button. :)
screen shot 2017-05-10 at 8 11 58 am

Thanks for considering changing the ui.

We've done some work here, but clearly have more to do. The reload/restart ratio was about 3:1 a month ago, and is a little over 5:1 now.

I think having some differences in the UI feedback when you reload vs restart. A hot reload might have some on-screen indicator - a 'reloading...' badge, while a full restart might show a brief toast in IntelliJ.

I still think the right solution is to have a single button with a drop-down next to it, and the drop-down offers hot reload, hot restart, cold restart, run with --profile, run with --release, run on another emulator/device, etc, and the button by default does a cold start on the first device if nothing is running, and a hot reload if something is running.

One of the things I use is to tell people that you "hot restart" when you want to throw away your state (or are doing some deep fundamental restructuring of your app), and you "hot reload" when you want to keep your current state and iterate on your app. I'm not sure if that informs our UI choice here, but I thought I'd offer. :)

I still think the right solution is to have a single button with a drop-down next to it, and the drop-down offers hot reload, hot restart, cold restart, run with --profile, run with --release, run on another emulator/device, etc, and the button by default does a cold start on the first device if nothing is running, and a hot reload if something is running.

This is a very good idea. But you'd want to make sure the drop down options are obvious.

I think some people think that hot restart and hot reload are synonyms.

One last thing, VS code has:

  1. hot reload (Ctrl + F5 on Windows)
  2. restart (Ctrl + Shift + F5)
  3. hot restart (no shortcut by default - not shown on the floating debug toolbar and only really accessible via the command palette initially)

Just thought I'd give my input 馃榿

Keep up the great work folks! 馃憤

A lot has change in the last 2 years. FYI @mit-mit @InMatrix

If a lot has changed in the last two years is

One of the things I use is to tell people that you "hot restart" when you want to throw away your state (or are doing some deep fundamental restructuring of your app), and you "hot reload" when you want to keep your current state and iterate on your app. I'm not sure if that informs our UI choice here, but I thought I'd offer. :)

still a good explanation @eseidelGoogle? I like that explanation...I am coming from Googling during a Flutter 101 presentation and came to this issue when I got confused about the difference.

https://flutter.dev/docs/development/tools/hot-reload#previous-state-is-combined-with-new-code

That section seems to say the same thing, and I think is pretty clear. Although, I think adding a "Hot Reload vs. Hot Restart" section combining all of the caveats would get the SEO up enough that people won't be looking at this issue anymore.

cc @csells

Was this page helpful?
0 / 5 - 0 ratings