feat: manage columns in package list page#855
Draft
carlosthe19916 wants to merge 1 commit intoguacsec:mainfrom
Draft
feat: manage columns in package list page#855carlosthe19916 wants to merge 1 commit intoguacsec:mainfrom
carlosthe19916 wants to merge 1 commit intoguacsec:mainfrom
Conversation
Signed-off-by: Carlos Feria <2582866+carlosthe19916@users.noreply.github.com>
Contributor
Reviewer's GuideIntroduces configurable column visibility for the Package List table, wiring PatternFly's ColumnManagementModal into the toolbar and table controls so users can manage and persist which package columns are shown (e.g., hiding the often-empty path column). Sequence diagram for managing package list columnssequenceDiagram
actor User
participant PackageToolbar
participant ManageColumnsToolbar
participant ColumnManagementModal
participant TableControls
participant PackageTable
User->>PackageToolbar: load package list page
PackageToolbar->>TableControls: read columnState
PackageToolbar->>ManageColumnsToolbar: render with columns, defaultColumns, setColumns
PackageTable->>TableControls: getColumnVisibility(columnKey)
TableControls-->>PackageTable: visible/hidden flags
PackageTable->>PackageTable: render visible columns
User->>ManageColumnsToolbar: click columns button
ManageColumnsToolbar->>ManageColumnsToolbar: setIsOpen(true)
ManageColumnsToolbar->>ColumnManagementModal: open with appliedColumns
User->>ColumnManagementModal: toggle columns, click Apply
ColumnManagementModal-->>ManageColumnsToolbar: applyColumns(newUiColumns)
ManageColumnsToolbar->>ManageColumnsToolbar: onApplyColumns(newUiColumns)
ManageColumnsToolbar->>TableControls: setColumns(newTableColumns)
TableControls->>TableControls: persist column visibility
TableControls-->>PackageToolbar: updated columnState
TableControls-->>PackageTable: updated getColumnVisibility results
PackageTable->>PackageTable: re-render with new columns
Class diagram for configurable package list columnsclassDiagram
class PackageTable {
+ReactFC PackageTable()
-tableControls
+render()
}
class PackageToolbar {
+ReactFC PackageToolbar(props)
-tableControls
+render()
}
class ManageColumnsToolbar~TColumnKey~ {
+columns ColumnState~TColumnKey~[]
+defaultColumns ColumnState~TColumnKey~[]
+setColumns(newColumns ColumnState~TColumnKey~[]) void
-isOpen boolean
+onApplyColumns(newUiColumns ColumnManagementModalColumn[]) void
}
class ColumnState~TColumnKey~ {
+id TColumnKey
+label string
+isVisible boolean
+isIdentity boolean
}
class TableControls {
+getColumnVisibility(columnKey string) boolean
+columnStateColumns ColumnState~string~[]
+columnStateDefaultColumns ColumnState~string~[]
+columnStateSetColumns(newColumns ColumnState~string~[]) void
}
class PackageSearchProvider {
+initialColumns map~string, any~
}
class ColumnManagementModalColumn {
+key string
+title string
+isShown boolean
+isShownByDefault boolean
+isUntoggleable boolean
}
PackageTable --> TableControls : uses
PackageToolbar --> TableControls : uses
PackageToolbar *-- ManageColumnsToolbar : contains
ManageColumnsToolbar --> ColumnState : manages
ManageColumnsToolbar --> ColumnManagementModalColumn : maps to
TableControls o-- ColumnState : columnState
PackageSearchProvider --> TableControls : configures
PackageSearchProvider --> ColumnState : provides initialColumns
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #855 +/- ##
==========================================
+ Coverage 61.33% 62.34% +1.00%
==========================================
Files 172 173 +1
Lines 3122 3152 +30
Branches 710 728 +18
==========================================
+ Hits 1915 1965 +50
+ Misses 949 918 -31
- Partials 258 269 +11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR is just a proposal, it needs to be validated with UX and Engineers:
The Package List table contains a column
Pathand from a personal experience that columns is most of the time empty. It occupies space.This PR adds the ability to show/hide table columns based on the user preferences. The saved columns will survive even if the user leaves the page because we are using the browser storage.
We are also able to define defaults in regards which columns could be hidden from the beginning, the column
pathcould potentially be hidden as part of the default configuration.Screencast.From.2025-12-19.07-54-16.mp4
Summary by Sourcery
Add configurable column visibility to the package list table and expose a UI to manage visible columns.
New Features:
Enhancements:
Build: