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

Code folding in editor #77

Open
ColtonMcInroy opened this issue Jan 12, 2023 · 5 comments
Open

Code folding in editor #77

ColtonMcInroy opened this issue Jan 12, 2023 · 5 comments

Comments

@ColtonMcInroy
Copy link

Would you be able to enable code folding in the CodeMirror editor? Building some larger components and it would help significantly for visability.

@petersirka
Copy link
Collaborator

It's possible to add it, but I'm not sure if it's a smart idea. Of course, in some cases, it will be useful. But you can edit/create components in a local code editor with more editing capabilities.

@molda @Will-create What do you think about it? Personally, I'm not sure.

@molda
Copy link
Contributor

molda commented Jan 13, 2023

Most of the modern code editors has this build-in, so i assume there must be demand for it.
I only use it occasionally, but i still find it useful.

@ColtonMcInroy
Copy link
Author

Most modern code editors do have it built in because when working on larger projects, it can be a godsend. Using a local code editor is good for some things absolutely, but when working on the fly and using Flow itself as a development tool for building out components having as fully feature rich editor as possible makes it that much better to use and will make a lot more people enjoy using it. It allows for more rapid development and deployment. When creating a new component often I'll start with a Code component, play around with functionality, then shift it over into it's own component and add additional functionality to it.
It would be nice to have perhaps a configuration area where people could go to customise editor options such as code folding, line numbers, etc. I think the potential for this tool could progress to the point where it replaces a lot of peoples editors. They do not need to install any dependencies, do not need to spend time coding. People can build publicly accessible components for various projects. Having the ability to load components from more than just 2 urls would be a great additional feature as well.

I imagine a public registry, or a standard which every public project can follow, to share components to manage their software. Redis, mongodb, elastic, etc could all create and provide components. This could simplify development significantly and allow virtually anyone to be able to create and share applications or even parts of them. With a public repo similar to npm people could easily just install any collection of components from anyone. Pick and choose what they need for their application.
NodeRED development cycle is way to slow and has severe limitations that this just does not. This is a project which I can see changing how people develop. It can open up a world for regular people to build applications without programming knowledge, it can empower current developers to accomplish significantly more in a fraction of the time as well as being easily refactored, and allow projects to provide an easy interface to their software so that it can be more easily adopted.
Add in the ability to bundle in software packages other than npm, or containers/appimages/etc and I believe this would become a dominant application/service building tool.
Twitter or youtube could for instance, provide their own set of components to access their APIs allowing anyone to build out an application using those services. People could also design components which could provide the exact same type of services so that new alternatives can be made with enhancements. The possibilities are endless with the right approach.

Anyway, end rant, hope these words of encouragement and potential ideas for it find you well.

@Will-create
Copy link
Collaborator

I don't see any problem adding it. Most of people using VSCode or Sublime and Codepen text editors are used to it. it makes it easy to select/copy/read blocks. And editor preferences settings also is good idea too, since it will make such things optional for people.

@petersirka
Copy link
Collaborator

petersirka commented Jan 15, 2023

Okay, I've decided. It will be added shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants