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

Feature: Extensions persist across projects #2569

Open
microbit-mark opened this issue Jan 7, 2020 · 8 comments
Open

Feature: Extensions persist across projects #2569

microbit-mark opened this issue Jan 7, 2020 · 8 comments

Comments

@microbit-mark
Copy link
Contributor

micro:bit support 27103

Issue:
When attempting to program the micro:bit, it is often necessary to download an extension to include features of a particular environment.

Examples: SparkFun's "moto:bit" or Dexter Industries "gigglebot"
These two hardware platforms require these extensions.

What I observed:
When programming a device, I download a particular extension. If I want to start a new project, I hit "new project" from the home page and a new project is created, but without the extension(s) loaded.

In the case of teaching my granddaughters how to program using MakeCode, I entered a simple program for them as an example, let them play with it, and then had them "start a new project" to create a program of their own. Alas! the downloaded "Gigglebot" extension was missing and caused no end of confusion.

Feature Request
Allow downloaded extensions to remain when creating a "new project" (this could be a "setting") This would allow the student to create new projects at will without having to search and download the necessary extensions each time.

@microbit-mark
Copy link
Contributor Author

@pelikhan @abchatra Would this be possible? I can see why it might be confusing for younger users who want to start something new but with the same extensions that they have been using previously.

Maybe the nicest workaround would be to surface the 'delete all blocks' contextual menu item more prominently so users can reset the project rather than start afresh from the homepage

Screenshot 2020-02-07 at 14 44 14

?

@Jaqster
Copy link
Member

Jaqster commented Feb 7, 2020

This makes more sense to implement as user settings once we have identity in place...

@pelikhan
Copy link
Member

pelikhan commented Feb 7, 2020

The user should be given the choice of cached extensions in the new project dialog.
Adding extensions by default is dangerous as they will never remove them; it will eventually result in bloating and gigantic hex files.

@abchatra
Copy link
Collaborator

We could give an option while adding extension to persist across projects. (A checkbox unselected by default).

@jharris1993
Copy link

Who am I? I sent the e-mail to Microbit-Mark to propose this. He posted this here on my behalf, suggested I sign up for GitHub, follow progress and leave comments here.

My thoughts and suggestions for a good user experience:

A "cached" extension = One that has been downloaded into a project during the current "session".
A "session" = The interval while a particular MakeCode browser window/tab is open.

We can make the behavior/user experience simple by creating certain "caching" rules:

  1. Actual extension code is cached only for the duration of a session.
    a. I am assuming that different browser windows have separate cache files and if a tab is duplicated, the cache for that page is cloned along with it.

  2. Code imported into a project, (and the extensions within it), automatically override any cached extensions for that session.

  3. Store the current configuration as a part of the URL for that particular page.
    a. If the user creates multiple sessions, either individually or using tabs, the particular session's configuration should be part of the URL. This way the user can create a "shortcut" to that particular page which would re-create that particular configuration at startup, automatically downloading whatever extensions are needed and/or deleting extensions that were removed.
    b. This way the user can have multiple, pre-defined session configurations for different project types - like the gigglebot or the micro:bot which use differing extension sets. Clicking on the URL and/or shortcut would launch a session pre-configured with the settings and extensions needed

  4. Any new project created during that session within that window, (or a duplicate), would automatically inherit all added/removed extensions up to that point in time.

  5. Cached extensions would be deleted when the session ends.
    a. Can we force this behavior despite browser settings otherwise?
    b. This would avoid the problem of "stale" extensions as updates would be pulled down for subsequent sessions.

To what extent is any of this reasonable or even doable?

Thanks!

@riknoll
Copy link
Member

riknoll commented Apr 15, 2020

While I like the idea of users having their own "template projects" to start with, I think doing it automatically for a user even in a single session is a bad idea. I don't know that anyone would intuitively expect that this would happen; it makes more sense for the new project button to always return the same results. This could also lead to confusion in the computer lab scenario if students from one class leave the browser open in between sessions.

@pelikhan
Copy link
Member

The solution to this problem is a better extension dialog. For example, the dialog should remember that the last used extensions (if approved) so that the user does not have to type them in search again. While automatically adding extension to a new project is a bad idea, automatically showing "known" extensions is definitely doable.

@jharris1993
Copy link

jharris1993 commented Apr 20, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants