-
Notifications
You must be signed in to change notification settings - Fork 65
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
[BD-46] docs: added 'Leave feedback' button to the top of the component page #2395
Changes from 1 commit
f518e5d
92358d0
7a79fa8
c6572a5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ import { | |
Alert, | ||
breakpoints, | ||
useMediaQuery, | ||
Hyperlink, | ||
} from '~paragon-react'; | ||
import { SettingsContext } from '../context/SettingsContext'; | ||
import { DEFAULT_THEME } from '../../theme-config'; | ||
|
@@ -18,6 +19,7 @@ import Layout from '../components/PageLayout'; | |
import SEO from '../components/SEO'; | ||
import LinkedHeading from '../components/LinkedHeading'; | ||
import ComponentsUsage from '../components/insights/ComponentsUsage'; | ||
import LeaveFeedback from '../components/LeaveFeedback'; | ||
|
||
export interface IPageTemplate { | ||
data: { | ||
|
@@ -136,7 +138,10 @@ export default function PageTemplate({ | |
<p className="small mb-0">{mdx.frontmatter.notes}</p> | ||
</Alert> | ||
)} | ||
<h1 className="mb-4">{mdx.frontmatter.title}</h1> | ||
<div className="d-flex justify-content-between"> | ||
<h1 className="mb-4">{mdx.frontmatter.title}</h1> | ||
<LeaveFeedback as={Hyperlink} /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Per the issue, I believe the intent for "Leave feedback" now is to be a small There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like this defaults to using Is there a way to perhaps make this component a bit more flexible so the differing styles in the various use cases don't conflict? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the review! I replaced the top link and the bottom link with buttons, I also changed the implementation of links in the site footer. It seems to me that all links that lead to third-party resources should have rel="noopener noreferrer" and target="_blank ". |
||
</div> | ||
<MDXProvider components={shortcodes}> | ||
<MDXRenderer>{mdx.body}</MDXRenderer> | ||
</MDXProvider> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're using
Hyperlink
here to get it to have the external launch icon, we may also want to include it on the other in-page "Leave feedback" link towards the bottom.Likewise, we could also use
as={Hyperlink}
in the docs sitefooter
such that we get the correctrel="noopener noreferrer"
attribute for security. That said, given none of the other external links in the footer include an external launch icon, we can useHyperlink
'sshowLaunchIcon={false}
to hide the icon for the footer only.