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

Small inconsistency in rendering category names #2196

Closed
ilg-ul opened this issue Mar 9, 2023 · 4 comments
Closed

Small inconsistency in rendering category names #2196

ilg-ul opened this issue Mar 9, 2023 · 4 comments
Labels
enhancement Improved functionality good first issue Easier issue for first time contributors help wanted Contributions are especially encouraged
Milestone

Comments

@ilg-ul
Copy link

ilg-ul commented Mar 9, 2023

Search Terms

@category inconsistency

Problem

I'm using the @category tag to group some accessors and methods, and in the index they are listed as Accessors - {{ categoryName }}, or Methods - {{ categoryName }}, while in the listing below the dash is gone and the order is reversed, with the category name shown first. In my case, this made naming the categories a bit more difficult, trying to match both formats.

Screenshot 2023-03-09 at 12 18 59

Screenshot 2023-03-09 at 12 19 19

Suggested Solution

Use the same order as in the index, and the dash.

@ilg-ul ilg-ul added the enhancement Improved functionality label Mar 9, 2023
@Gerrit0 Gerrit0 added help wanted Contributions are especially encouraged good first issue Easier issue for first time contributors labels Mar 9, 2023
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Mar 9, 2023

That's weird, should be an easy fix

@ilg-ul
Copy link
Author

ilg-ul commented Mar 9, 2023

The index names are rendered in src/lib/output/themes/default/partials/index.tsx:

<h3 class="tsd-index-heading">{prependName ? `${prependName} - ${item.title}` : item.title}</h3>

The second location where the name is printed is less evident, apparently some objects are created, but I could not identify where the names are computed. :-(

Perhaps @futurGH can be of more help than I can.

@futurGH
Copy link
Contributor

futurGH commented Mar 9, 2023

Just need to switch around the order here:

{!!item.title && <>{item.title} </>}
{group.title}

@ilg-ul
Copy link
Author

ilg-ul commented Mar 9, 2023

Thank you for pointing the location.

Time permitting, could you also add a PR for this? The .tsx syntax is new to me and I'd probably mess something. :-(

@Gerrit0 Gerrit0 added this to the v0.24 milestone Mar 11, 2023
@Gerrit0 Gerrit0 mentioned this issue Apr 3, 2023
8 tasks
@Gerrit0 Gerrit0 closed this as completed in 0fe6955 Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improved functionality good first issue Easier issue for first time contributors help wanted Contributions are especially encouraged
Projects
None yet
Development

No branches or pull requests

3 participants