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

refactor(src-components): rename files to common naming style #1351

Merged

Conversation

lavanya-bmw
Copy link
Contributor

@lavanya-bmw lavanya-bmw commented Nov 19, 2024

Description

Renamed files in src/components folder to common naming style

Changelog:

- **src directory**
  - renamed files in src/components directory to common naming style [#1351](https://github.com/eclipse-tractusx/portal-frontend/pull/1351)

Why

All files in src/components should follow one naming style

Issue

#1238

Checklist

Please delete options that are not relevant.

  • I have followed the contributing guidelines
  • I have performed a self-review of my own code
  • I have successfully tested my changes locally

@lavanya-bmw lavanya-bmw marked this pull request as draft November 19, 2024 07:45
@lavanya-bmw lavanya-bmw marked this pull request as ready for review December 2, 2024 11:11
…into feat/1238/rename-files-in-src-components
Copy link
Contributor

@evegufy evegufy left a comment

Choose a reason for hiding this comment

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

@lavanya-bmw please resolve conflict
@manojava-gk @kunalgaurav-bmw please review

@evegufy evegufy added this to the Release 25.03 milestone Dec 4, 2024
@@ -96,14 +96,14 @@ const ConfirmaCancelOverlay = ({
<DialogHeader
title={t(
'content.admin.registration-requests.confirmCancelModal.title'
).replace('{companyName}', companyName ? companyName : '')}
).replace('{companyName}', companyName)}
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe the condition is to prevent crash issue. Kindly reverify once

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In line 86, we are checking for companyName availability, so the condition here is not required

/>
<DialogContent>
<div style={{ textAlign: 'center' }}>
<Typography variant="body1">
{t(
'content.admin.registration-requests.confirmCancelModal.description'
).replace('{companyName}', companyName ? companyName : '')}
).replace('{companyName}', companyName)}
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe the condition is to prevent crash issue. Kindly reverify once

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In line 86, we are checking for companyName availability, so the condition here is not required

@@ -228,7 +229,7 @@ export const RegistrationRequestsTableColumns = (
</span>
{row.applicationStatus === ApplicationRequestStatus.SUBMITTED &&
!row.bpn && (
<span
<Box
Copy link
Contributor

Choose a reason for hiding this comment

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

this pattern looks weird.

<div>
<span></span>
<Box></Box>
</div>

Pls refactor this container

import type { AppDetails } from 'features/apps/types'
import { PrivacyPolicyType } from 'features/adminBoard/adminBoardApiSlice'
import '../../AppDetail.scss'
import '../style.scss'
Copy link
Contributor

Choose a reason for hiding this comment

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

better to use only ./style.scss.
move css to respective file and remove the import statement

import './AppDetailTags.scss'
import '../../AppDetail.scss'
import './style.scss'
import '../style.scss'
Copy link
Contributor

Choose a reason for hiding this comment

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

better to use only ./style.scss.
move css to respective file and remove the import statement

@kunalgaurav-bmw
Copy link
Contributor

@lavanya-bmw sonarcloud flagged 3 issues can you check them once.

@lavanya-bmw
Copy link
Contributor Author

@lavanya-bmw sonarcloud flagged 3 issues can you check them once.

I will check with @oyo regarding these issues as I think they are not valid issues

…into feat/1238/rename-files-in-src-components
@evegufy
Copy link
Contributor

evegufy commented Dec 13, 2024

@isaadansari could you please review as well?

@evegufy evegufy changed the title fix(src-components): rename files to common naming style refactor(src-components): rename files to common naming style Dec 13, 2024
Copy link
Contributor

@kunalgaurav-bmw kunalgaurav-bmw left a comment

Choose a reason for hiding this comment

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

lgtm

…into feat/1238/rename-files-in-src-components
…into feat/1238/rename-files-in-src-components
@oyo oyo merged commit b7c5445 into eclipse-tractusx:main Jan 14, 2025
8 checks passed
@saadanzari
Copy link
Contributor

@evegufy sorry I missed your message,
the PR looks fine to me, however, in this PR, not only the renaming but other code changes are catered, which will require thorough testing after merge. Even though these changes are not much but would recommend a thorough testing as well.
I will test it now. thanks

@saadanzari
Copy link
Contributor

@lavanya-bmw if you are cleaning up the codebase, I have a few suggestions,

  • we need to make custom hooks for the most repeated functionality.
  • Have a JS likbrary for error handling
  • clean up on tooltips, we currently have 2 types
  • clean up on popups handling
  • move interfaces/types and enums into separate files within components.
  • break larger components into shorter and more relevant components

@evegufy
Copy link
Contributor

evegufy commented Jan 14, 2025

Hi @saadanzari great that you think of such suggestions. Could you please create issues of those suggestions? A comment on an already merged pull request won't get implemented.

@saadanzari
Copy link
Contributor

thanks for the feedback @evegufy I have created separate enhancement tickets for them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: USER READY
Development

Successfully merging this pull request may close these issues.

7 participants