Skip to content

fix: UI consistency and layout issues#185

Merged
kmendell merged 6 commits intomainfrom
fix/ui-090
May 14, 2025
Merged

fix: UI consistency and layout issues#185
kmendell merged 6 commits intomainfrom
fix/ui-090

Conversation

@kmendell
Copy link
Member

@kmendell kmendell commented May 14, 2025

Summary by CodeRabbit

  • New Features

    • Introduced a new maturity indicator component to visually display image maturity status with contextual tooltips.
    • Images and volumes tables now include dedicated columns for explicit usage status badges.
  • UI Improvements

    • Redesigned login page for improved layout, styling, and user experience.
    • Enhanced visual consistency across status badges for networks, volumes, and images.
    • Stack details page now features tabbed navigation between configuration and services.
    • Improved layout, spacing, and icons on container, network, stack, and volume detail pages.
    • Quick Actions and table buttons are restyled for better clarity and interaction feedback.
  • Bug Fixes

    • Usage status is now clearly and consistently displayed for images and volumes.
  • Chores

    • Removed unused props and imports related to registry credentials in the image pull dialog.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 14, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

This update introduces a new MaturityItem UI component for displaying image maturity status, expands and refactors the StatusBadge component, and applies significant UI and layout enhancements across various pages. Tables for images and volumes now have explicit status columns, and network, stack, and volume details pages use consistent badge and card layouts. The login page and quick actions UI are also visually improved. No changes are made to core logic or exported function signatures.

Changes

File(s) Change Summary
src/lib/components/badges/status-badge.svelte Refactored prop typing, expanded color variants, replaced reactive store with object mapping for styles, added support for class prop, and simplified class composition logic.
src/lib/components/maturity-item.svelte Introduced new MaturityItem component to visually represent image maturity status with icons and tooltips based on provided maturity data.
src/routes/+page.server.ts Enhanced image objects in the load function to include maturity status by invoking a maturity check per image, with error handling.
src/routes/+page.svelte Replaced quick action buttons with styled native buttons, updated status badge variants, added explicit "In Use"/"Unused" status column for images, and integrated MaturityItem in the images table.
src/routes/auth/login/+page.svelte Major visual redesign: new layout, logo, card styling, button variants, input icon placement, spinner animation, and added a GitHub footer link.
src/routes/containers/[id]/+page.svelte Enhanced tab list and logs section styling with additional classes for layout and consistent icon sizing.
src/routes/images/+page.svelte Replaced inline maturity indicator logic with the new MaturityItem component in the images table.
src/routes/images/pull-image-dialog.svelte Removed unused import and references to registry credentials, simplifying props and comments.
src/routes/networks/[networkId]/+page.svelte Replaced previous badge with StatusBadge, restructured header and detail cards, improved layout, and enhanced visual hierarchy and consistency.
src/routes/stacks/[stackId]/+page.svelte Introduced tabbed interface for stack details, reorganized header, improved summary and configuration cards, and enhanced services list with new empty state.
src/routes/volumes/+page.svelte Added explicit usage status column to the volumes table using StatusBadge, removed inline badge next to volume name, and disabled sorting for the new column.
src/routes/volumes/[volumeName]/+page.svelte Replaced previous badge with StatusBadge, restructured header and cards for volume details, labels, and options, and improved empty state and overall layout.

Possibly related PRs

  • ofkm/arcane#181: Implements the underlying image maturity checking logic, API, store, and UI integration for maturity indicators, which directly relates to the new MaturityItem component and maturity status display changes in this PR.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@kmendell kmendell marked this pull request as ready for review May 14, 2025 19:08
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
src/lib/components/maturity-item.svelte (1)

70-86: Consider adding aria-labels to improve accessibility

While the visual indicators are clear, adding aria-labels to the icons would improve accessibility for screen readers.

-				<span class="inline-flex items-center justify-center mr-2 opacity-30 size-4">
+				<span class="inline-flex items-center justify-center mr-2 opacity-30 size-4" aria-label="Maturity status not available">
src/routes/volumes/+page.svelte (1)

