Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: replace broken glyphs with font-awesome #10123

Merged
merged 1 commit into from
Jun 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ describe('AdhocFilterEditPopover', () => {
wrapper.instance().onDragDown = sinon.spy();
wrapper.instance().forceUpdate();

expect(wrapper.find('i.glyphicon-resize-full')).toHaveLength(1);
expect(wrapper.find('i.fa-expand')).toHaveLength(1);
expect(wrapper.instance().onDragDown.calledOnce).toBe(false);
wrapper.find('i.glyphicon-resize-full').simulate('mouseDown', {});
wrapper.find('i.fa-expand').simulate('mouseDown', {});
expect(wrapper.instance().onDragDown.calledOnce).toBe(true);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ describe('AdhocMetricEditPopover', () => {
wrapper.instance().onDragDown = sinon.spy();
wrapper.instance().forceUpdate();

expect(wrapper.find('i.glyphicon-resize-full')).toHaveLength(1);
expect(wrapper.find('i.fa-expand')).toHaveLength(1);
expect(wrapper.instance().onDragDown.calledOnce).toBe(false);
wrapper.find('i.glyphicon-resize-full').simulate('mouseDown');
wrapper.find('i.fa-expand').simulate('mouseDown');
expect(wrapper.instance().onDragDown.calledOnce).toBe(true);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export default class AdhocFilterEditPopover extends React.Component {
</Button>
<i
onMouseDown={this.onDragDown}
className="glyphicon glyphicon-resize-full edit-popover-resize"
className="fa fa-expand edit-popover-resize text-muted"
/>
</div>
</Popover>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ export default class AdhocFilterOption extends React.PureComponent {
<Label className="option-label adhoc-option adhoc-filter-option">
{adhocFilter.getDefaultLabel()}
<i
className={`glyphicon glyphicon-triangle-right adhoc-label-arrow`}
className={`fa fa-caret-${
this.state.overlayShown ? 'left' : 'right'
} adhoc-label-arrow`}
/>
</Label>
</OverlayTrigger>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ export default class AdhocMetricEditPopover extends React.Component {
</Button>
<i
onMouseDown={this.onDragDown}
className="glyphicon glyphicon-resize-full edit-popover-resize"
className="fa fa-expand edit-popover-resize text-muted"
/>
</div>
</Popover>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default class AdhocMetricOption extends React.PureComponent {
// once the overlay has been opened, the metric/filter will never be
// considered new again.
this.props.adhocMetric.isNew = false;
this.setState({ overlayShown: false });
this.setState({ overlayShown: true });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this related to the glyph changes? is it intentional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was a minor bug I uncovered, as I change the icons to caret-(left|right)

}

onOverlayExited() {
Expand Down Expand Up @@ -99,7 +99,9 @@ export default class AdhocMetricOption extends React.PureComponent {
<Label className="option-label adhoc-option">
{adhocMetric.label}
<i
className={`glyphicon glyphicon-triangle-right adhoc-label-arrow`}
className={`fa fa-caret-${
this.state.overlayShown ? 'left' : 'right'
} adhoc-label-arrow`}
/>
</Label>
</OverlayTrigger>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ export default class DateFilterControl extends React.Component {
renderInput(props, key) {
return (
<FormGroup>
<InputGroup>
<InputGroup bsSize="small">
<FormControl
{...props}
type="text"
Expand All @@ -350,7 +350,7 @@ export default class DateFilterControl extends React.Component {
/>
<InputGroup.Button onClick={() => this.toggleCalendar(key)}>
<Button>
<Glyphicon glyph="calendar" style={{ padding: 3 }} />
<i className="fa fa-calendar" />
</Button>
</InputGroup.Button>
</InputGroup>
Expand Down Expand Up @@ -454,7 +454,7 @@ export default class DateFilterControl extends React.Component {
</div>
<div
style={{ width: '60px', marginTop: '-4px' }}
className="input-inline"
className="input-inline m-l-5 m-r-3"
>
<FormControl
bsSize="small"
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/explore/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
}

.adhoc-label-arrow {
font-size: @font-size-xxs;
font-size: @font-size-s;
margin-left: 3px;
position: static;
}
Expand Down