SmartlyDressedGames / Unturned-Docs

Documentation for Unturned's modding features.
135 stars 49 forks source link

Tables for Game Data Files (Don't Accept PR) #295

Closed MoltonMontro closed 8 months ago

MoltonMontro commented 8 months ago

Don't accept this PR even if it's eventually revised into something we like (contains some outdated info & has conflicts w/ #294). I've made it a PR so we can view the build on RTD more conveniently.

This PR adds tables to the docs for ItemGunAsset and ItemAsset. There's a table per subsection/grouping of properties, as opposed to one large table with every property in it. Unity Setup info has been moved below these tables, but that was done prior to the discussion in #294 about the order of sections.

Lots of considerations here. Here's some that came to mind:

If you have an extension to add custom styling to a site, you can use add the following to see word-wrapping. Unfortunately, because the width of the body/content area is rather small, it doesn't look that good.

/* Wrap table contents for large screens only. */
@media screen and (min-width: 769px) {
    .wy-table-responsive { overflow: visible; }
    .wy-table-responsive table td { white-space: normal; }
}

Of course, ItemAsset and ItemGunAsset are two of the largest classes so any issues here are going to particularly more profound.

SDGNelson commented 8 months ago

I think it's a good step - it looks nicer - but they are quite dense.

As a point of reference, it looks like Godot's docs use tables with word wrapping, but the table entries link to the full description below. https://docs.godotengine.org/en/stable/classes/class_node.html

They also have horizontal dividers between each full property description. Overkill for us?

For the sake of previewing, maybe worth adding the custom CSS to your commit? I experimented with this in a local build and it seemed to work: https://docs.readthedocs.io/en/stable/guides/adding-custom-css.html

MoltonMontro commented 8 months ago

Latest commits make revisions based on the feedback/ideas above, including word-wrapping. I've updated several more docs to have property tables, to help visualize how this would look on different pages. Note that Godot and RTD use custom styling to format their property descriptions, while these are just Lv.4 headings.

MoltonMontro commented 8 months ago

RTD building this PR anymore?