Adyen / lume

Lume is a component library for visual representations of data, built for Vue with D3.
https://lumedataviz.com
MIT License
44 stars 2 forks source link

:sparkles: Added intellisense support for component properties in VsCode #442

Open GeraldAdyen opened 2 months ago

GeraldAdyen commented 2 months ago

πŸ“ Description

I noticed that Lume components do not have any property intellisense in VsCode (and additional not type checking either). In Vue you can do this by extending the GlobalComponents type which VsCode uses to for Vue components to figure out it's props.

This will greatly improve the user experience for users I think as it will save time having to look at documentation to find properties and for TS users it will add extra type checking to make sure values being set are correct.

This solution needs to be tested though but I was unable to get docker to run or was not sure if there is some testing playground app?

πŸ’₯ Is this a breaking change (Yes/No):

I checked both as for JS users there will be no impact, but for typescript users as there was not property type checking at all a feature like this could break type checkers in their application....

πŸ“ Additional Information

Before submitting the PR, please make sure you do the following

netlify[bot] commented 2 months ago

Deploy Preview for adyen-lume ready!

Name Link
Latest commit 4d993819a084f7b509d1a82c3276f8fbbd3457a3
Latest deploy log https://app.netlify.com/sites/adyen-lume/deploys/66ea85bebe0c9c0008a776dd
Deploy Preview https://deploy-preview-442--adyen-lume.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

joao-m-santos commented 2 months ago

Thanks for the contribution @GeraldAdyen! I'll test it locally with a playground app.

joao-m-santos commented 2 months ago

@GeraldAdyen locally, this code actually breaks the TS imports. I fixed it, but don't notice a difference between having GlobalComponents or not. Can you give me an example of how it should look like with/without this extra Intellisense config?