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

Increase Page Transition Speed #1520

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

SmitGala
Copy link
Contributor

No description provided.

Copy link

coderabbitai bot commented Jan 17, 2025

Walkthrough

The pull request introduces a comprehensive set of skeleton loader components across various sections of the application, including app monitoring, file comparison, organization settings, and SBOM (Software Bill of Materials). These new components provide enhanced loading states with structured, responsive layouts using AkStack and AkSkeleton elements. The changes include Handlebars templates, SCSS styles, and TypeScript components to create consistent and visually appealing loading experiences across different parts of the application.

Changes

File Path Change Summary
app/components/app-monitoring/details/skeleton-loader/ Added new skeleton loader component with Handlebars, SCSS, and TypeScript files for app monitoring details.
app/components/app-monitoring/skeleton-loader/ Added new skeleton loader component with Handlebars, SCSS, and TypeScript files for app monitoring.
app/components/file-compare/skeleton-loader/ Added new skeleton loader component with Handlebars, SCSS, and TypeScript files for file comparison.
app/components/organization/settings/skeleton-loader/ Added new skeleton loader component with Handlebars, SCSS, and TypeScript files for organization settings.
app/components/sbom/component-details/skeleton-loader/ Added new skeleton loader component with Handlebars, SCSS, and TypeScript files for component details in SBOM.
app/components/sbom/scan-details/skeleton-loader/ Added new skeleton loader component with Handlebars, SCSS, and TypeScript files for scan details in SBOM.
app/styles/_component-variables.scss Added new CSS custom properties for skeleton loader styling across components.
app/templates/authenticated/dashboard/*/loading.hbs Introduced loading templates for various dashboard sections with skeleton loader components.

Possibly related PRs

Suggested reviewers

  • future-pirate-king

Poem

🐰 Loading, loading, skeleton dance,
Pixels twirling in a rhythmic trance,
Stacks of skeletons, waiting to fill,
Placeholders spinning with digital skill,
Rabbit's loading magic, smooth and bright! 🌟


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 90db16d and b34dd7b.

📒 Files selected for processing (27)
  • app/components/app-monitoring/details/skeleton-loader/index.hbs (1 hunks)
  • app/components/app-monitoring/details/skeleton-loader/index.scss (1 hunks)
  • app/components/app-monitoring/details/skeleton-loader/index.ts (1 hunks)
  • app/components/app-monitoring/skeleton-loader/index.hbs (1 hunks)
  • app/components/app-monitoring/skeleton-loader/index.scss (1 hunks)
  • app/components/app-monitoring/skeleton-loader/index.ts (1 hunks)
  • app/components/file-compare/skeleton-loader/index.hbs (1 hunks)
  • app/components/file-compare/skeleton-loader/index.scss (1 hunks)
  • app/components/file-compare/skeleton-loader/index.ts (1 hunks)
  • app/components/organization/settings/skeleton-loader/index.hbs (1 hunks)
  • app/components/organization/settings/skeleton-loader/index.scss (1 hunks)
  • app/components/organization/settings/skeleton-loader/index.ts (1 hunks)
  • app/components/regulatory-preference-organization/index.hbs (1 hunks)
  • app/components/sbom/component-details/skeleton-loader/index.hbs (1 hunks)
  • app/components/sbom/component-details/skeleton-loader/index.scss (1 hunks)
  • app/components/sbom/component-details/skeleton-loader/index.ts (1 hunks)
  • app/components/sbom/scan-details/skeleton-loader/index.hbs (1 hunks)
  • app/components/sbom/scan-details/skeleton-loader/index.scss (1 hunks)
  • app/components/sbom/scan-details/skeleton-loader/index.ts (1 hunks)
  • app/styles/_component-variables.scss (5 hunks)
  • app/templates/authenticated/dashboard/app-monitoring/index-loading.hbs (1 hunks)
  • app/templates/authenticated/dashboard/app-monitoring/monitoring-details-loading.hbs (1 hunks)
  • app/templates/authenticated/dashboard/compare-loading.hbs (1 hunks)
  • app/templates/authenticated/dashboard/compare/untested-cases-loading.hbs (1 hunks)
  • app/templates/authenticated/dashboard/organization-settings/index-loading.hbs (1 hunks)
  • app/templates/authenticated/dashboard/sbom/component-details-loading.hbs (1 hunks)
  • app/templates/authenticated/dashboard/sbom/scan-details-loading.hbs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (27)
  • app/templates/authenticated/dashboard/compare-loading.hbs
  • app/templates/authenticated/dashboard/sbom/scan-details-loading.hbs
  • app/templates/authenticated/dashboard/organization-settings/index-loading.hbs
  • app/templates/authenticated/dashboard/sbom/component-details-loading.hbs
  • app/components/organization/settings/skeleton-loader/index.hbs
  • app/components/app-monitoring/details/skeleton-loader/index.ts
  • app/components/app-monitoring/skeleton-loader/index.ts
  • app/templates/authenticated/dashboard/app-monitoring/monitoring-details-loading.hbs
  • app/components/sbom/scan-details/skeleton-loader/index.scss
  • app/components/app-monitoring/skeleton-loader/index.scss
  • app/components/sbom/component-details/skeleton-loader/index.scss
  • app/components/app-monitoring/details/skeleton-loader/index.hbs
  • app/components/file-compare/skeleton-loader/index.ts
  • app/components/sbom/scan-details/skeleton-loader/index.ts
  • app/components/organization/settings/skeleton-loader/index.ts
  • app/components/regulatory-preference-organization/index.hbs
  • app/templates/authenticated/dashboard/app-monitoring/index-loading.hbs
  • app/components/sbom/component-details/skeleton-loader/index.ts
  • app/components/sbom/scan-details/skeleton-loader/index.hbs
  • app/components/file-compare/skeleton-loader/index.scss
  • app/components/app-monitoring/skeleton-loader/index.hbs
  • app/components/sbom/component-details/skeleton-loader/index.hbs
  • app/components/file-compare/skeleton-loader/index.hbs
  • app/templates/authenticated/dashboard/compare/untested-cases-loading.hbs
  • app/components/app-monitoring/details/skeleton-loader/index.scss
  • app/components/organization/settings/skeleton-loader/index.scss
  • app/styles/_component-variables.scss
⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: Run Integration Tests - Part 8
  • GitHub Check: Run Integration Tests - Part 7
  • GitHub Check: Run Integration Tests - Part 6
  • GitHub Check: Run Integration Tests - Part 5
  • GitHub Check: Run Integration Tests - Part 4
  • GitHub Check: Run Integration Tests - Part 3
  • GitHub Check: Run Integration Tests - Part 2
  • GitHub Check: Run Integration Tests - Part 1
  • GitHub Check: Run Linting
  • GitHub Check: Cloudflare Pages

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 docstrings to generate docstrings for this PR. (Beta)
  • @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.

@SmitGala SmitGala requested a review from Yibaebi January 17, 2025 05:59
@SmitGala SmitGala force-pushed the PD-1636-Increase-Page-Transition-Speed branch from f1218fa to 8648746 Compare January 17, 2025 06:02
Copy link

cloudflare-workers-and-pages bot commented Jan 17, 2025

Deploying irenestaging with  Cloudflare Pages  Cloudflare Pages

Latest commit: b34dd7b
Status: ✅  Deploy successful!
Preview URL: https://5f0d941e.irenestaging.pages.dev
Branch Preview URL: https://pd-1636-increase-page-transi.irenestaging.pages.dev

View logs

Copy link

@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.

Caution

Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments.

Actionable comments posted: 7

🧹 Nitpick comments (18)
app/templates/authenticated/dashboard/organization-settings/index-loading.hbs (1)

1-1: Consider adding error handling and fallback content.

While the skeleton loader implementation is clean, consider adding error handling and fallback content for scenarios where the loader fails to render.

+ {{#if this.hasError}}
+   <AkAlert @intent="danger">
+     {{t "errors.loading_failed"}}
+   </AkAlert>
+ {{else}}
    <Organization::Settings::SkeletonLoader />
+ {{/if}}
app/templates/authenticated/dashboard/compare/untested-cases-loading.hbs (1)

3-3: Improve i18n handling of loading text.

The loading text concatenation with "..." should be part of the translation string for better i18n support.

- <FileCompare::Loader @loadingText='{{t "loading"}}...' />
+ <FileCompare::Loader @loadingText={{t "loading_with_ellipsis"}} />

Add to your translations file:

// en.yml
loading_with_ellipsis: "loading..."
app/components/file-compare/skeleton-loader/index.ts (1)

1-3: Add JSDoc documentation for the component.

Consider adding JSDoc documentation to describe the component's purpose and usage.

+/**
+ * Skeleton loader component for file comparison view.
+ * Displays a loading state while file comparison data is being fetched.
+ */
 export default class FileCompareSkeletonLoaderComponent extends Component {}
