New Script Editor Hover Tips and User-Defined Function Documentation

Really like this update! Just a quick question tho, cuz I’m not sure if this was already asked yet, but can you do this with parameters of a function as well? Like how most of the premade functions do it?

The user defined function docs will help me so much. I now no longer have to scroll up to the function to read the docs and back down to where I was at.

The custom function documentation is absolutely amazing, this is going to make understanding old functions so much easier. Currently my only problem, and I’m not sure if this is a bug, something not yet implemented, or if I’m just doing something wrong, but if a comment spans multiple lines, then there will be a line break in the tool tip at each of those lines. I realize this is most likely intentional to expand formatting options, however it’s annoying when you have a single idea that spans multiple lines.

Here’s an example with a function from a module I wrote awhile ago.

--[[
This function creates a confetti effect at the given location (originPoint)
  according to the settings provided to confettiInfo, which must be a ConfettiInfo
  created using Confetti.NewInfo. All of these parameters are required, they do not
  have any defaults
]]
Confetti.Create = function(confettiInfo: cTypes.ConfettiInfo, originPoint: UDim2): nil
	--Stuff here
end

TooltipExample
When the comment is displayed in the tool tip, it doesn’t fill the horizontal space, instead going down to a newline at each point the comment does. Although I could make the entire comment occupy one line, this would be annoying to read anywhere other than the tool tip.

Apologies if this is already a feature I missed, but some way to force multiple lines of the comment to display as a single line in the tool tip would be absolutely amazing.

moonwave is dying out due to it’s lack of customization and just not doing what you want it to, static site generators like mkdocs or vitepress are miles better and also don’t require all the comment trickery in your code (not to mention the entire moonwave generator breaks if there’s 1 single issue)

Moonwave is not dying out, and it is already extremely customizable with the power of Docusaurus. MKDocs and VitePress suffer from requiring API Documentation to be isolated from the code, making it harder to maintain and lack integration in tooling like hover documentation unless you maintain two separate API documentation, which is redundant.

If you are experiencing an issue with Moonwave, you should also either report it on the GitHub repository or in the ROSS Discord channel, help is always quickly available. Moonwave is stable and working in lots of open-source libraries, issues are rare and often easily solvable with assistance.

This is cool, but can we get support for the markdown syntaxes for these since that would be more cross-compatible with other editors?

I tried Moonwave and Rojo for my most recent project. I decided to not adopt either. It’s good for utilities if you were already using the documentation style specific to Moonwave. As I do bespoke manuals alongside thorough Lua documentation (using Affinity Publisher 2 and ROBLOX’s Script Editor), I’ve found no tool can automate that process for me. It’s extra time spent, but it’s worth that extra mile to me. The new tools ROBLOX just added empower me to strive for more, and all I want to see is it get even better.

I want there to definitely be more features of ROBLOX’s new documentation features. And I’m already getting good results with the adoption and integration of the new user-defined documentation features. I converted a script most in need of this feature in my project to using HTML tags and the new features.

The way I’ve settled into doing things is to have a single-line comment to for a rough overview of the function that developers scrolling past can see, and a multi-line comment to have a detailed breakdown of the parameters underneath. It gives some redundancy of the documentation for functions with simple signatures, but helps with larger functions in my case:

Simple Function Docs

Complex Function Docs

I am absolutely going to be converting my projects to utilising this feature as I’ve found it’s extremely powerful already with the use of HTML Tags and careful wording. We’re looking to get things fully migrated over for Winry 4.3 (Raphtalia) to make developer onboarding navigation much easier.

2 Likes

Finally we are getting this! I’ve wanted this for so long.

It would also be nice to Use them inside of Type annontations like

type coolDict = {
-- do cool things
     coolFunction : () -> nil
}

1 Like

You can do it, you just need this small workaround:

-- Health Bar GUI Wrapper
export type HealthBar = {
    Model : Model?,
    CharacterController : CharacterController?,
    GUI : Frame,
    GUIContainer : Frame,
    UpdateConnection : RBXScriptConnection?,

    -- Creates a new HealthBar instance linked to a CharacterController or Model, optionally associating it with a specific GUI.
    New : typeof(function(ControllerOrModel : CharacterController | Model, GUI : Frame?) 
        local healthBar : HealthBar 
        return healthBar
    end),

    -- Updates the displayed health based on the specified health value.
    UpdateHealth : typeof(function(self : HealthBar, UpdatedHealth : number) end),

    -- Sets a new character model to track and updates the health connection accordingly.
    UpdateCharacter : typeof(function(self : HealthBar, Character : Model) end),

    -- Toggles the visibility of the health bar's GUI container.
    EnableDisable : typeof(function(self : HealthBar, value : boolean) end),
}

Default support would be great though, IMO this way doesn’t look as good, but it works just fine.

User-Defined Function Documentation has to be one of the features of all time.

Are module script function comments going to be implemented?
example

2 Likes

Thanks for the tip - and yeah - I have tried BlockLua by the same Developer (v2?)
It’s not as easy as it looks - still need to understand what you can use & where.
Guess there are no shortcuts with these CodeBlocks (lacks documentation) … and have better success with ChatGPT (as I learn).
Thanks tho.

But where is the link itselfㅤ ㅤ ㅤ

1 Like