Skip to content

Commit

Permalink
fix: fix gui
Browse files Browse the repository at this point in the history
  • Loading branch information
Kabir-Ivan committed Jul 5, 2024
1 parent c561f6b commit 620327d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
2 changes: 2 additions & 0 deletions lib/static/components/controls/common-controls.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class ControlButtons extends Component {
return (
<React.Fragment>
<ControlSelect
size='s'
label="Show tests"
value={view.viewMode}
handler={actions.changeViewMode}
Expand All @@ -49,6 +50,7 @@ class ControlButtons extends Component {
]} size='m'/>
<GroupTestsSelect />
<ControlSelect
size='m'
label="Diff mode"
value={view.diffMode}
handler={actions.changeDiffMode}
Expand Down
12 changes: 12 additions & 0 deletions lib/static/components/controls/controls.less
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,18 @@
width: 500px;
}

.select__dropdown-s {
width: 100px;
}

.select__dropdown-m {
width: 150px;
}

.select__dropdown-l {
width: 200px;
}

.report-info {
.label {
margin: 0 15px 0 0;
Expand Down
4 changes: 2 additions & 2 deletions lib/static/components/controls/report-info.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ class ReportInfo extends Component {

return (
<div className="report-info">
<Label qa='version-label' size='m'>
<Label qa='version-label' size='m' className='label'>
Version
<div className='detail'>{version}</div>
</Label>
{!gui && <Label qa='created-at-label' size='m'>
{!gui && <Label qa='created-at-label' size='m' className='label'>
Created at
<div className='detail'>{date}</div>
</Label>}
Expand Down
5 changes: 3 additions & 2 deletions lib/static/components/controls/selects/control.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import CustomLabel from './label';

export default class ControlSelect extends Component {
static propTypes = {
size: PropTypes.string,
label: PropTypes.string.isRequired,
value: PropTypes.string.isRequired,
handler: PropTypes.func.isRequired,
Expand All @@ -26,7 +27,7 @@ export default class ControlSelect extends Component {
}

render() {
const {value, label, options, extendClassNames} = this.props;
const {size, value, label, options, extendClassNames} = this.props;
const formattedOpts = options.map(({value, text}) => ({
value,
text,
Expand All @@ -43,7 +44,7 @@ export default class ControlSelect extends Component {
<div className={className}>
<CustomLabel size='m' pin='round-brick'>{label}</CustomLabel>
<Select
className="select__dropdown"
className={`select__dropdown-${size || 's'}`}
selection
options={options}
value={[value]}
Expand Down

0 comments on commit 620327d

Please sign in to comment.