Skip to content

Conversation

@adamrefaey
Copy link
Collaborator

@adamrefaey adamrefaey commented May 1, 2025

Change

This pull request introduces several improvements across the frontend and backend codebases, focusing on enhancing code quality, consistency, and maintainability. Key changes include the addition of lint-staged for pre-commit hooks, updates to CSS styles for consistency, and formatting adjustments in React components. Below is a breakdown of the most important changes:

Pre-commit Hook Enhancements:

  • Updated .husky/pre-commit to include npx lint-staged for both frontend and backend directories, ensuring staged files are linted and formatted before committing.

Linting and Formatting:

  • Added lint-staged configurations in backend/package.json and frontend/package.json to automatically run Prettier and ESLint on staged files. [1] [2]

CSS and Styling Consistency:

  • Updated color codes in various SCSS files to use lowercase hex values for consistency (e.g., #ABBCCD#abbccd). Changes were made in SvgIcon.scss, TabNavigation.scss, ReportItem.scss, ReportsListPage.scss, and others. [1] [2] [3] [4] [5]
  • Adjusted font sizes, padding, and margins in ProcessingPage.scss to improve layout and readability. [1] [2]

React Component Formatting:

  • Reformatted JSX and TypeScript code for better readability and adherence to coding standards. Examples include SvgIcon.tsx, ConfirmationModal.tsx, ReportsListPage.tsx, and ActionButtons.tsx. [1] [2] [3] [4]

Code Simplification:

  • Removed unnecessary lastTriggeredTime logic in ProcessingPage.tsx to simplify the error handling and API request logic. [1] [2]

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 1, 2025 08:28
@adamrefaey adamrefaey self-assigned this May 1, 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 applies several UI fixes by streamlining JSX formatting and updating inline arrow functions and destructuring syntax to improve code readability and consistency.

  • Simplified JSX formatting in AiAssistantNotice.tsx, ActionButtons.tsx, ConfirmationModal.tsx, and SvgIcon.tsx.
  • Updated arrow function syntax and inline formatting in ReportsListPage.tsx and removed an unused debouncing variable in ProcessingPage.tsx.
  • Adjusted spacing in UploadModal.tsx and standardized test mocks in TabNavigation.test.tsx.

Reviewed Changes

Copilot reviewed 24 out of 34 changed files in this pull request and generated no comments.

Show a summary per file
File Description
frontend/src/pages/Reports/components/AiAssistantNotice.tsx Simplified JSX formatting for the assistant notice element.
frontend/src/pages/Reports/components/ActionButtons.tsx Consolidated prop destructuring in the functional component.
frontend/src/pages/Reports/ReportsListPage.tsx Updated arrow function formatting and minor inline improvements.
frontend/src/pages/Processing/ProcessingPage.tsx Removed the debouncing variable and related check, streamlining logic.
frontend/src/common/components/Upload/UploadModal.tsx Adjusted file details spacing for better readability.
frontend/src/common/components/Router/tests/TabNavigation.test.tsx Standardized mock declarations with trailing commas.
frontend/src/common/components/Modal/ConfirmationModal.tsx Cleaned up multiline JSX to a more concise format.
frontend/src/common/components/Icon/SvgIcon.tsx Optimized className composition using a single-line format.
Files not reviewed (10)
  • .husky/pre-commit: Language not supported
  • backend/package.json: Language not supported
  • frontend/package.json: Language not supported
  • frontend/src/common/components/Icon/SvgIcon.scss: Language not supported
  • frontend/src/common/components/Modal/ConfirmationModal.scss: Language not supported
  • frontend/src/common/components/Router/TabNavigation.scss: Language not supported
  • frontend/src/pages/Home/components/ReportItem/ReportItem.scss: Language not supported
  • frontend/src/pages/Processing/ProcessingPage.scss: Language not supported
  • frontend/src/pages/Reports/ReportsListPage.scss: Language not supported
  • frontend/src/pages/Reports/components/AiAssistantNotice.scss: Language not supported

@GuidoBR GuidoBR merged commit eb5d13d into main May 1, 2025
2 checks passed
@adamrefaey adamrefaey deleted the ADE-203 branch May 1, 2025 14:57
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