Skip to content

Commit

Permalink
Hide unused search criterias
Browse files Browse the repository at this point in the history
  • Loading branch information
New0 committed May 28, 2019
1 parent 2887469 commit 355ee2c
Show file tree
Hide file tree
Showing 15 changed files with 189,586 additions and 68 deletions.
7,191 changes: 7,190 additions & 1 deletion clients/blocks/build/index.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clients/blocks/build/index.min.js.map

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions clients/components/DocSearch/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,16 @@
padding: 20px
}

.cf-doc-filter-form {
.tab-pane {
display: none;

&.active {
display: block;
}
}
}

@media screen and (min-width: 768px) {
.cf-doc-search-results-outer .col-xs-12 img {
margin-bottom: 0
Expand Down
2 changes: 1 addition & 1 deletion clients/components/DocSearch/Components/Keyword.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class Keyword extends React.Component {
return (
<FormGroup controlId="keyword-search">

<h3>Keyword Search</h3>
<h3>Keyword</h3>
<FormControl
type="text"
value={this.props.value}
Expand Down
68 changes: 36 additions & 32 deletions clients/components/DocSearch/DocSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class DocSearch extends React.Component {
constructor(props) {
super(props);
this.state = {
activeTabKey: 1,
activeTabKey: "categories",
isPanelVisible: true,
panelPosition: 'left',
panelSize: 0.33,
Expand Down Expand Up @@ -507,7 +507,7 @@ class DocSearch extends React.Component {
//1 = categories
//2 = keyword
//3 = add-ons
if (2 !== key) {
if ("keywords" !== key) {
this.setState({searchKeyword: ''});
} else {
if (this.state.lastParams.search) {
Expand All @@ -522,7 +522,7 @@ class DocSearch extends React.Component {
boxesChecked[addOn] = false;
});

if (1 === key) {
if ("categories" === key) {
boxesChecked.gettingStarted = true;
}

Expand All @@ -531,6 +531,7 @@ class DocSearch extends React.Component {
this.setState({activeTabKey: key});
this.setPageOne();
this.search();

}

componentDidUpdate() {
Expand Down Expand Up @@ -569,18 +570,20 @@ class DocSearch extends React.Component {
role="search"
className="cf-doc-filter-form"
>
<h3>Search By </h3>
<Tabs
defaultActiveKey={1}
defaultActiveKey="categories"
id="cf-doc-filters"
activeKey={this.state.activeTabKey}
onSelect={this.handleTabSelect}
>
<Tab
eventKey={1}
title="Category">
eventKey="categories"
title="Categories"
className="categories-tab"
>
<FormGroup>
<h3>Search By Category</h3>

<h3>Categories</h3>
<Category
checked={this.state.boxesChecked['gettingStarted']}
onChange={this.toggleGettingStarted}
Expand Down Expand Up @@ -617,45 +620,46 @@ class DocSearch extends React.Component {
label="Entries"
/>

<FormGroup>
<Category
checked={this.state.boxesChecked['developerAPI']}
onChange={this.toggleDeveloperAPI}
category={this.state.categories['developerAPI']}
label="Developer API"
/>
<Category
checked={this.state.boxesChecked['actions']}
onChange={this.toggleAction}
category={this.state.categories['actions']}
label="Actions"
/>
<Category
checked={this.state.boxesChecked['developerAPI']}
onChange={this.toggleDeveloperAPI}
category={this.state.categories['developerAPI']}
label="Developer API"
/>
<Category
checked={this.state.boxesChecked['actions']}
onChange={this.toggleAction}
category={this.state.categories['actions']}
label="Actions"
/>

<Category
checked={this.state.boxesChecked['filters']}
onChange={this.toggleFilters}
category={this.state.categories['filters']}
label="Filters"
/>
<Category
checked={this.state.boxesChecked['filters']}
onChange={this.toggleFilters}
category={this.state.categories['filters']}
label="Filters"
/>

</FormGroup>

</FormGroup>
</Tab>
<Tab
eventKey={2}
title="Keyword"
eventKey="keywords"
title="Keywords"
className="keywords-tab"
>
<Keyword
change={this.handleChangeKeyword}
value={this.state.searchKeyword}
/>
</Tab>
<Tab
eventKey={3}
eventKey="add-ons"
title="Add-ons"
className="add-on-tab"
>
<FormGroup controlId="add-on-search">
<h3>Add-on Documentation</h3>
<h3>Add-ons</h3>
<FormGroup>
<AddonCategory
apiRoot={this.state.apiRoot}
Expand Down
51,529 changes: 51,528 additions & 1 deletion clients/legacy-bundle/build/index.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clients/legacy-bundle/build/index.min.js.map

Large diffs are not rendered by default.

56,782 changes: 56,769 additions & 13 deletions clients/privacy/build/index.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clients/privacy/build/index.min.js.map

Large diffs are not rendered by default.

42,485 changes: 42,480 additions & 5 deletions clients/pro/build/index.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clients/pro/build/index.min.js.map

Large diffs are not rendered by default.

16 changes: 15 additions & 1 deletion clients/pro/build/style.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 355ee2c

Please sign in to comment.