app/components/app-monitoring/skeleton-loader/index.ts (1)

3-3: Consider adding interface for component arguments.

While the component is currently stateless, adding a type interface for potential future arguments would improve maintainability and type safety.

+interface AppMonitoringSkeletonLoaderArgs {}
-export default class AppMonitoringSkeletonLoaderComponent extends Component {}
+export default class AppMonitoringSkeletonLoaderComponent extends Component<AppMonitoringSkeletonLoaderArgs> {}
app/components/sbom/scan-details/skeleton-loader/index.ts (2)

3-3: Consider adding interface for component arguments.

Similar to other skeleton loaders, adding a type interface would improve maintainability and type safety.

+interface SbomScanDetailsSkeletonLoaderArgs {}
-export default class SbomScanDetailsSkeletonLoaderComponent extends Component {}
+export default class SbomScanDetailsSkeletonLoaderComponent extends Component<SbomScanDetailsSkeletonLoaderArgs> {}

1-9: Consider creating a base skeleton loader component.

There's significant code duplication across skeleton loader components. Consider creating a base component that these specific loaders can extend.

Example implementation:

// app/components/base/skeleton-loader.ts
import Component from '@glimmer/component';

export interface BaseSkeletonLoaderArgs {
  // Common props like animation type, colors, etc.
}

export default class BaseSkeletonLoaderComponent extends Component<BaseSkeletonLoaderArgs> {}

Then extend it in specific loaders:

import BaseSkeletonLoaderComponent, { BaseSkeletonLoaderArgs } from 'app/components/base/skeleton-loader';

interface SbomScanDetailsSkeletonLoaderArgs extends BaseSkeletonLoaderArgs {
  // Additional specific props
}

export default class SbomScanDetailsSkeletonLoaderComponent extends BaseSkeletonLoaderComponent<SbomScanDetailsSkeletonLoaderArgs> {}
app/components/sbom/component-details/skeleton-loader/index.ts (1)

1-9: Consider implementing a more robust skeleton loading system.

With multiple skeleton loaders following the same pattern, consider implementing a more comprehensive solution:

  1. Create a base skeleton loader component with common functionality
  2. Define a shared interface for skeleton loader configurations
  3. Consider using a factory pattern or decorator for registering skeleton loaders
  4. Implement common animation and styling utilities

This would improve maintainability, reduce duplication, and make it easier to add new skeleton loaders in the future.

Would you like me to provide a detailed implementation plan for this architectural improvement?

app/components/organization/settings/skeleton-loader/index.ts (1)

9-11: Consider adding type safety for the org property.

The implementation looks good! For additional type safety, consider adding a type guard or assertion for the org property.

  get isOwnerOrAdmin() {
-   return this.me.org?.get('is_owner') || this.me.org?.get('is_admin');
+   const org = this.me.org;
+   if (!org) return false;
+   return org.get('is_owner') || org.get('is_admin');
  }
app/components/sbom/component-details/skeleton-loader/index.hbs (2)

1-7: Add aria-label for better accessibility.

The skeleton loader should indicate its purpose to screen readers.

- <AkSkeleton @width='250px' @height='14px' class='mt-2 mb-4' />
+ <AkSkeleton @width='250px' @height='14px' class='mt-2 mb-4' aria-label='Loading component details' />

26-31: Consider extracting magic numbers into named constants.

The height and width values could be maintained in a constants file for better maintainability.

Consider creating a constants file:

// constants/skeleton-dimensions.ts
export const LOADING_VIEW = {
  SVG_HEIGHT: '200px',
  CONTAINER_HEIGHT: '350px'
};
app/components/app-monitoring/skeleton-loader/index.hbs (1)

39-39: Consider moving the loading text to a dedicated translations file.

The loading text template literal could be moved to a translations file for better maintainability.

- @loadingText='{{t "loading"}}...'
+ @loadingText={{t 'appMonitoring.loading'}}

Add to translations file:

# translations/en.yaml
appMonitoring:
  loading: 'Loading...'
app/components/file-compare/skeleton-loader/index.hbs (1)

1-1: Consider using responsive widths for skeleton elements.

Fixed-width skeletons (250px, 75px, etc.) might not adapt well to different screen sizes. Consider using relative units or percentage-based widths for better responsiveness.

-<AkSkeleton @width='250px' @height='16px' class='mt-2 mb-3' />
+<AkSkeleton @width='25%' @height='16px' class='mt-2 mb-3' />

-<AkSkeleton @width='75px' @height='16px' />
+<AkSkeleton @width='10%' @height='16px' />

-<AkSkeleton @width='200px' @height='16px' />
+<AkSkeleton @width='20%' @height='16px' />

Also applies to: 13-14, 44-46

app/components/regulatory-preference-organization/index.hbs (1)

11-18: Replace magic number with a meaningful constant.

The array iteration uses a magic number (0-4). Consider using a named constant or deriving the count from actual data structure.

-{{#each (array 0 1 2 3 4)}}
+{{#each (array 0 1 2 3 4) as |index|}}
  <AkStack @direction='row' @alignItems='center' data-test-skeleton-item={{index}}>
app/components/app-monitoring/details/skeleton-loader/index.hbs (2)

3-84: Consider flattening the component structure.

The deep nesting of AkStack components (4+ levels) might affect performance and maintainability. Consider breaking this into smaller, more manageable components.

Consider extracting sections into separate components:

  • AppMonitoring::Details::SkeletonLoader::Overview
  • AppMonitoring::Details::SkeletonLoader::MonitoringDetails

51-51: Standardize margin utilities.

Inconsistent use of margin classes (mr-2, ml-2). Consider using a consistent approach for spacing.

-<AkSkeleton @width='145px' @height='16px' class='mr-2' />
+<AkSkeleton @width='145px' @height='16px' class='me-2' />

-<AkSkeleton @width='145px' @height='16px' class='mr-2' />
+<AkSkeleton @width='145px' @height='16px' class='me-2' />

-<AkSkeleton @width='145px' @height='16px' class='mr-2' />
+<AkSkeleton @width='145px' @height='16px' class='me-2' />

Also applies to: 57-57, 71-71

app/components/organization/settings/skeleton-loader/index.hbs (2)

80-96: Extract repeated skeleton pattern into a component.

The skeleton pattern inside the each loop could be extracted into a reusable component to reduce duplication and improve maintainability.

Consider creating a new component Organization::Settings::SkeletonLoader::Row for the repeated pattern.


83-84: Standardize styling approach.

Mixed usage of Tailwind (w-4/12, w-8/12) and local classes. Consider standardizing the styling approach for better maintainability.

Choose either Tailwind or local classes consistently throughout the component.

Also applies to: 90-91

app/styles/_component-variables.scss (1)

707-720: Consider consolidating common skeleton loader variables.

The skeleton loader variables are duplicated across different components. Consider creating common base variables for shared properties:

+ // Base skeleton loader variables
+ --skeleton-loader-base-border-color: var(--border-color-1);
+ --skeleton-loader-base-border-radius: var(--border-radius);
+ --skeleton-loader-base-background: var(--background-main);

  // Component-specific overrides
- --appmonitoring-skeleton-loader-header-border-color: var(--neutral-white-100);
- --appmonitoring-skeleton-loader-header-border-radius: var(--border-radius);
+ --appmonitoring-skeleton-loader-header-border-color: var(--skeleton-loader-base-border-color);
+ --appmonitoring-skeleton-loader-header-border-radius: var(--skeleton-loader-base-border-radius);

This would:

  • Reduce duplication
  • Make it easier to maintain consistent styling
  • Allow for component-specific overrides when needed

Also applies to: 798-805, 849-856, 1949-1959

🛑 Comments failed to post (7)
app/components/sbom/scan-details/skeleton-loader/index.hbs (1)

1-35: 🛠️ Refactor suggestion

Consider creating a shared base skeleton loader component.

The structure is very similar to component-details/skeleton-loader. Consider extracting common patterns into a shared base component to reduce duplication and improve maintainability.

Example approach:

// components/sbom/shared/base-skeleton-loader/index.ts
interface BaseSkeletonLoaderArgs {
  headerWidth?: string;
  headerHeight?: string;
  contentConfig: Array<{
    width: string;
    height: string;
    className?: string;
  }>;
  loadingViewHeight?: string;
}

// Usage in both components:
<Sbom::Shared::BaseSkeletonLoader
  @headerWidth='250px'
  @headerHeight='14px'
  @contentConfig={{array
    (hash width='100px' height='20px')
    (hash width='250px' height='14px')
  }}
  @loadingViewHeight='350px'
/>
app/components/app-monitoring/skeleton-loader/index.hbs (1)

4-4: ⚠️ Potential issue

Fix typo in class names.

There's a typo in the class names: 'moitoring' should be 'monitoring'.

- local-class='header-app-moitoring-page'
+ local-class='header-app-monitoring-page'

- local-class='header-app-moitoring-page-title'
+ local-class='header-app-monitoring-page-title'

- local-class='header-app-moitoring-page-sorting-filter'
+ local-class='header-app-monitoring-page-sorting-filter'

Also applies to: 11-11, 30-30

app/components/file-compare/skeleton-loader/index.hbs (1)

67-67: 🛠️ Refactor suggestion

Add aria-live region for better accessibility.

The loading state should be announced to screen readers. Consider wrapping the loader in an aria-live region.

+<div role="status" aria-live="polite">
 <FileCompare::Loader @loadingText='{{t "loading"}}...' />
+</div>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

<div role="status" aria-live="polite">
<FileCompare::Loader @loadingText='{{t "loading"}}...' />
</div>
app/components/regulatory-preference-organization/index.hbs (1)

1-19: 🛠️ Refactor suggestion

Add aria-busy attribute for better accessibility.

The loading state should be properly communicated to screen readers.

+<div aria-busy="true" role="status">
 {{#if this.fetchOrganizationPreference.isRunning}}
   ...
 {{/if}}
+</div>

Committable suggestion skipped: line range outside the PR's diff.

app/components/organization/settings/skeleton-loader/index.hbs (1)

1-103: 🛠️ Refactor suggestion

Add loading indicator for screen readers.

The skeleton loader should properly communicate its loading state to screen readers.

+<div role="status" aria-busy="true" aria-label={{t "loading_organization_settings"}}>
 <div local-class='org-settings-container'>
   ...
 </div>
+</div>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

<div role="status" aria-busy="true" aria-label={{t "loading_organization_settings"}}>
  <div local-class='org-settings-container'>
    {{#if this.me.org.is_admin}}
      <AkSkeleton @width='175px' @height='20px' class='mb-2' />

      <AkStack @direction='column' @spacing='1'>
        <AkSkeleton @width='300px' @height='14px' />

        <AkSkeleton @width='400px' @height='12px' />
      </AkStack>

      <div class='mt-5'>
        {{#each (array 0 1 2 3 4)}}
          <AkStack @direction='row' @alignItems='center'>
            <AkSkeleton @width='18px' @height='18px' class='m-1' />

            <AkSkeleton @width='75px' @height='14px' />
          </AkStack>
        {{/each}}
      </div>

      <AkDivider class='my-3' @color='dark' />

      <AkSkeleton @width='175px' @height='20px' class='mb-2' />

      <AkStack @direction='column' @spacing='1'>
        <AkSkeleton @width='300px' @height='14px' />

        <AkStack @direction='column' @spacing='0.5'>
          <AkSkeleton @width='400px' @height='12px' />

          <AkSkeleton @width='400px' @height='12px' />
        </AkStack>
      </AkStack>

      <AkStack @spacing='1' class='my-4'>
        <AkSkeleton @width='35px' @height='16px' />

        <AkSkeleton @width='200px' @height='16px' />
      </AkStack>

      <AkSkeleton @width='450px' @height='50px' class='mb-2' />

      <AkDivider class='my-3' @color='dark' />
    {{/if}}

    <AkSkeleton @width='175px' @height='20px' class='mb-2' />

    <AkStack @direction='column' @spacing='1'>
      <AkSkeleton @width='300px' @height='14px' />

      <AkStack @direction='column' @spacing='0.5'>
        <AkSkeleton @width='400px' @height='12px' />

        <AkSkeleton @width='400px' @height='12px' />
      </AkStack>
    </AkStack>

    <div class='mt-4'>
      <div local-class='bordered-box'>
        <div class='p-2'>
          <AkStack @direction='column' @spacing='1'>
            <AkSkeleton @width='100px' @height='14px' />

            <AkSkeleton @width='300px' @height='12px' />
          </AkStack>
        </div>

        <AkDivider class='my-0' @color='dark' />

        <div class='m-3'>
          <AkStack @spacing='3'>
            <AkSkeleton @width='140px' @height='20px' />

            <AkSkeleton @width='140px' @height='20px' />
          </AkStack>
        </div>

        <div class='m-2'>
          <div local-class='bordered-box'>
            {{#each (array 0 1 2)}}
              <AkStack local-class='full-bordered-box-section'>
                <div
                  class='w-4/12'
                  local-class='full-bordered-box-section-column'
                >
                  <AkSkeleton @width='140px' @height='18px' />
                </div>

                <div
                  class='w-8/12'
                  local-class='full-bordered-box-section-column'
                >
                  <AkSkeleton @width='140px' @height='18px' />
                </div>
              </AkStack>
            {{/each}}
          </div>
        </div>
      </div>
    </div>

    <AkDivider class='my-3' @color='dark' />
  </div>
</div>
app/components/app-monitoring/skeleton-loader/index.scss (1)

1-9: ⚠️ Potential issue

Fix typos in class names.

The class names contain typos that should be corrected:

-.header-app-moitoring-page {
+.header-app-monitoring-page {
   border: 1px solid var(--appmonitoring-skeleton-loader-header-border-color);
   border-radius: var(--appmonitoring-skeleton-loader-header-border-radius);
   padding-top: 0.714em;

-  .header-app-moitoring-page-title {
+  .header-app-monitoring-page-title {
     padding: 1em 1.285em;
   }
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

.header-app-monitoring-page {
  border: 1px solid var(--appmonitoring-skeleton-loader-header-border-color);
  border-radius: var(--appmonitoring-skeleton-loader-header-border-radius);
  padding-top: 0.714em;

  .header-app-monitoring-page-title {
    padding: 1em 1.285em;
  }
}
app/components/app-monitoring/details/skeleton-loader/index.scss (1)

27-31: 🛠️ Refactor suggestion

Consider using responsive grid columns.

The current implementation uses fixed-width columns which may not be responsive:

 .monitoring-details-group {
   width: 100%;
   display: grid;
-  grid-template-columns: repeat(2, 400px);
+  grid-template-columns: repeat(2, 1fr);

This change will make the columns responsive, each taking up 50% of the container width.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

      .monitoring-details-group {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);

Copy link

@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: 1

🧹 Nitpick comments (1)
app/styles/_component-variables.scss (1)

707-710: Consider creating common skeleton loader variables.

Currently, each component has its own set of skeleton loader variables with similar properties. Consider creating common skeleton loader variables that can be reused across components to improve maintainability:

+ // Common skeleton loader variables
+ --skeleton-loader-border-radius: var(--border-radius);
+ --skeleton-loader-border-color: var(--border-color-1);
+ --skeleton-loader-background-color: var(--background-main);
+ --skeleton-loader-box-shadow: var(--box-shadow-6);

  // Component-specific overrides only when needed
  --appmonitoring-skeleton-loader-header-border-color: var(--skeleton-loader-border-color);
  --appmonitoring-skeleton-loader-header-border-radius: var(--skeleton-loader-border-radius);

This approach would:

  1. Reduce duplication
  2. Make it easier to maintain consistent styling
  3. Allow component-specific overrides when needed

Also applies to: 715-720, 798-805, 1319-1323, 1949-1959

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8648746 and 90db16d.

📒 Files selected for processing (27)
  • app/components/app-monitoring/details/skeleton-loader/index.hbs (1 hunks)
  • app/components/app-monitoring/details/skeleton-loader/index.scss (1 hunks)
  • app/components/app-monitoring/details/skeleton-loader/index.ts (1 hunks)
  • app/components/app-monitoring/skeleton-loader/index.hbs (1 hunks)
  • app/components/app-monitoring/skeleton-loader/index.scss (1 hunks)
  • app/components/app-monitoring/skeleton-loader/index.ts (1 hunks)
  • app/components/file-compare/skeleton-loader/index.hbs (1 hunks)
  • app/components/file-compare/skeleton-loader/index.scss (1 hunks)
  • app/components/file-compare/skeleton-loader/index.ts (1 hunks)
  • app/components/organization/settings/skeleton-loader/index.hbs (1 hunks)
  • app/components/organization/settings/skeleton-loader/index.scss (1 hunks)
  • app/components/organization/settings/skeleton-loader/index.ts (1 hunks)
  • app/components/regulatory-preference-organization/index.hbs (1 hunks)
  • app/components/sbom/component-details/skeleton-loader/index.hbs (1 hunks)
  • app/components/sbom/component-details/skeleton-loader/index.scss (1 hunks)
  • app/components/sbom/component-details/skeleton-loader/index.ts (1 hunks)
  • app/components/sbom/scan-details/skeleton-loader/index.hbs (1 hunks)
  • app/components/sbom/scan-details/skeleton-loader/index.scss (1 hunks)
  • app/components/sbom/scan-details/skeleton-loader/index.ts (1 hunks)
  • app/styles/_component-variables.scss (5 hunks)
  • app/templates/authenticated/dashboard/app-monitoring/index-loading.hbs (1 hunks)
  • app/templates/authenticated/dashboard/app-monitoring/monitoring-details-loading.hbs (1 hunks)
  • app/templates/authenticated/dashboard/compare-loading.hbs (1 hunks)
  • app/templates/authenticated/dashboard/compare/untested-cases-loading.hbs (1 hunks)
  • app/templates/authenticated/dashboard/organization-settings/index-loading.hbs (1 hunks)
  • app/templates/authenticated/dashboard/sbom/component-details-loading.hbs (1 hunks)
  • app/templates/authenticated/dashboard/sbom/scan-details-loading.hbs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (26)
  • app/templates/authenticated/dashboard/app-monitoring/monitoring-details-loading.hbs
  • app/templates/authenticated/dashboard/organization-settings/index-loading.hbs
  • app/components/sbom/scan-details/skeleton-loader/index.ts
  • app/templates/authenticated/dashboard/sbom/scan-details-loading.hbs
  • app/templates/authenticated/dashboard/compare-loading.hbs
  • app/components/sbom/scan-details/skeleton-loader/index.scss
  • app/components/sbom/component-details/skeleton-loader/index.scss
  • app/components/organization/settings/skeleton-loader/index.hbs
  • app/templates/authenticated/dashboard/sbom/component-details-loading.hbs
  • app/components/file-compare/skeleton-loader/index.ts
  • app/components/app-monitoring/skeleton-loader/index.ts
  • app/components/app-monitoring/details/skeleton-loader/index.ts
  • app/components/organization/settings/skeleton-loader/index.scss
  • app/components/sbom/component-details/skeleton-loader/index.ts
  • app/components/file-compare/skeleton-loader/index.scss
  • app/components/app-monitoring/details/skeleton-loader/index.hbs
  • app/templates/authenticated/dashboard/app-monitoring/index-loading.hbs
  • app/components/app-monitoring/skeleton-loader/index.hbs
  • app/components/app-monitoring/skeleton-loader/index.scss
  • app/components/file-compare/skeleton-loader/index.hbs
  • app/components/sbom/scan-details/skeleton-loader/index.hbs
  • app/templates/authenticated/dashboard/compare/untested-cases-loading.hbs
  • app/components/regulatory-preference-organization/index.hbs
  • app/components/organization/settings/skeleton-loader/index.ts
  • app/components/app-monitoring/details/skeleton-loader/index.scss
  • app/components/sbom/component-details/skeleton-loader/index.hbs
⏰ Context from checks skipped due to timeout of 90000ms (13)
  • GitHub Check: Run Integration Tests - Part 8
  • GitHub Check: Run Integration Tests - Part 7
  • GitHub Check: Run Integration Tests - Part 6
  • GitHub Check: Run Integration Tests - Part 5
  • GitHub Check: Run Integration Tests - Part 4
  • GitHub Check: Run Integration Tests - Part 3
  • GitHub Check: Run Integration Tests - Part 2
  • GitHub Check: Run Integration Tests - Part 1
  • GitHub Check: Run Acceptance Tests
  • GitHub Check: Run Unit Tests
  • GitHub Check: Run Linting
  • GitHub Check: Publish to Cloudflare Pages
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (3)
app/styles/_component-variables.scss (3)

707-710: LGTM! Well-structured appmonitoring skeleton loader variables.

The variables are properly organized, follow consistent naming conventions, and effectively reuse existing variables.

Also applies to: 715-720


1319-1323: LGTM! Well-structured file compare skeleton loader variables.

The variables are properly organized, follow consistent naming conventions, and effectively reuse existing variables.


1949-1959: LGTM! Well-structured organization settings skeleton loader variables.

The variables are properly organized, follow consistent naming conventions, and effectively reuse existing variables.

app/styles/_component-variables.scss Show resolved Hide resolved
@SmitGala SmitGala force-pushed the PD-1636-Increase-Page-Transition-Speed branch from 90db16d to b34dd7b Compare January 17, 2025 13:15
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.

3 participants