guifier icon indicating copy to clipboard operation
guifier copied to clipboard

Show comments in GUI?

Open kevin-kruse opened this issue 1 year ago • 9 comments

Hi,

this is a nice project. Just one question came to my mind: Is there some way to also show comments from the YAML file for example?

Best

kevin-kruse avatar Jan 19 '24 07:01 kevin-kruse

Hi, thank you so much for showing interest to the project. I really appreciate it.

Can you tell me exactly what is your use case so I can help you better. If what you want to do is show some Text like paragraphs or Headers inside the editor to organize or for documentation reasons currently we don't have this feature. but its a very good Idea and we can implement it

maliknajjar avatar Jan 19 '24 18:01 maliknajjar

You can just add comments to the file like

# my additional comment
setting=true

It would be nice if those will be displayed also in the GUI :-)

kevin-kruse avatar Jan 20 '24 11:01 kevin-kruse

ok .. I get it now. Can you specify the exact location in the editor where you expect that comment to be positioned?

maliknajjar avatar Jan 20 '24 16:01 maliknajjar

you want that comment to be related to the setting boolean property?

maliknajjar avatar Jan 20 '24 22:01 maliknajjar

I just thought to place comments placed inside the YAML/TOML etc. placed above an property also above the property in the graphical gui

kevin-kruse avatar Jan 21 '24 00:01 kevin-kruse

ok .. so its going to be something similar to when programmers add comments to functions, methods or a properties in order to show some extra information about it similar to this:

image

you can add any simple comments or even markdown and its going to be rendered like this when you hover your mouse on that function:

image

so we can add a feature to add a comment to every property that exists in the guifier editor

and when you hover your mouse on the field it will look like this:

image

and this is how it looks in yaml

# The name of the user that will be created.
name: Alice

wdyt?

maliknajjar avatar Jan 21 '24 16:01 maliknajjar

Looks amazing :-)

kevin-kruse avatar Jan 21 '24 16:01 kevin-kruse

I really like the idea. thank you for sharing your ideas. I really appreciate it I will work on it as soon as possible 👍🏽

maliknajjar avatar Jan 21 '24 16:01 maliknajjar

just to keep you informed. I finished creating the description field param that enables the user to add description (comments) to the fields

you can use it in the Guifier easily this way

{
  "name": {
    "_value": "Alice",
    "_params": {
      "description": "the name of the game's main character"
    }
  },
}

image

now I am going to start in the parsing step. this step will involve taking the comments that resides on top of the property and add it to the description param of that field automatically

maliknajjar avatar Jan 28 '24 01:01 maliknajjar