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

forc-doc implementations missing from sidebar and enums #6018

Closed
sdankel opened this issue May 15, 2024 · 0 comments · Fixed by #6020
Closed

forc-doc implementations missing from sidebar and enums #6018

sdankel opened this issue May 15, 2024 · 0 comments · Fixed by #6020
Labels
bug Something isn't working forc-doc Everything related to the `forc doc` command plugin.

Comments

@sdankel
Copy link
Member

sdankel commented May 15, 2024

Example:

pub enum TestEnum {
    TestVariant: (),
}

impl TestEnum {
    pub fn test_fn() {}
}

impl Eq for TestEnum {
    fn eq(self, other: Self) -> bool {
        true
    }
}

image

The implementations don't show up in the sidebar nor in the page.

For structs, the implementations don't show up in the sidebar.

@sdankel sdankel added bug Something isn't working forc-doc Everything related to the `forc doc` command plugin. labels May 15, 2024
sdankel added a commit that referenced this issue May 15, 2024
## Description

Closes #5957

Also tweaked the CSS to make:
- the subheaders inside of implementations smaller than the impl header
- the colors a little less stark
- the impl toggle blocks open by default (same as crates.io)

Discovered two issues, relating to enums and the sidebar, which I'll
solve separately: #6018


![image](https://github.com/FuelLabs/sway/assets/47993817/907f59c9-8555-4f0f-9ab2-353d4c17fa12)

## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.

---------

Co-authored-by: Joshua Batty <joshpbatty@gmail.com>
sdankel added a commit that referenced this issue May 19, 2024
## Description

Closes #6018

Makes trait & inherent implementations show up for enums now: 

![image](https://github.com/FuelLabs/sway/assets/47993817/58308fb6-2807-44cd-aa4a-6f4ee314ceac)

And makes the sidebar include links to the impls:

![image](https://github.com/FuelLabs/sway/assets/47993817/55d9b17e-66dc-4f32-b1d8-325011eaef6f)


## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.

---------

Co-authored-by: Joshua Batty <joshpbatty@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forc-doc Everything related to the `forc doc` command plugin.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant