Skip to content

Commit 153da00

Browse files
authored
Improve resources panel styling, add default focus color and link highlight color (#212)
1 parent ee69c0c commit 153da00

File tree

5 files changed

+41
-9
lines changed

5 files changed

+41
-9
lines changed

src/views/webview-app/components/atlas-cta/atlas-cta.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
margin: 0 32px;
1414
}
1515

16+
.atlas-cta-text-link {
17+
color: #13AA52;
18+
}
19+
1620
.atlas-cta-logo {
1721
display: inline-block;
1822
margin-left: auto;

src/views/webview-app/components/atlas-cta/atlas-cta.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ type DispatchProps = {
1111
onLinkClicked: (screen: string, linkId: string) => void;
1212
};
1313

14-
type props = DispatchProps;
15-
16-
class AtlasCTA extends React.Component<props> {
14+
class AtlasCTA extends React.Component<DispatchProps> {
1715
onLinkClicked = (screen: string, linkId: string): void => {
1816
this.props.onLinkClicked(screen, linkId);
1917
};
@@ -32,6 +30,7 @@ class AtlasCTA extends React.Component<props> {
3230
If you don't already have a cluster you can create one for free
3331
using&nbsp;
3432
<a
33+
className={styles['atlas-cta-text-link']}
3534
target="_blank"
3635
rel="noopener"
3736
href="https://www.mongodb.com/cloud/atlas"

src/views/webview-app/components/resources-panel/resources-panel.less

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
top: 0;
3737
right: 0;
3838
bottom: 0;
39+
left: calc(100% - 468px);
3940
width: 420px;
41+
overflow: auto;
4042
padding: 48px 24px;
4143
background: var(--vscode-editor-background);
4244
animation-duration: 250ms;
@@ -48,11 +50,11 @@
4850

4951
@keyframes panelOpenAnimation {
5052
from {
51-
width: 0px;
53+
left: 100%;
5254
}
5355

5456
to {
55-
width: 420px;
57+
left: calc(100% - 468px);
5658
}
5759
}
5860

@@ -84,22 +86,30 @@
8486
}
8587

8688
.resources-panel-links-container {
87-
margin-top: 54px;
89+
margin-top: 70px;
8890
}
8991

9092
.resources-panel-link {
9193
margin-top: 8px;
92-
padding: 10px 20px;
94+
padding: 10px 16px;
9395
background-color: var(--vscode-sideBar-background, rgba(50, 50, 50, 0.25));
9496
line-height: 20px;
9597
color: var(--vscode-editor-foreground);
9698
text-align: left;
9799
text-decoration: none;
98100
display: block;
101+
position: relative;
102+
}
103+
104+
.resources-panel-link-icon {
105+
font-size: 18px;
106+
position: absolute;
107+
right: 16px;
108+
top: 21px;
99109
}
100110

101111
.resources-panel-footer {
102-
margin-top: 36px;
112+
margin-top: 40px;
103113
display: flex;
104114
flex-direction: row;
105115
text-align: left;
@@ -109,6 +119,9 @@
109119
display: inline-block;
110120
width: 50%;
111121
}
122+
.resources-panel-footer-item:last-child {
123+
padding-left: 10px;
124+
}
112125

113126
.resources-panel-footer-item-title {
114127
margin: 10px 0px;

src/views/webview-app/components/resources-panel/resources-panel.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import { connect } from 'react-redux';
33
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4-
import { faTimes } from '@fortawesome/free-solid-svg-icons';
4+
import { faTimes, faArrowRight } from '@fortawesome/free-solid-svg-icons';
55
import { Icon } from '@iconify/react';
66
import bookIcon from '@iconify-icons/codicon/book';
77

@@ -121,6 +121,10 @@ class ResourcesPanel extends React.Component<DispatchProps> {
121121
<div>
122122
{resourceLink.description}
123123
</div>
124+
<FontAwesomeIcon
125+
className={styles['resources-panel-link-icon']}
126+
icon={faArrowRight}
127+
/>
124128
</a>
125129
))}
126130
</div>

src/views/webview-app/connect.module.less

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
@import "~./styles/_variables";
22

3+
a:hover {
4+
color: #13AA52;
5+
}
6+
7+
*:focus {
8+
outline-color: #C3E7CA;
9+
}
10+
11+
a:focus {
12+
outline-color: #C3E7CA;
13+
}
14+
315
.page {
416
display: flex;
517
flex-direction: row;

0 commit comments

Comments
 (0)