Skip to content

Commit 48d205a

Browse files
fix: styling of the documentation panel so it is a better user experience (#4203)
1 parent 2ed5ea2 commit 48d205a

File tree

5 files changed

+32
-67
lines changed

5 files changed

+32
-67
lines changed

src/me/components/DocSearchWidget.scss

Lines changed: 23 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ $article-text: #d4d7dd;
66

77
.WidgetSearch {
88
.WidgetHelperText {
9-
text-align: right;
9+
color: $cf-grey-65;
1010
margin: 0;
1111
}
1212
.DocSearch-Modal {
@@ -87,76 +87,61 @@ $article-text: #d4d7dd;
8787
}
8888

8989
.DocSearch-Hit-Container {
90-
height: 100% !important;
91-
padding-top: 4px !important;
90+
height: 100%;
91+
padding-top: 4px;
9292
}
9393

9494
.DocSearch-Hit-icon {
9595
display: none;
9696
}
9797

9898
.DocSearch-SearchBar {
99-
padding: 0 !important;
100-
box-shadow: none !important;
99+
padding: 0;
100+
box-shadow: none;
101101
}
102102
.DocSearch-Form {
103103
display: block;
104-
width: 100% !important;
104+
width: 100%;
105105
height: auto;
106106
margin: auto;
107-
border-radius: 4px !important;
108-
box-shadow: none !important;
107+
box-shadow: none;
109108
outline: none;
110109
font-family: $cf-text-font;
111-
border: $cf-input-border--default !important;
110+
border: 2px solid $cf-input-border--default;
111+
border-radius: 4px;
112112
background-color: $cf-input-background--default;
113113
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkViZW5lXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjIuNyAyMi41IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyMi43IDIyLjUiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxjaXJjbGUgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNjY2NzY2IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgY3g9IjguMSIgY3k9IjguNCIgcj0iNi44Ii8+PGxpbmUgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNjY2NzY2IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgeDE9IjEzLjIiIHkxPSIxMi45IiB4Mj0iMjEuNSIgeTI9IjIxLjQiLz48L3N2Zz4=);
114114
background-position: left 17px center;
115115
background-repeat: no-repeat;
116-
background-size: 3.5%;
117-
padding: 0 !important;
116+
background-size: 16px;
117+
padding: 0;
118118
label {
119119
display: none;
120120
}
121121

122122
transition: $cf-input--transition;
123123
:hover {
124-
border: 2px solid $cf-input-border--hover !important;
125-
border-radius: 4px !important;
126-
transition: $cf-input--transition !important;
127-
background-color: $cf-input-background--hover !important;
128-
color: $cf-input-text--hover !important;
129-
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkViZW5lXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjIuNyAyMi41IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyMi43IDIyLjUiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxjaXJjbGUgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNjY2NzY2IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgY3g9IjguMSIgY3k9IjguNCIgcj0iNi44Ii8+PGxpbmUgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNjY2NzY2IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgeDE9IjEzLjIiIHkxPSIxMi45IiB4Mj0iMjEuNSIgeTI9IjIxLjQiLz48L3N2Zz4=);
130-
background-position: left 17px center;
131-
background-repeat: no-repeat;
132-
background-size: 3.5%;
124+
background-color: $cf-input-background--hover;
133125
}
134126

135127
:focus {
136-
background-color: $cf-input-background--focused !important;
137-
border: 2px solid $cf-input-border--focused !important;
138-
border-radius: 4px !important;
139-
transition: $cf-input--transition;
140-
color: $cf-input-text--focused !important;
141-
background-image: none !important;
128+
background-image: none;
129+
background-color: $cf-input-background--focused;
142130
}
143131
}
144132

145-
input#docsearch-input:focus::placeholder {
146-
color: transparent !important;
133+
input#docsearch-input {
134+
padding-left: 45px;
135+
color: $cf-grey-95;
147136
}
148137

149138
.DocSearch-Input {
150-
font-size: 13px !important;
151-
width: 100% !important;
152-
box-shadow: none !important;
153-
height: 40px !important;
154-
padding: 10px !important;
139+
width: 100%;
140+
height: 40px;
155141
}
156142

