GenieFramework / GenieFramework/StippleUI.jl

Automatic generation of docstrings from Quasar docs

Open
#112 1 comment 0 reactions 1 assignee Claimed by @PGimenez View on GitHub
enhancement
Dominant language
Julia
Stars
90
Forks
16
PR merge metrics
No merged PRs in 30d

Description

I've created a script that automatically generates docstrings for the StippleUI components from the quasar docs. Repository here: https://github.com/GenieFramework/StippleUIDocstringGen

The steps are:

1. Extract component descriptions from the [Quasar docs.](https://github.com/quasarframework/quasar/tree/dev/docs/src/pages/vue-components)
2. Get Stipple usage examples from the [component gallery](https://github.com/BuiltWithGenie/ComponentGallery)
3. Extract component parameters from the Quasar API. This gives [the table](https://quasar.dev/vue-components/button/) that appears at the beginning of each component's page
4. Put all three parts together in a markdown document

The result is something like this:

```markdown
$(SIGNATURES)
The slider is a great way for the user to specify a number value between a minimum and maximum value, with optional steps between valid values. The slider also has a focus indicator (highlighted slider button), which allows for keyboard adjustments of the slider.

## Example
``julia
@app begin
@in volume = 4
end

ui() = slider(1:1:10, :volume)
``

## Arguments
### behavior
- `name::String` - Used to specify the name of the control; Useful if dealing with forms submitted directly to a URL
- `snap::Boolean` - Snap on valid values, rather than sliding freely; Suggestion: use with 'step' prop
- `reverse::Boolean` - Work in reverse (changes direction)
- `vertical::Boolean` - Display in vertical direction

### content
- `label::Boolean` - Popup a label when user clicks/taps on the slider thumb and moves it
- `markers::Any["Boolean", "Number"]` - Display markers on the track, one for each possible value for the model or using a custom step (when specifying a Number)
```

This is the complete docstring that we'd have for each function in the SippleUI API. Now, the question is how to add it. We could simply add it in the source, or we could write some macro to include the docstring with something like

```
@doccomp slider
function slider(...)
```

What would you suggest @essenciary @hhaensel ?

Also, note that this would only replace the docstrings for components that are already in the gallery since these are the ones with usage examples.

Screenshot 2023-10-19 at 16 52 47

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.