-
Notifications
You must be signed in to change notification settings - Fork 327
Banner notifications for source files containing runnable samples #2976
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
Comments
I think option 1 probably is sufficient, since those sample projects are likely to be thrown away after use. |
Great. Thanks @InMatrix! @alexander-doroshko : is there a canonical location you'd suggest for temporary projects? Maybe just fall back to |
I don't know any entity close to 'temporary project' concept. Probably there aren't any. The closest thing that comes to my mind is Scratch Files concept. They fit perfectly to try a toy single-file project. In some technologies (like Java) scratch files are runnable/debuggable. It should be technically possible to make Dart scratch files runnable/debuggable as well. If it's possible to have just a single Dart scratch file to run a sample - then the concept is just great! Otherwise you may want to investigate how good scratch files are for multi-files toy projects, how to deal with auxiliary files like pubspec, .packages, etc. |
Playing around with some mocked content. Word-smithing ideas welcome. Also, it looks like some files host more than one sample. In that case, we'll need to do more than provide a "Open sample project in a new window…" action. @InMatrix @gspencergoog: thoughts? fyi @DanTup (in case you want to do something similar for VS Code). |
It might be more obvious what it does if it included the sample name in the text ("Open CustomScrollView project in a new window" for ex.), but otherwise looks good. We can't do banners like this in VS Code (we can do toast popups, but not close them automatically, so they'd build up). I did plan on adding clickable links to the tooltips, though I realise now they wouldn't work when looking at the source directly, so I'll have to try and come up with something else - maybe a CodeLens link (like the Run/Debug tests) would work. |
Playing around with inlined description text. The combo accommodates the multiple samples in a file case and the description disambiguates. Feedback welcome. /cc @InMatrix |
That's pretty cool. I'd point out that some people generate a lot of description text, so you might want to limit the amount you display. Of course, if they do that it looks pretty bad on the web too, so there's some incentive to keep it succinct. |
Thanks @gspencergoog. Yeah, the long descriptions may be worth shortening. For example: We should also probably strip newlines (I'm letting the textarea do wrapping) and remove the dartdoc brackets. Maybe a simple heuristic of just showing the first sentence? |
Ideally the dartdoc references would be links... |
OK, a few ideas / proposals:
@gspencergoog, @InMatrix, @DanTup: thoughts? |
All sound reasonable to me 👍 |
+1 to all three. |
Could we move |
How to close or disable this banner? I don't want this bar at all, I tried all the ways I could think of (without disabling the flutter plugin), but all failed. As an obsessive-compulsive disorder, I really can't stand such a banner blocking my view. Version info: |
Hi @Krysl, thanks for the feedback. Can you open a separate issue for the request? Comments on closed issues are easy to loose track of. |
Uh oh!
There was an error while loading. Please reload this page.
Sub-task of #2968.
Show a banner with a clickable link saying something like “Open sample project in a new window…” for source files that have an embedded sample (for example, Card). Clicking the link should create a new sample project.
(Note that we'll need we need to ensure that this works for both IntelliJ and Android Studio.)
Open questions:
open the new project wizard, seeded w/ appropriate valuesI've included 3 for completeness but I think it would be cumbersome.
@InMatrix: thoughts on 1 vs. 2 (or some other variation?)
The text was updated successfully, but these errors were encountered: