open-props icon indicating copy to clipboard operation
open-props copied to clipboard

Docs: help folks setup autocomplete for variables

Open argyleink opened this issue 4 years ago • 34 comments

VScode lets you point to files, could have them point to props.css in the npm module or remote file?

argyleink avatar Sep 29 '21 19:09 argyleink

https://marketplace.visualstudio.com/items?itemName=vunguyentuan.vscode-css-variables

argyleink avatar Nov 30 '21 09:11 argyleink

woh, hardcore mode https://www.sublimetext.com/docs/completions.html#completion_files

argyleink avatar Nov 30 '21 09:11 argyleink

Hi @argyleink,

I'd love to work on this. But, please can you explain a little bit better? Thanks

kaf-lamed-beyt avatar Dec 02 '21 13:12 kaf-lamed-beyt

yeah! thanks!

the goal is so folks can see a list of open-props vars while they're typing CSS in their editor. There's multiple ways to help folks do this, and we need to research the easiest way to get started. maybe it's a plugin, or maybe it's a remote file we simply provide instructions for how to point an editor to it.

like, the main open props file https://unpkg.com/open-props, if remote files can be provided to the editor as auto-complete references, then this may just be a documentation task. but if that doesnt work, we may need to look into editor specific plugins.

does that help provide clarity? it's all so that moment in code, when you type var(-- that it pops up with all the open props, making it so you dont need memorize them.

argyleink avatar Dec 02 '21 17:12 argyleink

This is an awesome explanation @argyleink,

I'll start my research on how to create VScode (or general IDE) plugins that'll help me accomplish this task.

If this sounds fine, kindly let me know so I can get on it. Also if you have some resources that you think could speed up my process, I'd love you to share them with me.

Thanks, and I look forward to your reply.

kaf-lamed-beyt avatar Dec 03 '21 05:12 kaf-lamed-beyt

I saw that you referenced this VScode extension just now...

So now I'm guessing all I have to do is add the code in the main css open-prop file into the extension?

kaf-lamed-beyt avatar Dec 03 '21 05:12 kaf-lamed-beyt

yeah, if we make an extension. but i saw easier ways where you can tell your editor where to source autocomplete files, and someone points to node_modules, and it'd pick it up if it could. i imagined just a small section in the docs telling folks how to point to open-props in their settings, no extension required, but have open-props installed for that project..

i'm open to strategies on how to do it, if you want to research alternatives to extensions?

argyleink avatar Dec 04 '21 00:12 argyleink

Yeah.

Your idea sounds fine. I'll go with it. Let me go over some resources that'll help me accomplish this. I'll be back here with feedbacks.

kaf-lamed-beyt avatar Dec 04 '21 13:12 kaf-lamed-beyt

Dang, I can't find the "simple path" where no extensions are required! driving me nuts. I know i saw a workflow where you just show VS Code a CSS file of props, and it'll use it for intellisense...

argyleink avatar Dec 06 '21 16:12 argyleink

Maybe we could build a workflow?

Or, can you remember where you saw the workflow? or how to go about building one.

kaf-lamed-beyt avatar Dec 06 '21 16:12 kaf-lamed-beyt

Or we document how to install an extension and get it working with open props? Then document how to get it working with sublime or atom extensions next? That what you meant by workflow?

argyleink avatar Dec 06 '21 23:12 argyleink

Yes.

I think this would be better. Instead of building a whole new extension we can just provide the open-props vars to the extension that we're using and prepare a documentation for all the instances of popular IDEs

kaf-lamed-beyt avatar Dec 07 '21 06:12 kaf-lamed-beyt

where do you think folks will go to try and learn how to do this? docsite? wiki on github? separate blog post somewhere?

argyleink avatar Dec 07 '21 17:12 argyleink

shared in the Discord, here's how Pollen helps folks get it setup https://www.pollen.style/getting-started#vs-code

argyleink avatar Dec 07 '21 20:12 argyleink

where do you think folks will go to try and learn how to do this? docsite? wiki on github? separate blog post somewhere?

Hi @argyleink,

I was thinking we can point people to this workaround by creating a tutorial via the docs of this project.

