Skip to content

Adding Form subtype in templates #3527

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

Merged
merged 2 commits into from
Jul 6, 2020
Merged

Adding Form subtype in templates #3527

merged 2 commits into from
Jul 6, 2020

Conversation

Shyam-Gupta
Copy link
Member

@Shyam-Gupta Shyam-Gupta commented Jun 30, 2020

Fixes #3510

  1. Added *.user files to add Form subtype.
  2. By default template engine removes *.user files.
    To override it, I have added sources in template.json to remove *.user from "exclude"
  3. Fixed a typo in readme.md

Verified that:

  • **.user file gets dropped on creating new project from dotnet CLI
  • It works when project gets created from VS. Now Form1.cs opens directly in designer
  • **.user files have BOM (0xEF, 0xBB, 0xBF) characters in the beginning and the files have UTF 8 encoding
  • On adding a new Form to an existing project, the new Form opens directly in designer
Microsoft Reviewers: Open in CodeFlow

2. Added sources in template.json to remove *.user from "exclude"
3. Fixed a typo in readme.md
@ghost ghost assigned Shyam-Gupta Jun 30, 2020
@codecov
Copy link

codecov bot commented Jun 30, 2020

Codecov Report

Merging #3527 into master will increase coverage by 31.53457%.
The diff coverage is n/a.

@@                 Coverage Diff                  @@
##              master       #3527          +/-   ##
====================================================
+ Coverage   66.95215%   98.48672%   +31.53457%     
====================================================
  Files           1338         452         -886     
  Lines         504989      252829      -252160     
  Branches       40861        4167       -36694     
====================================================
- Hits          338101      249003       -89098     
+ Misses        161324        3108      -158216     
+ Partials        5564         718        -4846     
Flag Coverage Δ
#Debug 98.48672% <ø> (+31.53457%) ⬆️
#production ?
#test 98.48672% <ø> (-0.02365%) ⬇️

@codecov
Copy link

codecov bot commented Jul 1, 2020

Codecov Report

Merging #3527 into master will increase coverage by 31.54248%.
The diff coverage is n/a.

@@                 Coverage Diff                  @@
##              master       #3527          +/-   ##
====================================================
+ Coverage   66.95215%   98.49463%   +31.54247%     
====================================================
  Files           1338         452         -886     
  Lines         504989      252829      -252160     
  Branches       40861        4167       -36694     
====================================================
- Hits          338101      249023       -89078     
+ Misses        161324        3092      -158232     
+ Partials        5564         714        -4850     
Flag Coverage Δ
#Debug 98.49463% <ø> (+31.54247%) ⬆️
#production ?
#test 98.49463% <ø> (-0.01574%) ⬇️

@Shyam-Gupta Shyam-Gupta marked this pull request as ready for review July 2, 2020 18:00
@Shyam-Gupta Shyam-Gupta requested a review from a team as a code owner July 2, 2020 18:00
@RussKie
Copy link
Contributor

RussKie commented Jul 3, 2020

2. By default template engine removes *.user files.
To override it, I have added sources in template.json to remove *.user from "exclude"

Non blocking question, could we have used the include node to include *.user instead of defining the exclude?

@Shyam-Gupta
Copy link
Member Author

Non blocking question, could we have used the include node to include *.user instead of defining the exclude?

It doesn't work that way. With include node, it only copies *.user file and exclude others which causes it to throw error while restoring packages. Even if we use **.*user in addition to **/*, the exclude list overrides *.user files.

@RussKie RussKie merged commit ad1cee6 into master Jul 6, 2020
@RussKie RussKie deleted the dev/shgu/templateUser branch July 6, 2020 01:18
@ghost ghost added this to the 5.0 Preview8 milestone Jul 6, 2020
@RussKie
Copy link
Contributor

RussKie commented Jul 6, 2020

Thank you

@Shyam-Gupta
Copy link
Member Author

@merriemcgaw Should we consider this change for 3.1 servicing ?

@merriemcgaw
Copy link
Member

Have we verified how this impacts the load time in the designer If this is a noticeable, measurable amount then definitely service!

@Shyam-Gupta
Copy link
Member Author

In order to load the designer, user needs to either double click on the Form icon or open it through Shift + F7. Both these options are not available to the user for several seconds (>10 sec) after creating a new project. Sometimes the icon just doesn't appear at all. During this time user is completely blocked to load the designer.

Shyam-Gupta added a commit that referenced this pull request Jul 16, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jan 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows Forms templates should carry proj.user with SubType already set
4 participants