243-243: Consider adding an accessible header for the status column

Instead of using an empty space as the header text, consider using a more descriptive name like "Status" and applying CSS to hide it visually if needed. This would improve accessibility.

-						{ accessorKey: 'inUse', header: ' ', enableSorting: false },
+						{ accessorKey: 'inUse', header: 'Status', enableSorting: false },
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ae4cb20 and 6b56a7a.

📒 Files selected for processing (12)
  • src/lib/components/badges/status-badge.svelte (1 hunks)
  • src/lib/components/maturity-item.svelte (1 hunks)
  • src/routes/+page.server.ts (2 hunks)
  • src/routes/+page.svelte (4 hunks)
  • src/routes/auth/login/+page.svelte (4 hunks)
  • src/routes/containers/[id]/+page.svelte (3 hunks)
  • src/routes/images/+page.svelte (2 hunks)
  • src/routes/images/pull-image-dialog.svelte (1 hunks)
  • src/routes/networks/[networkId]/+page.svelte (7 hunks)
  • src/routes/stacks/[stackId]/+page.svelte (3 hunks)
  • src/routes/volumes/+page.svelte (2 hunks)
  • src/routes/volumes/[volumeName]/+page.svelte (7 hunks)
🔇 Additional comments (49)
src/lib/components/maturity-item.svelte (2)

1-17: Well-structured Props interface!

The Props interface clearly defines the expected structure for the maturity prop with proper TypeScript typing.


19-69: Good conditional rendering and visual hierarchy

The component effectively uses conditional rendering to display different icons based on maturity status with appropriate color coding (green for up-to-date, yellow for updates in progress, blue for available updates). The tooltip content is well-structured with a logical information hierarchy.

src/routes/images/pull-image-dialog.svelte (3)

25-25: Clean prop type definition

The onSubmit callback prop is clearly typed with all the parameters it should receive.


28-28: Improved code readability

Good job consolidating the props destructuring into a single line, which improves readability while maintaining all functionality.


33-33: ⚠️ Potential issue

Syntax error: missing leading dollar sign in front of state

The $state directive is missing a leading dollar sign which is required in Svelte components.

-	let selectedRegistryUrl = $state('');
+	let selectedRegistryUrl = $$state('');

Likely an incorrect or invalid review comment.

src/routes/volumes/+page.svelte (1)

262-264: Clean implementation of status badge column

Good job using the StatusBadge component with appropriate variant colors to clearly indicate the volume usage status. This creates a consistent UI pattern across the application.

src/routes/containers/[id]/+page.svelte (3)

274-281: Improved tab styling with visual feedback

The added border styling for active tabs provides better visual feedback to users about which tab is currently selected, improving the overall user experience.


658-658: More consistent icon sizing with size-4 utility class

Using the size-4 utility class instead of separate width and height classes is more maintainable and consistent with modern CSS practices.


667-667: Fixed height for better layout consistency

Changing from size-[500px] to h-[500px] for the logs container ensures consistent vertical sizing while allowing horizontal flexibility, which is more appropriate for a scrollable log viewer.

src/routes/images/+page.svelte (3)

23-23: Good addition of MaturityItem component.

Adding a dedicated component for displaying maturity status improves encapsulation and reusability across the application.


459-463: Improved UI consistency for image maturity display.

The refactored implementation replaces inline conditional rendering with the dedicated MaturityItem component, resulting in cleaner code and better UI consistency. This approach also makes future changes to maturity visualization easier to implement.


467-471: Enhanced clarity with dedicated status column.

Moving the usage status to its own column with consistent badges for "In Use" and "Unused" improves the table's scannability and aligns with UI patterns used elsewhere in the application.

src/routes/+page.server.ts (3)

4-4: Appropriate import of maturity service.

The updated import statement correctly includes the checkImageMaturity function needed for the enhanced UI functionality.


44-52: Well-implemented maturity check logic.

The maturity check is properly wrapped in a try-catch block to prevent failures from affecting the entire operation. The conditional check to only process images with valid repo and tag values is also a good optimization.


56-57: Clean data structure update.

Adding the maturity information to the returned object is done cleanly, ensuring backward compatibility while adding the new field.

src/routes/+page.svelte (3)

23-23: Good implementation of shared component.

Importing the MaturityItem component ensures UI consistency between the dashboard and images page.


248-293: Excellent Quick Actions UI improvement.

The refactored Quick Actions section has significantly improved visual hierarchy and user experience:

  1. The new card-like buttons with consistent styling enhance the UI's consistency
  2. Colored circular backgrounds for icons improve visual distinction
  3. Adding StatusBadge components for counts provides better information hierarchy
  4. Consistent hover and disabled states improve user feedback

This change aligns perfectly with the PR objectives for UI consistency.


385-421: Enhanced table layout with dedicated status column.

Adding a dedicated column for usage status in the images table mirrors the implementation in the images page, maintaining UI consistency throughout the application. The proper integration of the MaturityItem component alongside the repository link also improves the information hierarchy.

src/lib/components/badges/status-badge.svelte (4)

4-4: Excellent extension of color variants.

Expanding the variant types from 6 to 17 color options gives the application much more flexibility in status representation, enabling more nuanced visual distinctions between different states.


6-16: Good modernization of component props handling.

The refactoring to use $props with inline destructuring and explicit typing is a modern approach that improves readability and type safety.


19-37: Streamlined variant styling implementation.

Replacing the previous reactive store with a simple object mapping of variant names to Tailwind classes simplifies the code and improves maintainability. The consistent formatting of class strings also makes future styling adjustments easier.


40-42: Enhanced component flexibility.

Using the cn utility function to combine base styles with variant-specific styles and custom classes, along with spreading additional props, makes the component much more flexible and customizable.

src/routes/volumes/[volumeName]/+page.svelte (8)

11-11: Good addition of StatusBadge component

The addition of the StatusBadge component helps standardize the status display across the application.


38-76: Well-structured header with improved visual hierarchy

The header layout is significantly improved with:

  • Proper breadcrumb navigation
  • Clear title styling
  • Organized status badges in a horizontal row

This enhances usability and provides better context for users.


78-87: Clean action button layout with proper loading state

The action button section is well-organized with:

  • Clear button styling
  • Appropriate loading indicator
  • Consistent placement in the header

This makes the controls more accessible and visible.


119-204: Excellent volume details card design

The volume details card has been greatly improved with:

  • Clear section headings with descriptive icons
  • Consistent grid layout for information
  • Proper spacing and visual separation
  • Well-organized metadata display

These changes make the information much more scannable and user-friendly.


174-189: Good addition of explicit status indicators

Adding a dedicated status section with appropriate badges improves clarity and makes the volume's current state immediately visible to users.


207-260: Well-designed metadata sections for labels and driver options

The labels and driver options sections are now consistently styled with:

  • Clear headings with appropriate icons
  • Proper visual hierarchy
  • Responsive layouts that adapt to different screen sizes
  • Good use of background colors for readability

This makes complex metadata much easier to read and understand.


261-273: Good empty state handling

Adding a fallback card for when no labels or options exist improves the user experience by clearly communicating the absence of data rather than showing nothing.


276-286: Improved "Not Found" state design

The "Volume Not Found" message has been enhanced with:

  • Centered layout
  • Appropriate icon
  • Clear heading and description
  • Action button to navigate back

This provides a much better user experience when a resource can't be found.

src/routes/stacks/[stackId]/+page.svelte (5)

50-50: Good addition of tab state management

Adding a reactive state variable for managing tabs is a clean approach for implementing the tabbed interface.


144-187: Well-organized header section with improved badge placement

The header section is nicely structured with:

  • Clear breadcrumb navigation
  • Prominent display of the stack name
  • Well-organized port badges for quick access
  • Status badges with consistent styling

