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

Adjust the design of the catalog search page. #780

Merged
merged 1 commit into from
Nov 25, 2023
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
1 change: 0 additions & 1 deletion src/components/catalog/search/CatalogSearch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
.catalog-search-wrapper {
position: relative;
width: 100%;
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
Loading