-
Notifications
You must be signed in to change notification settings - Fork 78
feat(FR-1370): Property filter component for GraphQL v2 filter type #4170
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
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 53.11% | 128/241 |
| 🔴 | Branches | 33.2% | 80/241 |
| 🔴 | Functions | 35.71% | 20/56 |
| 🔴 | Lines | 55.4% | 118/213 |
Test suite run success
55 tests passing in 3 suites.
Report generated by 🧪jest coverage report action from a2a70f9
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 4.62% | 502/10873 |
| 🔴 | Branches | 3.72% | 285/7657 |
| 🔴 | Functions | 2.63% | 90/3427 |
| 🔴 | Lines | 4.58% | 488/10646 |
Test suite run success
114 tests passing in 13 suites.
Report generated by 🧪jest coverage report action from 8619c7b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new BAIGraphQLPropertyFilter component for constructing GraphQL filter objects with a flexible UI interface, and updates GraphQL transformer compatibility to version 25.12.0.
- Adds a comprehensive GraphQL property filter component with support for string, number, boolean, and enum filter types
- Provides flexible combination modes (AND/OR) and rich operator support (eq, ne, contains, startsWith, etc.)
- Updates GraphQL transformer version compatibility from 25.14.0 to 25.12.0
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| react/src/helper/graphql-transformer.ts | Updates version compatibility check for GraphQL transformer |
| packages/backend.ai-ui/src/components/BAIGraphQLPropertyFilter.tsx | New component implementation with types, utilities, and React component |
| packages/backend.ai-ui/src/components/BAIGraphQLPropertyFilter.stories.tsx | Comprehensive Storybook documentation with multiple usage examples |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
packages/backend.ai-ui/src/components/BAIGraphQLPropertyFilter.tsx
Outdated
Show resolved
Hide resolved
ee1f5d3 to
36ea8b5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update package/backend.ai-ui/src/components/index.ts
36ea8b5 to
a905a38
Compare
a905a38 to
a4387ed
Compare
a4387ed to
b26384d
Compare
b26384d to
b000e29
Compare
b000e29 to
e5a7817
Compare
b000e29 to
c103a8e
Compare
c103a8e to
8cad22d
Compare
8cad22d to
484babf
Compare
484babf to
8619c7b
Compare
8619c7b to
be0d584
Compare
packages/backend.ai-ui/src/components/BAIGraphQLPropertyFilter.tsx
Outdated
Show resolved
Hide resolved
9950492 to
2dd2fae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
2dd2fae to
c5bcbf9
Compare
c5bcbf9 to
2dd2fae
Compare
Merge activity
|
…4170) Resolves #4143 ([FR-1370](https://lablup.atlassian.net/browse/FR-1370)) # Introduce BAIGraphQLPropertyFilter Component This PR introduces a new `BAIGraphQLPropertyFilter` component that provides an advanced filtering interface for GraphQL-based [Backend.AI](http://Backend.AI) applications. The component allows users to construct complex filter conditions that can be directly used in GraphQL queries. Key features: - Support for various GraphQL filter types (String, Number, Boolean, Enum) - Flexible combination modes (AND/OR) for multiple filter conditions - Rich set of operators (eq, ne, contains, startsWith, endsWith, gt, gte, lt, lte, in, notIn) - Type-safe filtering with automatic operator suggestions based on property types - Bidirectional conversion between UI conditions and GraphQL filter objects - Validation rules and autocomplete suggestions for improved data integrity The PR also includes comprehensive Storybook documentation with multiple examples demonstrating different use cases and configurations. Additionally, updates the GraphQL transformer to be compatible with version 25.12.0 instead of 25.14.0. [FR-1370]: https://lablup.atlassian.net/browse/FR-1370?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
2dd2fae to
a2a70f9
Compare

Resolves #4143 (FR-1370)
Introduce BAIGraphQLPropertyFilter Component
This PR introduces a new
BAIGraphQLPropertyFiltercomponent that provides an advanced filtering interface for GraphQL-based Backend.AI applications. The component allows users to construct complex filter conditions that can be directly used in GraphQL queries.Key features:
The PR also includes comprehensive Storybook documentation with multiple examples demonstrating different use cases and configurations.
Additionally, updates the GraphQL transformer to be compatible with version 25.12.0 instead of 25.14.0.