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

APIRef macro adds duplicate related entries in sidebar #10864

Closed
OnkarRuikar opened this issue Apr 8, 2024 · 0 comments · Fixed by #10973 or #10956
Closed

APIRef macro adds duplicate related entries in sidebar #10864

OnkarRuikar opened this issue Apr 8, 2024 · 0 comments · Fixed by #10973 or #10956
Labels
🐛 bug Something isn't working, or isn't working as expected

Comments

@OnkarRuikar
Copy link
Contributor

OnkarRuikar commented Apr 8, 2024

Overview

The "Related pages for *" section shows link to same entry under "Instance properties" section:

screenshot

For example following are some of the pages that have this issue:

Problem

GroupData file contains entries for all the related stuff. And everything inside a group data entry is getting rendered in the sidebar. Some times there are entries under properties and method section lists that are also there in the group data so we see duplicate entries for them.

Solution

Remove entries from related array that have already been covered in previous sidebar sections. Related array should have only distinct entries.

if (mainIfIndex !== -1) {
related.splice(mainIfIndex, 1);
}
related.sort();

@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Apr 8, 2024
fiji-flo added a commit that referenced this issue Apr 22, 2024
@fiji-flo fiji-flo added 🐛 bug Something isn't working, or isn't working as expected and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Apr 22, 2024
caugner pushed a commit that referenced this issue Apr 23, 2024
fix(macro): fix duplicate entries in APIRef

fixes #10864
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working, or isn't working as expected
Projects
None yet
2 participants