157143
.DocSearch-Input::placeholder {
158-
padding-left: 40px !important;
159-
font-style: italic !important;
144+
font-size: medium;
160145
color: $cf-input--placeholder-text !important;
161146
}
162147

@@ -178,6 +163,9 @@ $article-text: #d4d7dd;
178163
border: none !important;
179164
}
180165

166+
.DocSearch-Dropdown {
167+
min-height: 7px;
168+
}
181169
.DocSearch-Dropdown::-webkit-scrollbar-thumb {
182170
border: none;
183171
background: linear-gradient(
@@ -190,10 +178,6 @@ $article-text: #d4d7dd;
190178
width: 6px;
191179
}
192180

193-
.DocSearch-Dropdown {
194-
padding-top: 16px !important;
195-
}
196-
197181
.DocSearch-Hits mark {
198182
color: $c-pool !important;
199183
}

src/me/components/DocSearchWidget.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ const supportLinks = [
2626
},
2727
{
2828
link: 'https://github.com/influxdata/ui/issues/new',
29-
title: '🐛 Report a bug',
29+
title: 'Report a bug',
3030
},
31-
{link: 'https://community.influxdata.com', title: '💭 Community Forum'},
31+
{link: 'https://community.influxdata.com', title: 'Community Forum'},
3232
{
3333
link:
3434
'https://github.com/influxdata/influxdb/issues/new?template=feature_request.md',
35-
title: 'Feature Requests',
35+
title: 'Feature Requests',
3636
},
3737
]
3838

@@ -42,7 +42,7 @@ const DocSearchWidget: FC = () => {
4242
<DocSearch type={DocSearchType.Widget} />
4343
<p className="WidgetHelperText">Press CTRL + M on any page to search</p>
4444
<div className="useful-links">
45-
<h4>Useful Links</h4>
45+
<h4 style={{textTransform: 'uppercase'}}>Useful Links</h4>
4646
<ul className="docslinks-list">
4747
{supportLinks.map(({link, title}) => (
4848
<li key={title}>

src/me/components/Resources.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ import {
66
FlexDirection,
77
ComponentSize,
88
AlignItems,
9-
Heading,
10-
HeadingElement,
11-
FontWeight,
129
} from '@influxdata/clockface'
1310

1411
// Utils
@@ -31,11 +28,6 @@ const ResourceLists: FC = () => {
3128
margin={ComponentSize.Small}
3229
>
3330
<Panel testID="documentation--panel">
34-
<Panel.Header>
35-
<Heading element={HeadingElement.H3} weight={FontWeight.Medium}>
36-
<label htmlFor="documentation">Documentation</label>
37-
</Heading>
38-
</Panel.Header>
3931
<Panel.Body>
4032
<DocSearchWidget />
4133
</Panel.Body>

src/me/containers/MePage.scss

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,20 @@
2323
margin-bottom: $cf-space-2xs;
2424
}
2525

26-
.tutorials-list,
2726
.docslinks-list,
2827
.useful-links {
2928
padding: 0;
3029
list-style: none;
31-
margin-top: 5%;
32-
}
3330

34-
.tutorials-list > li {
35-
font-size: 1.25em;
36-
background-color: $cf-grey-5;
37-
border-radius: $radius;
38-
padding: $ix-marg-c;
39-
margin-bottom: $ix-marg-a;
31+
h4 {
32+
color: $cf-grey-95;
33+
}
4034
}
4135

4236
.docslinks-list > li {
4337
font-size: 1.25em;
4438
background-color: transparent;
4539
border-radius: $radius;
46-
padding: 8px;
47-
margin-bottom: $ix-marg-a;
48-
}
49-
50-
.useful-links > li {
51-
margin-bottom: $cf-space-2xs;
5240
padding: 0;
41+
margin-bottom: $ix-marg-c;
5342
}

src/shared/search/DocSearch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const DocSearch: FC<DocSearchProps> = ({type}) => {
5050
apiKey={GLOBALSEARCH_API_KEY}
5151
indexName="influxdata"
5252
appId={GLOBALSEARCH_APP_ID}
53-
placeholder="Search our docs: "
53+
placeholder="Search Documentation"
5454
initialScrollY={0}
5555
searchParameters={facetFilters}
5656
hitComponent={HitComponent}

0 commit comments

Comments
 (0)