Skip to content
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

Add different view modes for resource lists #118

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open

Add different view modes for resource lists #118

wants to merge 23 commits into from

Conversation

jrauh01
Copy link
Collaborator

@jrauh01 jrauh01 commented Jan 3, 2025

This PR introduces new view modes for resource lists to enhance the user experience, following the approach used in icingadb-web. The implemantation includes three view modes:

  • minimal: display the most essential information in one line
  • common: like minimal, but additionally has a footer with further information
  • detailed: like common, but the information is spreaded over three lines

If a resource does not provide sufficient information for a more detailed view, the corresponding options in the view mode switcher will not be available.

@jrauh01 jrauh01 self-assigned this Jan 3, 2025
@cla-bot cla-bot bot added the cla/signed CLA is signed by all contributors of a PR label Jan 3, 2025
@jrauh01 jrauh01 requested a review from lippserd January 8, 2025 08:09
@lippserd lippserd requested a review from jhoxhaa January 13, 2025 07:18
Copy link
Collaborator

@jhoxhaa jhoxhaa left a comment

Choose a reason for hiding this comment

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

Could you please clarify a few things:

What are the main changes introduced in this PR?
Is there anything specific you'd like me to review or pay extra attention to?

@jrauh01
Copy link
Collaborator Author

jrauh01 commented Jan 13, 2025

I've updated the PR description to show the main changes. I think there's nothing specific that requires extra attention.

Copy link
Collaborator

@jhoxhaa jhoxhaa left a comment

Choose a reason for hiding this comment

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

Please use only one class instead of three (*ListItem, *ListItemMinimal, *ListItemDetailed) to handle the different levels of detail for displaying resource information.

Also use the ViewMode trait in the BaseItemList.php and BaseItemList.php instead of using it in all the other List classes.

library/Kubernetes/Web/PodListItem.php Show resolved Hide resolved
@jrauh01
Copy link
Collaborator Author

jrauh01 commented Jan 14, 2025

I placed the constants in ViewModeSwitcher instead, because I think they fit better there.

application/controllers/DaemonsetController.php Outdated Show resolved Hide resolved
library/Kubernetes/Common/ViewMode.php Outdated Show resolved Hide resolved
library/Kubernetes/Web/CronJobListItem.php Outdated Show resolved Hide resolved
library/Kubernetes/Web/CronJobListItem.php Outdated Show resolved Hide resolved
library/Kubernetes/Web/Factory.php Outdated Show resolved Hide resolved
library/Kubernetes/Web/NamespaceListItem.php Outdated Show resolved Hide resolved
library/Kubernetes/Web/NamespaceListItem.php Outdated Show resolved Hide resolved
library/Kubernetes/Web/ViewModeSwitcher.php Outdated Show resolved Hide resolved
library/Kubernetes/Web/ViewModeSwitcher.php Outdated Show resolved Hide resolved
@jrauh01 jrauh01 requested a review from jhoxhaa January 16, 2025 08:56
@jrauh01 jrauh01 requested a review from jhoxhaa January 16, 2025 10:37
library/Kubernetes/Common/ViewMode.php Outdated Show resolved Hide resolved
@jrauh01 jrauh01 requested a review from jhoxhaa January 16, 2025 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla/signed CLA is signed by all contributors of a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants