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

fix: add ability to update the boilerplate content #3575

Merged
merged 7 commits into from
Jul 10, 2020
Merged

Conversation

benbrown
Copy link
Contributor

@benbrown benbrown commented Jul 6, 2020

Description

On load of the runtime settings page, the client will now make an API call that returns the current package.json version from the scripts/ folder in the project, the LATEST version of that file from the "boilerplate" template, and a boolean indicating whether the project version needs to be updated.

If the project version is missing or out of date, a new box will appear on the page with a button that allows the user to update this content - the scripts and readme files that come with every new project. This option will be display whether or not the runtime has been ejected. It does not affect the runtime code itself - only the provisioning scripts.

  • Also adds a "loading" indicator during ejection, which can sometimes take a few seconds.

Task Item

Closes #3102

Screenshots

This GIF shows a project where the boilerplate is old. The UI is present. I click the button, the boilerplate is updated. I navigate away, navigate back: the warning and the UI are now hidden because the boilerplate is up to date.

ZGoXfCDZam

… scripts and readme file) in an existing project
@benbrown
Copy link
Contributor Author

benbrown commented Jul 6, 2020

@sangwoohaan can you check out the design for this new feature and let me know if you've got requested changes?

@benbrown
Copy link
Contributor Author

benbrown commented Jul 6, 2020

GREAT QUESTION from @sangwoohaan -- how does the user know they need to update these scripts? Do we need to link this to a function that will track which version of Composer was used to create a project? (And then some mechanism that allows composer to update a project from version x to version y?)

ALSO NOTE: when we move provisioning into composer, we will no longer need the current set of scripts. So maybe we don't need this at all?

ALSO NOTE: no changes have happened to the scripts since 1.0.1, and no changes are currently planned... so this would be useful to a small number of users.

@benbrown
Copy link
Contributor Author

benbrown commented Jul 7, 2020

We decided to check against the version number in the package.json file inside scripts/ to determine if this option should be displayed. I will update the PR.

@benbrown benbrown changed the title Fixes #3102: add ability to update the boilerplate content fix: add ability to update the boilerplate content Jul 9, 2020
@benbrown
Copy link
Contributor Author

benbrown commented Jul 9, 2020

This PR has been updated with a version check using the package.json file present inside the boilerplate content. The UI ONLY appears if expected boilerplate content is out of date or missing.

@benbrown benbrown marked this pull request as ready for review July 9, 2020 19:44
@coveralls
Copy link

coveralls commented Jul 9, 2020

Coverage Status

Coverage decreased (-0.4%) to 53.208% when pulling a8c4027 on benbrown/3102 into d1e4c0d on master.

@cwhitten cwhitten merged commit 2cedeac into master Jul 10, 2020
@cwhitten cwhitten deleted the benbrown/3102 branch July 10, 2020 15:40
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
* Fixes microsoft#3102: add ability to update the boilerplate content (currently scripts and readme file) in an existing project

* check version of boilerplate

* check against installed version of boilerplate using scripts/package.json
before showing UI to update it

* wrap string informatMessage

Co-authored-by: Chris Whitten <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Composer should upgrade provisioning scripts on version upgrade
3 participants