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

Update HTML highlighting & IntelliSense #461

Merged
merged 36 commits into from
Nov 23, 2015
Merged

Update HTML highlighting & IntelliSense #461

merged 36 commits into from
Nov 23, 2015

Conversation

dstorey
Copy link
Member

@dstorey dstorey commented Nov 22, 2015

HTML syntax highlighting and IntelliSense in CSS were out of sync and somewhat outdated.

Removed deprecated:

  • acronym
  • big
  • strike
  • tt
  • frame
  • frameset
  • noframes
  • eventsource

Added from HTML5:

  • bdo
  • data
  • embed
  • main (also added to the HTML IntelliSense)
  • rb, rp, rt, rtc, ruby
  • s
  • source
  • template
  • track
  • u
  • wbr

Added from HTML5.1 (less stable spec but many have 1 or 2 implementations)

  • svg (also added to CSS IntelliSense)
  • menuitem

Also updated the CSS transition snippet, which uses the wrong order and has -o- prefix that has not been needed for a long time.

* acronym
* big
* strike
* tt
* frame
* frameset
* noframes
* bdo
* data
* embed
* main
* rb, rp, rt, rtc, ruby
* s
* source
* template
* track
* u
* wbr
The element is no longer part of the API. It is no fully JavaScript
based.
The prefixless version should always be last, so that the older
prefixed implementation (if different) doesn’t win out in the cascade.
Especially now other browsers (Edge) support the webkit version as well.

Removed -o- as that was only used by Opera 11.5, which hasn’t been the
current version since I worked there. Presto users were quickly
auto-updated to Opera 12, and now Opera uses Blink.
@msftclas
Copy link

Hi @dstorey, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!


It looks like you're a Microsoft contributor (David Storey). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

@dstorey
Copy link
Member Author

dstorey commented Nov 22, 2015

…the HTML elements in CSS IntelliSense should now be consistent with what is syntax highlighted via the TextMate file. There are things that could arguably be removed, like that was dropped from the WhatWG spec (and Edge will not implement, and Chrome want to deprecate) and

, which was dropped from the W3C version of the spec.

The HTML IntelliSense also needs double checked. I added the

element as that was bugging me, but as it is not in alphabetical order, it will take a while to cross check against the 2 other HTML lists and the spec. It would be nice eventually to only have one list of elements rather than 3 that need to be kept in sync.

It is not included in the list of global attributes for either W3C
HTML5/5.1 or WhatWG Living Standard.

There was a proposal for an inert keyword but it was dropped
whatwg/html@5ddfc78
f1e4ad
Add download attribute (now widely supported.)
Remove media attribute (only valid on style and link elements)
* Add onlanguagechange
* Remove onblur, onerous, onfocus, onload (existing global attributes)
* Move onresize and onscroll to global event handlers
option is a child of datalist, not an attribute
* Add allowfullscreen attribute
* Set sandbox to boolean attribute
* Add valid values for the sandbox attribute
* Add minlength attribute
* Update required attribute to a boolean attribute
…as used by CSP. Included in W3C HTML5.1 and WHATWG Living standard.

Also re-ordered <script> to match spec, to make it easier to scan for
updates.
…no longer valid in HTML5.1 and WhatWG HTML
…as used by Web Components.
* Add menuitem element and define valid values for menuitem type
attribute
* Add valid values for menu type attribute
* Add menu to valid button values
* Remove old command element
@dstorey
Copy link
Member Author

dstorey commented Nov 23, 2015

Decided to update the HTML auto-complete/IntelliSense file while I was at it. It should be now in sync with the CSS auto-complete for HTML elements, and have all the correct attributes per the latest HTML5.1 spec and WHATWG Living standard, along with the valid enum and boolean values for those

@dstorey dstorey changed the title Update HTML highlighting & IntelliSense in CSS Update HTML highlighting & IntelliSense Nov 23, 2015
aeschli added a commit that referenced this pull request Nov 23, 2015
Update HTML highlighting & IntelliSense
@aeschli aeschli merged commit 5b657a5 into microsoft:master Nov 23, 2015
@aeschli
Copy link
Contributor

aeschli commented Nov 23, 2015

@dstorey Really nice, thanks so much. One thing:
CSS.plist is from https://github.com/textmate/css.tmbundle. Would you mind also make a pull request there, so we stay in sync? I can also do it, just let me know.

@aeschli
Copy link
Contributor

aeschli commented Nov 23, 2015

You mentioned the 3 files we have to keep in sync.
The tokenizer will always be separate as we want to use the text mate tokenizer from the community and don't want to branch off.
Code reuse between languages is tricky. For runtime, each language is packaged separately. If we reference the htmlTags file from CSS that whole file and dependencies end up in the CSS package, increasing the memory foot print of CSS. We would have to break it up in small pieces and make sure it stays useful for both HTML and CSS.
Eventually CSS and HTML will become real VS code extensions. Right now they are implemented in an old style and are located in our VSCode repo. They would each go in their own git repo. Code sharing would then have to be done through a common node module that provides the shared code.
So I think for now I'd rather avoid that and live with two separate tables.

@dstorey
Copy link
Member Author

dstorey commented Nov 23, 2015

@aeschli sure, I can look at making a PR to TextMate. I did a similar update to Atom when it was new, which I guess wasn't pushed back to TextMate as this version was further out of date than that version. I guess there are a fair few of these files of different vintages across the different editors that use TextMate plists.

@aeschli
Copy link
Contributor

aeschli commented Nov 24, 2015

@dstorey Lets submit the pull request and see if they take it. The experiences so far have been good, with a quick turnaround. Our goal is to avoid a branch as long as we can, so either side can profit from bug fixes.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
connor4312 added a commit that referenced this pull request Sep 19, 2022
The "control socket" is now hardcoded and virtual: any 'connections'
that come in are not forwarded on the network, but served by the control
server directly. This was just a small change since the raw channel
connections have `into_split() -> (AsyncRead, AsyncWrite)`.
What a coincidence!

I realized that our graceful restarts don't really work well in the new
world. I kept them somewhat graceful by just "queuing" the update to
happen after the requesting socket disconnects. Similar to VS Code itself.

I also realized our detection for ports/URLs in `serve-local` was wonky,
so I fixed that (not sure anyone is using it).

Fixes #461
Fixes #434
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.

None yet

3 participants