And I can also write about how people can do that. I am a Technical Writer, BTW. I've written quite an amount of guides on the internet.

If you want to check them out, I can share them with you.

kaf-lamed-beyt avatar Dec 07 '21 20:12 kaf-lamed-beyt

shared in the Discord, here's how Pollen helps folks get it setup https://www.pollen.style/getting-started#vs-code

Exactly!

We can have something like this on the open-props docs site. Kindly let me know what you think.

kaf-lamed-beyt avatar Dec 07 '21 20:12 kaf-lamed-beyt

Sounds good, let's put a section on the docsite about it. Where does it fit you think? I'm thinking an expandable details/summary element in the Getting Started section could encapsulate it all?

VS Code Autocomplete

Write out steps for plugin installation and populating the settings with paths to OP, etc

argyleink avatar Dec 07 '21 21:12 argyleink

Yes, that sounds fine.

Placing it in "getting started" section would surely help in getting the attention of first time users

kaf-lamed-beyt avatar Dec 08 '21 09:12 kaf-lamed-beyt

Can you point me to where I'll be writing the guide? I'm guessing I'll be using markdown to do that right? Because I checked the docsite directory just now and I couldn't find anywhere that I'll be adding the guide.

kaf-lamed-beyt avatar Dec 08 '21 09:12 kaf-lamed-beyt

I can help yep! I imagine you could copy the CLI section and paste it right underneath. Then work inside of that HTML block.

like:

<div class="contain-pre" id="autocomplete">
  <h4>Autocomplete</h4>

   <details class="started-details">
     <summary>VS Code</summary>

     /* help instruction goes here */
  <details>
</div>

argyleink avatar Dec 08 '21 16:12 argyleink

I can help yep! I imagine you could copy the CLI section and paste it right underneath. Then work inside of that HTML block.

like:

<div class="contain-pre" id="autocomplete">
  <h4>Autocomplete</h4>

   <details class="started-details">
     <summary>VS Code</summary>

     /* help instruction goes here */
  <details>
</div>

I'm not getting you. Can you explain a little bit more?

Which file will I be working with? Do i have to pass all the content as markdown to a particular html file? Or I'll just have to update a specific markdown file.

I'm sorry for all these questions. I've worked with docusaurus before, when it comes to documentation that's what I'm kinda familiar with.

I'm asking all these questions so that I can be clear on what to do.🙏

kaf-lamed-beyt avatar Dec 08 '21 23:12 kaf-lamed-beyt

no markdown conveniences here yet, are you OK hand writing HTML?

aka, this is a bespoke docsite

argyleink avatar Dec 08 '21 23:12 argyleink

Oh okay.

Yes, I'm good at writing HTML.

kaf-lamed-beyt avatar Dec 09 '21 08:12 kaf-lamed-beyt

Hi @argyleink,

Any update on this?

kaf-lamed-beyt avatar Dec 11 '21 21:12 kaf-lamed-beyt

Sorry didn't know you were waiting on anything! What can I help ya get past?

argyleink avatar Dec 11 '21 21:12 argyleink

I was going to ask about the html file I'm to work on. But, I found it already.

So now, this code block below 👇🏼

<div class="contain-pre" id="autocomplete">
  <h4>Autocomplete</h4>

   <details class="started-details">
     <summary>VS Code</summary>

     /* help instruction goes here */
  <details>
</div>```

Is there a specific place that it is supposed to be? If yes, kindly point it to me, thanks.

kaf-lamed-beyt avatar Dec 13 '21 08:12 kaf-lamed-beyt

I think it'll be appropriate placed here https://github.com/argyleink/open-props/blob/main/docsite/index.html#L816, underneath the CLI section 👍🏻

argyleink avatar Dec 13 '21 17:12 argyleink

Awesome!

I'll start right away 😎

kaf-lamed-beyt avatar Dec 14 '21 09:12 kaf-lamed-beyt

When I have more information on this, I'll add it.

Sorry for the delay @argyleink

kaf-lamed-beyt avatar Jan 17 '22 18:01 kaf-lamed-beyt

I think this was closed by https://github.com/argyleink/open-props/pull/130.

geoffrich avatar Mar 12 '22 18:03 geoffrich