structor icon indicating copy to clipboard operation
structor copied to clipboard

Autocompletion. Property assignment UI.

Open strobox opened this issue 7 years ago • 3 comments

I think autocompletion or some UI for fast property assignment will be good enhancement for this project. And some metadata should be added during extraction and publishing to market. Maybe component existed prop-types can be used, if presented?

strobox avatar May 07 '17 16:05 strobox

Hi @strobox.

And some metadata should be added during extraction and publishing to market.

Could you elaborate on what the purpose of metadata in extraction is?

I think autocompletion or some UI for fast property assignment will be good enhancement for this project.

Is quick props tab on quick style panel not helpful?

ipselon avatar May 07 '17 17:05 ipselon

Hi, @ipselon I'm aimed to use your great tool in conjunction with such styling libraries as Reflexbox, Robox, which provide styling through react properties. Also, I will try to publish some great UI library (Rebass ) to market today. So, about your questions:

Is quick props tab on quick style panel not helpful?

Yes, it helpful, didn't know about it. But autocompletion or at least dropdown which provide list of all available properties defined by component PropTypes will speed up and simplify prototyping process, I think.

Could you elaborate on what the purpose of metadata in extraction is?

Now I'm understand that this can be done after extraction by direct editing of proptypes definitions and witting documents for component. But can property comments from component documentation file be parsed and associated with component PropTypes, to display that comments, as hint for example, when properties selection (or autocompletion) occurs?

Is this two ideas deserve to take place in your project? I want participate and make some PRs.

strobox avatar May 08 '17 07:05 strobox

@strobox,

But can property comments from component documentation file be parsed and associated with component PropTypes

Good catch. Yes, that worth to be implemented. I'll try to figure out how to do that in the next release.

But autocompletion or at least dropdown which provide list of all available properties defined by component PropTypes

Let's try the first option with parsing documentation for properties. Parsing the source code is a bit complex taking in account different styles of properties definition. UPDATE I thought about this now and came up with idea of generating docs right from the source code (of course, it there is props definitions) in case the docs do not have props mentioned. We can talk about this on our Slack channel.

It would be great to add an editor for docs, though - that allows to edit properties right in the workspace.

The main idea for now is to create a significant amount of good components presets for Structor.

I want participate and make some PRs.

That's great. As I said we need to have good components presets on Structor Market now. If you like to extend an existing or create a new package - please try to make a PRs. Or if you want you may do changes in Structor, this is not so urgent now, though.

What would you like to do?

If you need some advise or consultation we may talk by Slack - please give me your email and I'll send you an invitation to Structor's team channel.

ipselon avatar May 08 '17 08:05 ipselon