Repository navigation
[Customer portal] [web] : Refactor Cases Table Filters, Improve Project Metadata UI, and Update Security Report Analysis Flow #320
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
Merged
shayanmalinda
merged 12 commits into
wso2-open-operations:customer-portal-milestone-1
from
dileepapeiris:feat/apply-ui-suggestions-v2
Mar 10, 2026
Merged
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
32850eb
Refactor filters UI to inline CasesFilters
dileepapeiris 9fe93a4
Update CasesTableHeader tests for filter toggle
dileepapeiris 7f6fd81
Add CasesFilters select filter component
dileepapeiris 3166320
Remove 'Closed' action for SOLUTION_PROPOSED cases
dileepapeiris 7fc1f49
Refactor CasesTableHeader filter UI and create flow
dileepapeiris 72356d8
Add tooltips and responsive layout to metadata
dileepapeiris 5cd0ff8
Refactor ProductVulnerabilities header UI
dileepapeiris 1f356bc
Add ProductVulnerabilitiesFilters component
dileepapeiris 5e7eee8
Replace filter popover with inline filters
dileepapeiris 4aa7645
Improve filter handling and UI constants
dileepapeiris 148e4ab
Switch to security-report route; require toggle
dileepapeiris 8718796
Update routing, UI chips, typings, and filters
dileepapeiris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
92 changes: 92 additions & 0 deletions
92
apps/customer-portal/webapp/src/components/dashboard/cases-table/CasesFilters.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| // Copyright (c) 2026 WSO2 LLC. (https://www.wso2.com). | ||
| // | ||
| // WSO2 LLC. licenses this file to you under the Apache License, | ||
| // Version 2.0 (the "License"); you may not use this file except | ||
| // in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, | ||
| // software distributed under the License is distributed on an | ||
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| // KIND, either express or implied. See the License for the | ||
| // specific language governing permissions and limitations | ||
| // under the License. | ||
|
|
||
| import { | ||
| FormControl, | ||
| Grid, | ||
| InputLabel, | ||
| MenuItem, | ||
| Select, | ||
| Typography, | ||
| } from "@wso2/oxygen-ui"; | ||
| import type { JSX } from "react"; | ||
| import type { SelectChangeEvent } from "@wso2/oxygen-ui"; | ||
| import type { FilterField } from "@components/common/filter-panel/FilterPopover"; | ||
|
|
||
| /** | ||
| * Select-specific FilterField that ensures only select-type fields are passed. | ||
| */ | ||
| type SelectFilterField = FilterField & { type: "select" }; | ||
|
|
||
| export interface CasesFiltersProps { | ||
| filters: Record<string, string | number>; | ||
| filterFields: SelectFilterField[]; | ||
| onFilterChange: (field: string, value: string | number) => void; | ||
| } | ||
|
|
||
| /** | ||
| * CasesFilters component to display filter dropdowns. | ||
| * | ||
| * @param {CasesFiltersProps} props - Filter values, metadata, and change handler. | ||
| * @returns {JSX.Element} The rendered filter dropdowns. | ||
| */ | ||
| export default function CasesFilters({ | ||
| filters, | ||
| filterFields, | ||
| onFilterChange, | ||
| }: CasesFiltersProps): JSX.Element { | ||
| const handleSelectChange = | ||
| (field: string) => (event: SelectChangeEvent<string | number>) => { | ||
| const val = event.target.value; | ||
| onFilterChange(field, val); | ||
| }; | ||
|
|
||
| return ( | ||
| <Grid container spacing={2} sx={{ mt: 1 }}> | ||
| {filterFields.map((field) => { | ||
| const options = field.options || []; | ||
|
|
||
| return ( | ||
| <Grid key={field.id} size={{ xs: 12, sm: 6, md: 2.4 }}> | ||
| <FormControl fullWidth size="small"> | ||
| <InputLabel id={`${field.id}-label`}>{field.label}</InputLabel> | ||
| <Select | ||
| labelId={`${field.id}-label`} | ||
| id={field.id} | ||
| value={filters[field.id] || ""} | ||
| label={field.label} | ||
| onChange={handleSelectChange(field.id)} | ||
| > | ||
| <MenuItem value=""> | ||
| <Typography variant="body2">All {field.label}</Typography> | ||
| </MenuItem> | ||
| {options.map((option) => { | ||
| const label = typeof option === "string" ? option : option.label; | ||
| const value = typeof option === "string" ? option : option.value; | ||
| return ( | ||
| <MenuItem key={value} value={value}> | ||
| <Typography variant="body2">{label}</Typography> | ||
| </MenuItem> | ||
| ); | ||
| })} | ||
| </Select> | ||
| </FormControl> | ||
| </Grid> | ||
| ); | ||
| })} | ||
| </Grid> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.