Skip to content
This repository has been archived by the owner on Jun 30, 2024. It is now read-only.

Add support for @container queries by updating the CSS language service #439

Closed
wants to merge 2 commits into from

Conversation

marvinroger
Copy link

@marvinroger marvinroger commented Dec 11, 2023

This PR updates the CSS language service in order to support @container queries.

C.f. microsoft/vscode-css-languageservice#365 and microsoft/vscode-css-languageservice#371

The PR is ready to be published to npm 😉

@jasonwilliams
Copy link
Collaborator

Thanks @marvinroger
We will need to also update this here https://github.com/styled-components/typescript-styled-plugin/blob/main/package.json as that’s where the intellisense is handled.

Testing this is explained here: https://github.com/styled-components/vscode-styled-components/blob/main/CONTRIBUTING.md#intellisense

@marvinroger
Copy link
Author

I messed up the link in the description but it's already done styled-components/typescript-styled-plugin#19

This is why this PR is in draft

@jasonwilliams
Copy link
Collaborator

jasonwilliams commented Dec 11, 2023

Ok great thanks, have you tested these changes locally?
I can take a look myself later

@marvinroger
Copy link
Author

I did not test locally, but I can confirm that [email protected] does support container queries.
I'll let you test if you're OK with that 😉

@jasonwilliams
Copy link
Collaborator

@marvinroger marvinroger marked this pull request as ready for review December 12, 2023 08:27
@marvinroger
Copy link
Author

Thanks, just updated the PR!

@macko911
Copy link

macko911 commented Dec 13, 2023

Thanks for doing this!
I tried to test this locally (built the extension and installed to VSCode) but it doesn't seem to have an effect - I still see the following warning.
image
This is the first time I'm building/installing a VSCode extension locally so it's probably just me not doing it right, but wanted to let you know. Hope your own test goes well. I can try and share some small reproduction later if it will be of any help.

It also looks like @container queries should be supported in the latest version of VSCode (1.85) in .css files based on this Stack Overflow answer but that also doesn't seem to be the case for me either. Not sure what's up.

@jasonwilliams
Copy link
Collaborator

jasonwilliams commented Dec 13, 2023

Yeah I've tested this branch and I'm still getting the warning too, are we sure this has been fixed in the styled plugin?
@marvinroger If you could make a fixture and add it to this branch which we can all look at that would help.

Sorry I know you've already done work in this repo but you may need to add a test here so we can be sure this has been fixed in the plugin before we try adding it to the extension.

I've also updated the main branch so you'll need to rebase if you can too

This is the first time I'm building/installing a VSCode extension locally so it's probably just me not doing it right, but wanted to let you know. Hope your own test goes well. I can try and share some small reproduction later if it will be of any help.

@macko911 I don't know how you set up before, but if you want to help fix this, I would say follow https://github.com/styled-components/vscode-styled-components/blob/main/CONTRIBUTING.md#intellisense

Then set some breakpoints in the styled plugin to see why its still warning about the unknown property at rule

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.

3 participants