Skip to content

Conversation

bbollen23
Copy link
Contributor

@bbollen23 bbollen23 commented Feb 6, 2025

Does this PR close any open issues?

Closes #91

Give a longer description of what this PR addresses and why it's needed

Adds a structured link component for use in Markdown files with right-hand nav sidebar.

Provide pictures/videos of the behavior before and after these changes (optional)

Usage:
Inside the VegaStimulus.md file, we can add the structured links like this:

import StructuredLinks from '../../src/components/StructuredLinks/StructuredLinks.tsx';

<StructuredLinks
    demoLink="https://revisit.dev/study/demo-vega/"
    codeLink="https://github.com/revisit-studies/study/tree/main/public/demo-vega"
    referenceLinks={
      [
        {name: "Vega", url:"https://vega.github.io/vega/"},
        {name: "Vega-Lite", url: "https://vega.github.io/vega-lite/"},
        {name: "Vega Config Component", url: "../../typedoc/interfaces/VegaComponentConfig/"},
        {name: "Vega Path Component", url: "../../typedoc/interfaces/VegaComponentPath/"}
      ]
    }
/>

This will render like this:

Screenshot 2025-02-06 at 8 29 56 AM Screenshot 2025-02-06 at 8 30 02 AM

Are there any additional TODOs before this PR is ready to go?

TODOs:

  • Add how-to-use instructions somewhere in comments of website
  • Update any existing tutorials with the new structured links (especially examples)
  • Fix building issue

@bbollen23 bbollen23 requested review from alexsb and JackWilb February 6, 2025 15:32
@alexsb alexsb merged commit 6709e86 into main Feb 6, 2025
1 check passed
@alexsb alexsb deleted the adding-structured-links branch February 6, 2025 23:37
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.

Add structured fields to tutorials
4 participants