Skip to content

Commit ae155b8

Browse files
Fix links not being blue and not being highlighted in the sidebar (#1809)
* Change from <a> tags to DrawerExternalLink in About page * Add hover color to links in StyledSidebarSlide. * Update test to accomodate new autogenerated class tag
1 parent 3c44593 commit ae155b8

File tree

4 files changed

+33
-62
lines changed

4 files changed

+33
-62
lines changed

src/browser/modules/Carousel/styled.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,9 @@ export const StyledSidebarSlide = styled.div.attrs({
373373
text-decoration: ${props =>
374374
props.theme.name === 'dark' ? 'underline' : 'none'};
375375
}
376+
& a:hover {
377+
color: ${dark.linkHover};
378+
}
376379
& kbd {
377380
color: ${dark.primaryBackground} !important; /* inverted */
378381
background-color: ${dark.primaryText} !important;

src/browser/modules/Sidebar/About.tsx

Lines changed: 27 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { connect } from 'react-redux'
2323
import {
2424
Drawer,
2525
DrawerBody,
26+
DrawerExternalLink,
2627
DrawerFooter,
2728
DrawerHeader,
2829
DrawerSection,
@@ -62,9 +63,9 @@ const About = ({ serverVersion, serverEdition }: AboutProps) => (
6263
<DrawerSection>
6364
<DrawerSubHeader>
6465
Made by{' '}
65-
<a target="_blank" rel="noreferrer" href="http://neo4j.com/">
66+
<DrawerExternalLink href="http://neo4j.com/">
6667
Neo4j, Inc
67-
</a>
68+
</DrawerExternalLink>
6869
</DrawerSubHeader>
6970
</DrawerSection>
7071
<DrawerSection>
@@ -77,35 +78,25 @@ const About = ({ serverVersion, serverEdition }: AboutProps) => (
7778
<DrawerSectionBody>
7879
<p>
7980
Neo4j Browser version:{' '}
80-
<a
81+
<DrawerExternalLink
8182
href={`https://github.com/neo4j/neo4j-browser/releases/tag/${browserVersion}`}
82-
target="_blank"
83-
rel="noreferrer"
8483
>
8584
{browserVersion}
86-
</a>
85+
</DrawerExternalLink>
8786
</p>
8887
{serverVersion && serverEdition && (
8988
<p>
9089
Neo4j Server version:{' '}
91-
<a
92-
target="_blank"
93-
rel="noreferrer"
94-
href={asChangeLogUrl(serverVersion)}
95-
>
90+
<DrawerExternalLink href={asChangeLogUrl(serverVersion)}>
9691
{serverVersion}
97-
</a>{' '}
92+
</DrawerExternalLink>{' '}
9893
({serverEdition})
9994
</p>
10095
)}
10196
<p>
102-
<a
103-
href="https://github.com/neo4j/neo4j-browser/wiki/changelog"
104-
target="_blank"
105-
rel="noreferrer"
106-
>
97+
<DrawerExternalLink href="https://github.com/neo4j/neo4j-browser/wiki/changelog">
10798
Neo4j Browser Changelog
108-
</a>
99+
</DrawerExternalLink>
109100
</p>
110101
{__BUILD_NUMBER__ && (
111102
<div onClick={() => copyToClipboard(__BUILD_NUMBER__)}>
@@ -127,75 +118,51 @@ const About = ({ serverVersion, serverEdition }: AboutProps) => (
127118
<DrawerSection>
128119
<DrawerSubHeader>License</DrawerSubHeader>
129120
<DrawerSectionBody>
130-
<a
131-
target="_blank"
132-
rel="noreferrer"
133-
href="http://www.gnu.org/licenses/gpl.html"
134-
>
121+
<DrawerExternalLink href="http://www.gnu.org/licenses/gpl.html">
135122
GPLv3
136-
</a>{' '}
123+
</DrawerExternalLink>{' '}
137124
or{' '}
138-
<a
139-
target="_blank"
140-
rel="noreferrer"
141-
href="http://www.gnu.org/licenses/agpl-3.0.html"
142-
>
125+
<DrawerExternalLink href="http://www.gnu.org/licenses/agpl-3.0.html">
143126
AGPL
144-
</a>{' '}
127+
</DrawerExternalLink>{' '}
145128
for Open Source, and{' '}
146-
<a
147-
target="_blank"
148-
rel="noreferrer"
149-
href="https://neo4j.com/licensing/"
150-
>
129+
<DrawerExternalLink href="https://neo4j.com/licensing/">
151130
NTCL
152-
</a>{' '}
131+
</DrawerExternalLink>{' '}
153132
Commercial.
154133
</DrawerSectionBody>
155134
</DrawerSection>
156135
<DrawerSection>
157136
<DrawerSubHeader>Participate</DrawerSubHeader>
158137
<DrawerSectionBody>
159138
Discuss on{' '}
160-
<a
161-
target="_blank"
162-
rel="noreferrer"
163-
href="https://community.neo4j.com/"
164-
>
139+
<DrawerExternalLink href="https://community.neo4j.com/">
165140
Neo4j Community Forum
166-
</a>{' '}
141+
</DrawerExternalLink>{' '}
167142
<br />
168143
Ask questions at{' '}
169-
<a
170-
target="_blank"
171-
rel="noreferrer"
172-
href="http://stackoverflow.com/questions/tagged/neo4j"
173-
>
144+
<DrawerExternalLink href="http://stackoverflow.com/questions/tagged/neo4j">
174145
Stack Overflow
175-
</a>
146+
</DrawerExternalLink>
176147
<br />
177148
Visit a local{' '}
178-
<a target="_blank" rel="noreferrer" href="http://neo4j.meetup.com/">
149+
<DrawerExternalLink href="http://neo4j.meetup.com/">
179150
Meetup Group
180-
</a>
151+
</DrawerExternalLink>
181152
<br />
182153
Contribute code to{' '}
183-
<a target="_blank" rel="noreferrer" href="http://github.com/neo4j">
154+
<DrawerExternalLink href="http://github.com/neo4j">
184155
Neo4j
185-
</a>{' '}
156+
</DrawerExternalLink>{' '}
186157
or{' '}
187-
<a
188-
target="_blank"
189-
rel="noreferrer"
190-
href="http://github.com/neo4j/neo4j-browser"
191-
>
158+
<DrawerExternalLink href="http://github.com/neo4j/neo4j-browser">
192159
Neo4j Browser
193-
</a>
160+
</DrawerExternalLink>
194161
<br />
195162
Send us your Browser feedback via{' '}
196-
<a href="mailto:[email protected]?subject=Neo4j Browser feedback">
163+
<DrawerExternalLink href="mailto:[email protected]?subject=Neo4j Browser feedback">
197164
email
198-
</a>
165+
</DrawerExternalLink>
199166
</DrawerSectionBody>
200167
</DrawerSection>
201168
<DrawerSection>

src/browser/modules/Sidebar/__snapshots__/GuideDrawer.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ exports[`GuideDrawer renders list view including Remote Guides list 1`] = `
6161
class="sc-khQegj jfEAI"
6262
/>
6363
<div
64-
class="sc-fWCJzd jkzpjJ slide"
64+
class="sc-fWCJzd fWxPIy slide"
6565
style="padding: 0px 15px;"
6666
>
6767
You can also access Browser guides by running
@@ -241,7 +241,7 @@ exports[`GuideDrawer renders list view without Remote Guides 1`] = `
241241
class="sc-khQegj jfEAI"
242242
/>
243243
<div
244-
class="sc-fWCJzd jkzpjJ slide"
244+
class="sc-fWCJzd fWxPIy slide"
245245
style="padding: 0px 15px;"
246246
>
247247
You can also access Browser guides by running

src/browser/styles/themes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ export const dark = {
168168
headerText: '#f4f4f4',
169169
primaryHeaderText: '#f4f4f4',
170170
link: '#5CA6D9',
171+
linkHover: '#1e70bf',
171172
topicText: '#fff',
172173
preText: '#fff',
173174
asideText: 'rgb(255, 255, 255, 0.87)',

0 commit comments

Comments
 (0)