Skip to content

Commit

Permalink
Adjust the design of the catalog search page.
Browse files Browse the repository at this point in the history
  • Loading branch information
yoichiro committed Nov 25, 2023
1 parent 49979d4 commit 6661363
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/catalog/search/CatalogSearch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.catalog-search-wrapper {
position: relative;
width: 100%;
max-width: 960px;
//max-width: 960px;
z-index: 1;
display: flex;
flex-direction: column;
Expand Down
4 changes: 2 additions & 2 deletions src/components/catalog/search/CatalogSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class CatalogSearch extends React.Component<
className="catalog-search-container"
ref={this.state.containerRef}
>
<Grid container>
<Grid container sx={{ maxWidth: '960px' }}>
<Grid item sm={3} xs={12}>
{this.state.isSmallDisplay ? (
<Grid container>
Expand Down Expand Up @@ -149,7 +149,7 @@ class CatalogSearch extends React.Component<

export default CatalogSearch;

const SEARCH_RESULT_KEYBOARD_COUNT_PER_PAGE = 5;
const SEARCH_RESULT_KEYBOARD_COUNT_PER_PAGE = 4;

type SearchResultProps = {
definitionDocuments: IKeyboardDefinitionDocument[];
Expand Down
11 changes: 11 additions & 0 deletions src/components/catalog/search/CatalogSearchForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ export default class CatalogSearchForm extends React.Component<
value={this.props.keyword}
onChange={this.onChangeKeyword.bind(this)}
onKeyDown={this.onKeyDownKeyword.bind(this)}
size="small"
/>
</div>
<div className="catalog-search-condition">
Expand All @@ -192,6 +193,7 @@ export default class CatalogSearchForm extends React.Component<
label="Organization"
value={this.props.organizationId || '---'}
onChange={this.onChangeOrganizationId.bind(this)}
size="small"
>
<MenuItem key="catalog-search-organization-undefined" value="---">
---
Expand All @@ -217,6 +219,7 @@ export default class CatalogSearchForm extends React.Component<
label="Number of Keys"
value={this.getFeatureValue(ALL_KEY_COUNT_TYPE)}
onChange={this.onChangeKeyCount.bind(this)}
size="small"
>
<MenuItem value="---">---</MenuItem>
<MenuItem value="over_100">Over 100%</MenuItem>
Expand All @@ -240,6 +243,7 @@ export default class CatalogSearchForm extends React.Component<
label="Integrated/Split"
value={this.getFeatureValue(ALL_SPLIT_TYPE)}
onChange={this.onChangeSplitType.bind(this)}
size="small"
>
<MenuItem value="---">---</MenuItem>
<MenuItem value="integrated">Integrated</MenuItem>
Expand All @@ -255,6 +259,7 @@ export default class CatalogSearchForm extends React.Component<
label="Staggered"
value={this.getFeatureValue(ALL_STAGGERED_TYPE)}
onChange={this.onChangeStaggeredType.bind(this)}
size="small"
>
<MenuItem value="---">---</MenuItem>
<MenuItem value="row_staggered">Row Staggered</MenuItem>
Expand All @@ -273,6 +278,7 @@ export default class CatalogSearchForm extends React.Component<
label="Lighting"
value={this.getFeatureValue(ALL_LED_TYPE)}
onChange={this.onChangeLedType.bind(this)}
size="small"
>
<MenuItem value="---">---</MenuItem>
<MenuItem value="backlight">Backlight</MenuItem>
Expand All @@ -288,6 +294,7 @@ export default class CatalogSearchForm extends React.Component<
label="Key Switch"
value={this.getFeatureValue(ALL_KEY_SWITCH_TYPE)}
onChange={this.onChangeKeySwitchType.bind(this)}
size="small"
>
<MenuItem value="---">---</MenuItem>
<MenuItem value="cherry_mx">Cherry MX Compatible</MenuItem>
Expand All @@ -310,6 +317,7 @@ export default class CatalogSearchForm extends React.Component<
label="Hot Swap"
value={this.getFeatureValue(ALL_HOTSWAP_TYPE)}
onChange={this.onChangeHotswapType.bind(this)}
size="small"
>
<MenuItem value="---">---</MenuItem>
<MenuItem value="hot_swap">Supported</MenuItem>
Expand All @@ -324,6 +332,7 @@ export default class CatalogSearchForm extends React.Component<
label="OLED"
value={this.getFeatureValue(ALL_OLED_TYPE)}
onChange={this.onChangeOledType.bind(this)}
size="small"
>
<MenuItem value="---">---</MenuItem>
<MenuItem value="oled">Supported</MenuItem>
Expand All @@ -338,6 +347,7 @@ export default class CatalogSearchForm extends React.Component<
label="Speaker"
value={this.getFeatureValue(ALL_SPEAKER_TYPE)}
onChange={this.onChangeSpeakerType.bind(this)}
size="small"
>
<MenuItem value="---">---</MenuItem>
<MenuItem value="speaker">Supported</MenuItem>
Expand All @@ -352,6 +362,7 @@ export default class CatalogSearchForm extends React.Component<
label="Wireless"
value={this.getFeatureValue(ALL_WIRELESS_TYPE)}
onChange={this.onChangeWirelessType.bind(this)}
size="small"
>
<MenuItem value="---">---</MenuItem>
<MenuItem value="wireless">Supported</MenuItem>
Expand Down

0 comments on commit 6661363

Please sign in to comment.