scarb icon indicating copy to clipboard operation
scarb copied to clipboard

bug: scarb doc trait documentation should be displayed in parent module

Open enitrat opened this issue 1 year ago • 8 comments

Problem

https://docs.swmansion.com/scarb/corelib/core-boolean.html#traits image

The trait documentation should appear in the parent module. Otherwise, we can't simply read the module and understand its entire content.

Steps

No response

Possible Solution(s)

No response

Notes

No response

Version

No response

enitrat avatar Dec 01 '24 10:12 enitrat

@enitrat do I understand correctly you would like to see the entire documentation of sub-items on their parent documentation page? and not have the sub-item page at all?

FroyaTheHen avatar Apr 11 '25 10:04 FroyaTheHen

The ideal way is to have a UI similar to rust's stdlib or fuel's stdlib:

A list of items present in the module, along with the first paragraph of doc attached. you can click on the item to get more information. e.g. https://fuellabs.github.io/sway/master/std/asset/index.html

Image

enitrat avatar Apr 11 '25 12:04 enitrat

I personally think the mdbook format is not adapted at all to represent a reference of the corelib and is hardly usable / navigable today :/

enitrat avatar Apr 11 '25 12:04 enitrat

The example you gave indeed looks like a great solution. Many scarb doc improvements are about to be merged. One of them reorganises how the sub-item page looks like. You can already check it out if you want. I attach the screenshot of what it will look like. Image

Please share if you have any thoughts on that 🙏

FroyaTheHen avatar Apr 14 '25 06:04 FroyaTheHen

Ah, this is already much better!

I would like to see the list of all items inside the sidebar

enitrat avatar Apr 14 '25 09:04 enitrat

https://github.com/user-attachments/assets/ec6b9502-4b9d-4260-8a6e-5d01182c2521

FroyaTheHen avatar Apr 15 '25 06:04 FroyaTheHen

Is that something you have in mind?? ☝

FroyaTheHen avatar Apr 15 '25 06:04 FroyaTheHen

yeah that's nice

enitrat avatar Apr 15 '25 07:04 enitrat