Skip to content

Feat: add responsivity to searchbar#1741

Merged
MarceloRobert merged 1 commit intokernelci:mainfrom
MarceloRobert:feat/mobile-search
Mar 9, 2026
Merged

Feat: add responsivity to searchbar#1741
MarceloRobert merged 1 commit intokernelci:mainfrom
MarceloRobert:feat/mobile-search

Conversation

@MarceloRobert
Copy link
Copy Markdown
Collaborator

@MarceloRobert MarceloRobert commented Feb 11, 2026

Changes

  • Removes the searchbar from all listing pages and moves the control to a specific component used in TopBar
  • Improves usability of customDialog for use in the searchBox
  • Adds media query and replaces box with just a search icon, but with the same behavior

How to test

Go to any listing page, use the search box and also check the responsivity of the component. The search behavior should stil be the same.

Visual examples

Large screen:
image

Medium-large screens:
image

Medium screens:
image

Medium-small screens:
image

Small screens:
image

When clicking on the search icon:
image

Closes #1416

@MarceloRobert MarceloRobert self-assigned this Feb 11, 2026
@MarceloRobert MarceloRobert added the Frontend Most or all of the changes for this issue will be in the frontend code. label Feb 11, 2026
@MarceloRobert MarceloRobert force-pushed the feat/mobile-search branch 2 times, most recently from 77d82ca to d2251ec Compare March 5, 2026 19:34
@MarceloRobert MarceloRobert changed the title WIP feat: add responsivity to searchbar Feat: add responsivity to searchbar Mar 5, 2026
@MarceloRobert MarceloRobert marked this pull request as ready for review March 5, 2026 19:40
Comment on lines +28 to +34
return isTreeListing
? 'tree'
: isHardwareListing
? 'hardware'
: isIssueListing
? 'issue'
: 'unknown';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this condition is a kinda hard to read and also to visualize what is happening, we couldn't simplify this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

sure, changed it to an early-return structure

Comment on lines +81 to +93
switch (routeInfo) {
case 'tree':
forwardSearch = { treeSearch: value };
break;
case 'hardware':
forwardSearch = { hardwareSearch: value };
break;
case 'issue':
forwardSearch = { issueSearch: value };
break;
default:
break;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this switch case could be simplified using an object:

const fowardSearchFields = {
  tree: 'treeSearch',
  hardware: 'hardwareSearch',
  issue: 'issueSearch',
};

let forwardSearch = {[fowardSearchFields[routeInfo as keyof typeof fowardSearchFields]]: value};

you can also type fowardSearchFields to avoid using as, used here to be brief

Comment on lines +80 to +84
const forwardFields: Record<string, string> = {
tree: 'treeSearch',
hardware: 'hardwareSearch',
issue: 'issueSearch',
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you can move this outside the component

- Moves control of the searchbox from each page to the topbar;
- Improves custom dialog to be more custom;
- Improves searchbox with responsivity showing a small button and a dialog on small screens

Closes kernelci#1416
Copy link
Copy Markdown
Contributor

@gustavobtflores gustavobtflores left a comment

Choose a reason for hiding this comment

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

LGTM

@MarceloRobert MarceloRobert added this pull request to the merge queue Mar 9, 2026
Merged via the queue into kernelci:main with commit c6f527b Mar 9, 2026
7 checks passed
@MarceloRobert MarceloRobert deleted the feat/mobile-search branch April 22, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Frontend Most or all of the changes for this issue will be in the frontend code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix search bar placement on small screens

2 participants