Skip to content

fix issue 2632 #3570

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

Merged
merged 2 commits into from
Jan 20, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ afterAll(() => {

const saveFilter = jest.fn();
const selectCommunity = jest.fn();
const setCardType = jest.fn();
const setExpanded = jest.fn();
const setFilterState = jest.fn();
const setSearchText = jest.fn();
Expand All @@ -33,7 +32,6 @@ const mockDatas = [{
saveFilter,
selectCommunity,
selectedCommunityId: '3',
setCardType,
setExpanded,
setFilterState,
searchText: '',
Expand All @@ -54,7 +52,6 @@ const mockDatas = [{
saveFilter,
selectCommunity,
selectedCommunityId: '3',
setCardType,
setExpanded,
setFilterState,
searchText: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ exports[`Matches shallow shapshot shapshot 1`] = `
<div
className="src-shared-components-challenge-listing-Filters-___ChallengeFilters__filter-header___2l3Jh"
>
<FiltersCardsType
isCardTypeSet="type"
setCardType={[MockFunction]}
/>
<ChallengeSearchBar
label="Search Challenges:"
onSearch={[Function]}
Expand Down Expand Up @@ -97,10 +93,6 @@ exports[`Matches shallow shapshot shapshot 2`] = `
<div
className="src-shared-components-challenge-listing-Filters-___ChallengeFilters__filter-header___2l3Jh"
>
<FiltersCardsType
isCardTypeSet="Challenges"
setCardType={[MockFunction]}
/>
<ChallengeSearchBar
label="Search Challenges:"
onSearch={[Function]}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/**
* Challenge search & filters panel.
*/

import _ from 'lodash';
import React from 'react';
import PT from 'prop-types';
import SwitchWithLabel from 'components/SwitchWithLabel';
Expand All @@ -14,7 +12,6 @@ import EditTrackPanel from './EditTrackPanel';
import FiltersIcon from './FiltersSwitch/filters-icon.svg';
import FiltersPanel from './FiltersPanel';
import FiltersSwitch from './FiltersSwitch';
import FiltersCardsType from './FiltersCardsType';

import './ChallengeFilters.scss';

Expand All @@ -29,14 +26,12 @@ export default function ChallengeFilters({
filterState,
isAuth,
auth,
hideSrm,
isCardTypeSet,
isReviewOpportunitiesBucket,
saveFilter,
searchText,
selectCommunity,
selectedCommunityId,
setCardType,
setExpanded,
setFilterState,
setSearchText,
Expand All @@ -61,11 +56,6 @@ export default function ChallengeFilters({
return (
<div styleName="challenge-filters">
<div styleName="filter-header">
<FiltersCardsType
hideSrm={hideSrm}
isCardTypeSet={isCardTypeSet}
setCardType={setCardType}
/>
<ChallengeSearchBar
onSearch={text => setFilterState(Filter.setText(filterState, text))}
label={isReviewOpportunitiesBucket ? 'Search Review Opportunities:' : 'Search Challenges:'}
Expand Down Expand Up @@ -187,7 +177,6 @@ ChallengeFilters.defaultProps = {
isCardTypeSet: '',
isReviewOpportunitiesBucket: false,
isSavingFilter: false,
setCardType: _.noop,
challenges: [],
};

Expand All @@ -200,14 +189,12 @@ ChallengeFilters.propTypes = {
filterState: PT.shape().isRequired,
isAuth: PT.bool,
auth: PT.shape().isRequired,
hideSrm: PT.bool.isRequired,
isCardTypeSet: PT.string,
isSavingFilter: PT.bool,
isReviewOpportunitiesBucket: PT.bool,
saveFilter: PT.func.isRequired,
selectCommunity: PT.func.isRequired,
selectedCommunityId: PT.string.isRequired,
setCardType: PT.func,
setExpanded: PT.func.isRequired,
setFilterState: PT.func.isRequired,
searchText: PT.string.isRequired,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ $challenge-radius-4: $corner-radius * 2;

/* -100px is necessary to compensate for the temporarly added `Alpha preview`
* banner. Should be modified / removed together with banner. */
$search-bar-width: '100% - 705px';
$search-bar-width: '100% - 475px';
$search-input-width: '100% - 56px';

.ChallengeSearchBar {
display: inline-block;
vertical-align: middle;
margin-right: 40px;
position: relative;
top: 1px;
top: 10px;
height: 60px;

label {
font-size: 12px;
Expand Down