Skip to content

Docs: Add labels to Docs sublist #6541

Open
@Anton-4

Description

@Anton-4

Recommend experience:

  • web design: novice
  • rust: beginner
  • frontend development: novice

For Str we currently have a list like this:

Utf8ByteProblem
Utf8Problem
isEmpty
concat
withCapacity
reserve
joinWith
split
repeat
toUtf8
fromUtf8
startsWith
endsWith
trim
trimStart
trimEnd
toDec
toF64
toF32
toU128
toI128
toU64
toI64
toU32
toI32
toU16
toI16
toU8
toI8
countUtf8Bytes
replaceEach
replaceFirst
replaceLast
splitFirst
splitLast
walkUtf8WithIndex
walkUtf8
releaseExcessCapacity
withPrefix
contains

We'd like to automatically add some nice looking labels so this becomes something like:

types:

  • Utf8ByteProblem
  • Utf8Problem

functions:

  • returns Bool:
    • isEmpty
    • startsWith
    • endsWith
    • contains
  • conversions:
    • toDec
    • toF64
    • toF32
    • toU128
    • toI128
    • toU64
    • toI64
    • toU32
    • toI32
    • toU16
    • toI16
    • toU8
    • toI8
    • toUtf8
    • fromUtf8
  • other:
    • concat
    • withCapacity
    • reserve
    • joinWith
    • split
    • repeat
    • trim
    • trimStart
    • trimEnd
    • countUtf8Bytes
    • replaceEach
    • replaceFirst
    • replaceLast
    • splitFirst
    • splitLast
    • walkUtf8WithIndex
    • walkUtf8
    • releaseExcessCapacity
    • withPrefix

It's recommended to investigate docs of other languages to see how they handle this UI.
The suggested categories are: types, constants, functions (returns Bool, conversions, other).
I recommend some experimentation with the UI, we'd like to avoid for the labels to become visual clutter.
If the category (e.g. conversions) is empty, no label should be shown.
Not all labels should probably be shown if the list is short, say 7 items or less.

This file should be a good starting point.
I suggest grouping the items in the list based on their type signatures using rust code.

Metadata

Metadata

Assignees

Labels

docs generationRelates to the generation of Documentation using `roc docs`enhancementNew feature or requestgood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions