Skip to content

Commit e38f649

Browse files
committed
allows UI to resize below 1430px width
1 parent 3e74f2c commit e38f649

File tree

8 files changed

+42
-12
lines changed

8 files changed

+42
-12
lines changed

webapp/javascript/components/DateRangePicker.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class DateRangePicker extends React.Component {
106106
render() {
107107
return <div className={this.state.opened ? "drp-container opened" : "drp-container"}>
108108
<OutsideClickHandler onOutsideClick={this.hideDropdown}>
109-
<button className="drp-button btn" onClick={this.showDropdown}>
109+
<button className="btn drp-button" onClick={this.showDropdown}>
110110
<FontAwesomeIcon icon={faClock} />
111111
<span>{this.humanReadableRange()}</span>
112112
</button>

webapp/javascript/components/DownloadButton.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class RefreshButton extends React.Component {
1616

1717
render() {
1818
return <div>
19-
<button className="drp-button btn" onClick={this.download}>
19+
<button className="btn" onClick={this.download}>
2020
&nbsp;
2121
<FontAwesomeIcon icon={faDownload} />
2222
&nbsp;

webapp/javascript/components/Header.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class Header extends React.Component {
4646
</div> */}
4747
{/* <LabelsFilter /> */}
4848
<div className="navbar-space-filler"></div>
49-
<div>
49+
<div className="navbar-links">
5050
<span className="navbar-link"><FontAwesomeIcon icon={faFile} />&nbsp;<a target="_blank" href="https://pyroscope.io/docs">Docs</a></span>
5151
<span className="navbar-link"><SlackIcon/>&nbsp;<a target="_blank" href="https://pyroscope.io/slack">Slack</a></span>
5252
<span className="navbar-link"><FontAwesomeIcon icon={faGithub} />&nbsp;<a target="_blank" href="https://github.com/pyroscope-io/pyroscope">GitHub</a></span>
@@ -60,8 +60,6 @@ class Header extends React.Component {
6060
</div>
6161
&nbsp;
6262
<RefreshButton/>
63-
{/* &nbsp; */}
64-
{/* <ZoomOutButton/> */}
6563
&nbsp;
6664
<DateRangePicker />
6765
</div>

webapp/javascript/components/RefreshButton.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ class RefreshButton extends React.Component {
1616

1717
render() {
1818
return <div>
19-
<button className="drp-button btn" onClick={this.refresh}>
20-
&nbsp;
19+
<button className="btn refresh-btn" onClick={this.refresh}>
2120
<FontAwesomeIcon icon={faSyncAlt} />
22-
&nbsp;
2321
</button>
2422
</div>
2523
}

webapp/javascript/components/ZoomOutButton.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ZoomOutButton extends React.Component {
1818

1919
render() {
2020
return <div>
21-
<button className="drp-button btn" onClick={this.zoomOut}>
21+
<button className="btn" onClick={this.zoomOut}>
2222
&nbsp;
2323
<FontAwesomeIcon icon={faSearchMinus} />
2424
&nbsp;

webapp/sass/components/drp.scss renamed to webapp/sass/components/daterangepicker.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
@use "../variables" as *;
22
@use "../mixins/outline" as *;
33

4+
.drp-button {
5+
white-space: nowrap;
6+
overflow: hidden;
7+
text-overflow: ellipsis;
8+
}
49

510
.drp-container {
611
position: relative;

webapp/sass/components/labels.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
.labels {
66
margin-left: 30px;
7-
min-width: 400px;
7+
min-width: 350px;
88
visibility: none;
99

1010

@@ -14,6 +14,10 @@
1414

1515
select {
1616
margin-right: 10px;
17+
max-width: 200px;
18+
white-space: nowrap;
19+
overflow: hidden;
20+
text-overflow: ellipsis;
1721
}
1822

1923
.label {

webapp/sass/profile.scss

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@use "variables"as *;
22
@use "mixins/outline"as *;
3-
@use "components/drp";
3+
@use "components/daterangepicker";
44
@use "components/labels";
55

66
@import '~sanitize.css';
@@ -80,6 +80,11 @@ tt {
8080

8181
.btn {
8282
@include outline;
83+
84+
white-space: nowrap;
85+
overflow: hidden;
86+
text-overflow: ellipsis;
87+
8388
// height: 30px;
8489
// line-height: 30px;
8590
border: 1px solid $btn-border-color;
@@ -150,7 +155,26 @@ input {
150155
}
151156

152157
body {
153-
min-width: 1430px;
158+
// this is the width of GitHub README page. so we're targeting this width so that it looks good for demo gif
159+
min-width: 838px;
160+
}
161+
162+
// see previous comment about min-width
163+
@media only screen and (max-width: 1440px) {
164+
.navbar-links {
165+
display: none;
166+
}
167+
}
168+
@media only screen and (max-width: 1024px) {
169+
.logo::after {
170+
content: '';
171+
}
172+
.labels {
173+
margin-left: 5px;
174+
}
175+
.drp-button {
176+
max-width: 375px;
177+
}
154178
}
155179

156180
// .timeline-wrapper {
@@ -257,3 +281,4 @@ html, body, #root, .pyroscope-app {
257281
display: block;
258282
}
259283
}
284+

0 commit comments

Comments
 (0)