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

Publish generated HTML in the client #1633

Merged
merged 3 commits into from
Feb 27, 2020
Merged

Conversation

ajaybhargavb
Copy link
Contributor

@ajaybhargavb ajaybhargavb commented Feb 27, 2020

Fixes dotnet/aspnetcore#14286

  • Refactored GeneratedCodeContainer and friends to include two output versions instead of one (CSharp and HTML)
  • Added an updateHtmlBuffer command to update the buffer on the client
  • Updated RazorDocumentManager and HtmlDocument on the client side to follow the same behavior of CSharp for updating the virtual background document
  • Fixed a bug in UnsyncronizedDocumentProcessedListener where we were updating the background C# document with all razor content
  • Updated tests

@ajaybhargavb ajaybhargavb changed the title Publish generated HTML in the client [WIP] Publish generated HTML in the client Feb 27, 2020
@ajaybhargavb ajaybhargavb changed the title [WIP] Publish generated HTML in the client Publish generated HTML in the client Feb 27, 2020
Copy link
Contributor

@NTaylorMullen NTaylorMullen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Holy cow, this is incredible! 👏

One thing we should do in addition to what you have here is add an HTML completion functional test that excercises one of the broken cases of the past.

i.e.

 @{
    if (1 < 2) { }
}

<|

If I recall correctly completion at the | doesn't work in the currently released bits because the HTML document sees the 1 < 2 and is expecting a start/end tag. Could also use a C# comment that mentions an HTML comment start to replicate the issue too.

@ajaybhargavb
Copy link
Contributor Author

🆙 📅

@ajaybhargavb ajaybhargavb merged commit a666c6f into master Feb 27, 2020
@ajaybhargavb ajaybhargavb deleted the ajbaaska/only-html branch February 27, 2020 22:49
JunTaoLuo pushed a commit to dotnet/aspnetcore that referenced this pull request May 17, 2020
* Publish generated HTML in the client

* feedback

* fix
\n\nCommit migrated from dotnet/razor@a666c6f
dougbu pushed a commit to dougbu/razor-compiler that referenced this pull request Nov 17, 2021
* Publish generated HTML in the client

* feedback

* fix
\n\nCommit migrated from dotnet/razor@a666c6f

Commit migrated from dotnet/aspnetcore@d41276b0fae6
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.

Only have valid Html content in Virtual Html document
2 participants