Skip to content

Add a scoped search <-> patternfly chip component - #11194

Open
pcreech wants to merge 1 commit into
theforeman:developfrom
pcreech:react-component
Open

Add a scoped search <-> patternfly chip component#11194
pcreech wants to merge 1 commit into
theforeman:developfrom
pcreech:react-component

Conversation

@pcreech

@pcreech pcreech commented Aug 20, 2026

Copy link
Copy Markdown
Member

As a agentic development research item, I have attempted to use Claude Code to write a component that will parameterize the scoped search query and add patternfly chips of the filter variables.

@adamruzicka adamruzicka left a comment

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.

Would this be able to deal with complex queries containing parentheses and ors?

@pcreech

pcreech commented Aug 24, 2026

Copy link
Copy Markdown
Member Author

@adamruzicka At the moment, no. The current implementation was done as a MVP by the AI intentionally. In the added markdown file, that is spelled out as a current limitation and future improvement item.

pcreech added a commit to pcreech/foreman that referenced this pull request Aug 24, 2026
Addresses CI test failures in PR theforeman#11194 by resolving ESLint and
Prettier violations:

- Use named import for SearchChips component
- Add missing ouiaId prop to ChipGroup
- Fix const/let usage and variable shadowing
- Apply proper code formatting and destructuring
- Remove continue statement in favor of if-else

All 29 tests passing with zero linting errors.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Create a React component that bidirectionally converts between scoped
search queries and PatternFly chip components, improving UX by providing
visual representations of active search filters.

This implementation includes:
- ScopedSearchParser: Utility functions for parsing and converting queries
- SearchChips: React component displaying filters as PatternFly chips
- SearchBar integration: Automatic chip display on all table index pages
- Comprehensive test coverage: 28 unit tests for parser functionality

The component automatically works on any page using TableIndexPage or
SearchBar, including All Hosts and Hardware Models pages (SAT-39885 MVP).

Addresses JavaScript linting requirements:
- Use named imports for components
- Add required ouiaId props to PatternFly components
- Apply proper const/let usage and code formatting
- Use array destructuring patterns

All tests passing with zero linting errors.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants