Skip to content

Add links to source code from analytics events documentation#337

Merged
zachmargolis merged 2 commits intomainfrom
margolis-event-documentation-source-link
Oct 25, 2022
Merged

Add links to source code from analytics events documentation#337
zachmargolis merged 2 commits intomainfrom
margolis-event-documentation-source-link

Conversation

@zachmargolis
Copy link
Copy Markdown
Contributor

@zachmargolis zachmargolis commented Oct 25, 2022

Related to: 18F/identity-idp#7208

Example:

It adds links to source definition, source usages

Screenshot:

Screen Shot 2022-10-24 at 5 08 58 PM

Comment on lines +19 to 20
className,
}: HeadingProps) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could also consider forwarding along any valid HTML props.

Suggested change
className,
}: HeadingProps) {
...props,
}: HeadingProps & JSX.HTMLAttributes<HTMLHeadingElement>) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok! And we'd want to remove those from the definition of HeadingProps then, right?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah there's a few more revisions that would need to be done in addition to that suggestion (also importing the JSX type and applying the props to TagName). The only thing we'd need to remove from the prop type is className.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

y'know, in retrospect, I think this is fine as-is, if you want to just leave it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

LOL ok will leave it

@zachmargolis zachmargolis merged commit fdaac3e into main Oct 25, 2022
@zachmargolis zachmargolis deleted the margolis-event-documentation-source-link branch October 25, 2022 15:48
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