Skip to content

Add anchors to ContentTableSection #190

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

Conversation

dobromir-hristov
Copy link
Contributor

@dobromir-hristov dobromir-hristov commented Apr 19, 2022

Bug/issue #, if applicable: 79432376

Summary

This PR adds anchors to topic link sections, so users can link to them from content.

Dependencies

Docc needs to implement this and update the RenderJSON spec.

{
            "TasksGroupSection": {
                "required": [
                    "title",
                    "identifiers"
                ],
                "type": "object",
                "properties": {
                    "title": {
                        "type": "string"
                    },
                    "abstract": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/RenderInlineContent"
                        }
                    },
                    "discussion": {
                        "$ref": "#/components/schemas/ContentRenderSection"
                    },
                    "identifiers": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "generated": {
                        "type": "boolean"
                    },
+                 "anchor":{
+                     "type": "string"
+                  }
                }
            },
}

Testing

User the provided archive - TinyMixedLanguageLibrary.doccarchive.zip

Steps:

  1. Go to http://localhost:8080/documentation/tinymixedlanguagelibrary/mixedlangclass
  2. Click on Initializers link
  3. Assert you are scrolled to that part of the page.

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added tests
  • Ran npm test, and it succeeded
  • Updated documentation if necessary

Copy link
Member

@marinaaisa marinaaisa left a comment

Choose a reason for hiding this comment

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

Reviewed and tested. Looks good :)

@mportiz08
Copy link
Contributor

Closing since #408 will likely make this necessary and adds an additional feature. (We always can re-open if necessary at a later point)

@mportiz08 mportiz08 closed this Sep 8, 2022
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.

3 participants