Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix merged functions and constants as values in html docs generator #4277

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

metruzanca
Copy link

This closes #4214

Do we want the functions/constants removed from the main content area? I've kept them for now.

Here's a preview:

brave_bBSFmXf0ig

Thanks @giacomocavalieri for the moral support in discord as usual.

In sidebar merging constants and functions
@metruzanca metruzanca changed the title feat updated docs template fix merged functions and constants as values in html docs generator Feb 22, 2025
@metruzanca
Copy link
Author

metruzanca commented Feb 22, 2025

Not sure why snapshot_kind: text was removed when doing cargo insta review. Let me know if this is an issue and I can amend. (first time using the tool)

@GearsDatapacks
Copy link
Member

I think it's just a field from an older version of the tool which is not present any more.

@lpil
Copy link
Member

lpil commented Feb 22, 2025

Great, thank you! Could you sort them into alphabetical order too please

Do we want the functions/constants removed from the main content area? I've kept them for now.

Could you merge it all into one please, and also alphabetically sorted 🙏

@lpil lpil marked this pull request as draft February 22, 2025 21:57
@metruzanca
Copy link
Author

Could you merge it all into one please, and also alphabetically sorted

Alright in that case, moving away from this naive solution to a more complete one. I think I'll combine DocsFunction and Constant into DocsValue. That way in generate_html I can sort before the flat_map and as a result cleanup the now messy template. Using options for the extra fields functions have (seems like askama templates have good support for this).

Have only played around with rust thus far, let me know if this sounds rusty enough.


I'll probably code up an attempt of this tomorrow morning (my tz: est)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTML documentation sidebar: merge "functions" and "constants" into one section named "values"
3 participants