This improves information hierarchy and usability.


189-204: Clean action buttons layout

The action buttons are properly positioned and styled, with good spacing and alignment.


262-397: Excellent tabbed interface implementation

The tabbed interface is well-implemented with:

  • Clear visual indicators for the active tab
  • Consistent styling across tabs
  • Smooth layout transitions between sections
  • Proper organization of related content

The configuration tab has a clean layout with the save button appropriately positioned, and the services tab presents each service in a consistent, scannable format. This significantly improves the user experience by reducing cognitive load.


400-411: Improved "Not Found" state design

The "Stack Not Found" message has been enhanced with better styling, clear information, and an appropriate action button, providing a better user experience when resources can't be found.

src/routes/auth/login/+page.svelte (7)

36-45: Excellent login page layout improvement

The login page layout has been significantly enhanced with:

  • Full-height centered container
  • Prominent logo display
  • Clear heading and subtitle
  • Better overall spacing and alignment

These changes create a more professional and focused login experience.


48-82: Well-designed login card with improved error handling

The login card has been enhanced with:

  • Proper styling with rounded corners and shadow
  • Clear error message presentation
  • Consistent spacing
  • Better visual hierarchy

This improves both the appearance and usability of the login interface.


92-100: Good conditional OIDC button styling

The OIDC login button is now conditionally styled based on whether it's the only login option, with appropriate sizing and prominence.


123-144: Improved input fields with icon prefixes

The username and password fields now include appropriate icons, improving visual cues and making the form more intuitive.


148-155: Enhanced submit button with better loading indicator

The sign-in button has been improved with:

  • Better size and prominence
  • Improved loading state indication
  • Consistent styling with other buttons

These changes make the form submission more intuitive.


158-176: Well-designed method separator and alternative login option

The divider between login methods and the alternative OIDC button are well-designed and only appear when both methods are available, improving UI clarity.


180-183: Good addition of footer link

Adding a footer with a GitHub link provides users with a way to access more information about the project.

src/routes/networks/[networkId]/+page.svelte (7)

38-79: Well-structured header with improved badge organization

The header section has been significantly improved with:

  • Clear breadcrumb navigation
  • Better title presentation
  • Organized status badges that clearly indicate network status
  • Proper spacing and alignment

This creates a more intuitive and informative header.


81-91: Clean action button implementation

The removal button is well-designed with:

  • Appropriate destructive styling
  • Clear loading state
  • Good positioning
  • Disabled state for predefined networks

This improves usability while preventing accidental removal of system networks.


124-229: Excellent network details card layout

The network details card has been redesigned with:

  • Descriptive headers with icons
  • Consistent grid layout
  • Clear visual hierarchy
  • Good use of StatusBadge components for boolean values

These changes make the information much more scannable and user-friendly.


232-312: Well-organized IPAM configuration display

The IPAM configuration section has been significantly improved with:

  • Better card styling with descriptive headers
  • Clear layout of IP information
  • Responsive design for different screen sizes
  • Good visual separation between different config items

This makes complex network configuration data much easier to understand.


314-346: Improved connected containers section

The connected containers section now has:

  • Better styling with clear headers
  • Links to container details
  • Improved presentation of IP addresses
  • Consistent list styling

This makes container relationships clearer and more navigable.


348-400: Well-designed labels and options sections

The labels and options cards have consistent styling and layout that:

  • Clearly separate keys and values
  • Provide good visual hierarchy
  • Use appropriate typography for different content types
  • Maintain responsive layouts for different screen sizes

This significantly improves readability of metadata.


403-413: Improved "Not Found" state design

The "Network Not Found" message has been enhanced with centered layout, appropriate icon, clear heading and description, providing a much better user experience when a resource can't be found.

@kmendell kmendell merged commit 1b85225 into main May 14, 2025
5 checks passed
@kmendell kmendell deleted the fix/ui-090 branch May 14, 2025 19:19
@coderabbitai coderabbitai bot mentioned this pull request Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant