Skip to content

Conversation

@adamrefaey
Copy link
Collaborator

@adamrefaey adamrefaey commented May 5, 2025

Change

This pull request includes updates to the TabNavigation component and its tests, as well as structural and functional changes to the ReportDetail page and its associated components. Key changes include fixing imports, improving mock setups for testing, and renaming files and directories for better organization. Additionally, there are minor functional adjustments and styling updates.

Updates to TabNavigation and Tests:

  • Fixed the import path for ReportDetailPage in TabNavigation to reflect the new directory structure (frontend/src/common/components/Router/TabNavigation.tsx).
  • Refactored mocks in TabNavigation.test.tsx to ensure vi.mock calls are properly hoisted and independent of shared variables. This includes updates to i18next and common/utils/i18n mocks (frontend/src/common/components/Router/__tests__/TabNavigation.test.tsx). [1] [2]

Structural Changes to ReportDetail:

  • Renamed the Reports directory and its contents to ReportDetail for better clarity and organization. This includes changes to file paths for components like AiAnalysisTab and InfoCard as well as the associated SCSS files. [1] [2] [3]

Functional Adjustments:

  • Removed the filtering logic for normalValues in AiAnalysisTab, leaving it as an empty array. This simplifies the logic but may require further review to ensure it aligns with the intended functionality (frontend/src/pages/ReportDetail/components/AiAnalysisTab.tsx).

Styling Updates:

  • Added a background image to the header of the ReportDetailPage for improved visual design (frontend/src/pages/ReportDetail/ReportDetailPage.scss).
  • Fixed a media query syntax issue in InfoCard.scss by changing @media (min-width: 768px) to @media (width >= 768px) (frontend/src/pages/ReportDetail/components/InfoCard.scss).

Does this PR introduce a breaking change?

{...}

What needs to be documented once your changes are merged?

{...}

Additional Comments

{...}

@adamrefaey adamrefaey requested review from GuidoBR and Copilot May 5, 2025 22:11
@adamrefaey adamrefaey self-assigned this May 5, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR moves the ReportDetailPage component and its sub-components to a new directory and updates all references accordingly.

  • Updated import path for ReportDetailPage in TabNavigation component
  • Reorganized i18n mock definitions in the TabNavigation tests to ensure mocks are defined before use

Reviewed Changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 1 comment.

File Description
frontend/src/common/components/Router/tests/TabNavigation.test.tsx Reordered and extended mocks for i18n and related modules to ensure proper hoisting and clarity
frontend/src/common/components/Router/TabNavigation.tsx Updated the ReportDetailPage import path to reflect the new directory structure
Files not reviewed (1)
  • frontend/src/pages/ReportDetail/components/InfoCard.scss: Language not supported

@adamrefaey adamrefaey changed the title move ReportDetailPage component and all its sub-components to a new directory [ADE-200] UI fixes May 5, 2025
@adamrefaey adamrefaey merged commit f443f6d into main May 5, 2025
1 check passed
@adamrefaey adamrefaey deleted the ADE-200-Adam branch May 5, 2025 22:53
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