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

DOP-3424: "On this page" subnav incorrectly displays headings for all language tabs #625

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mayaraman19
Copy link
Collaborator

@mayaraman19 mayaraman19 commented Oct 3, 2024

Ticket

DOP-3424

Notes

Creates a selector_ids object that reflects the AST in terms of the order of tabs/method selectors. This object looks something like this:

method-option: abc
children: {
     tab: def
     children: {
          tab: efg
     }
}

This is used by snooty (see PR) to determine correct headings to show.

README updates

    • This PR introduces changes that should be reflected in the README.md and/or HACKING.md, and I have made those updates.
    • This PR does not introduce changes that should be reflected in the README.md and/or HACKING.md

@mayaraman19 mayaraman19 changed the title Dop 3424 DOP-3424: "On this page" subnav incorrectly displays headings for all language tabs Oct 3, 2024
Copy link
Collaborator

@seungpark seungpark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

taking a look at the frontend PR! i think it'll help me understand the usage of page.ast.options['headings'][].selector_ids

snooty/postprocess.py Show resolved Hide resolved
snooty/postprocess.py Show resolved Hide resolved
snooty/postprocess.py Show resolved Hide resolved
self.scanned_pattern: List[Tuple[str, str]] = []

def scan_pattern(self, arr: List[Tuple[str, str]]) -> Dict[Any, Any]:
if arr is []:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor - can use if not arr. also wondering if preference is to have empty object or None

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.

2 participants