Skip to content

Conversation

@Marisa-Pinheiro
Copy link
Member

As per wha we discussed, I feel this would be the first step. Then I would create the sections inside the app folder (code duplication and making the containers folder redundant). Due to being more than one, for me it would make sense to allocate them a specific folder inside analysis. Is this correct?

After I would eliminate the redundancy. My question after our conversation is what would be considered the "feature": the router for the analysis that contains the page, or would it be at app level? From my point of view I would see the route itself as a representation of said feature, allocating it the necessary information.

@vercel
Copy link

vercel bot commented Feb 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
equity-ai ❌ Failed (Inspect) Feb 6, 2024 5:08pm

@marcusradell
Copy link

So, I can't really reply to the questions unless you give me clear enough examples.

Here's one folder structure that could work:

src/features/analysis/

This folder contains everything regarding the analysis feature, but you do need to hook up the app router with the AnalysisFeature component. That means that you would have a file src/analysis/page.tsx with the import import {AnalysisFeature} from "@/features";.

@marcusradell
Copy link

Regarding what subfolders you have in features/analysis, then don't worry about it. You can create a private mess that you can improve over time as long as you use barrel files and also keep most of the code private in the analysis feature.

A good starting point for the file structure in the analysis feature folder:

/index.ts
/styles.css
/analysis-feature.tsx
/types.ts (for shared types, not the single-use private types.)
/analysis-feature.test.tsx (if you want component tests.)

If you need multiple components and it starts to look messy, create a /components folder. Add styles per component to avoid huge css files where it's hard to delete styling. You can also include static resources, readme files, etc, in this folder.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 2, 2024

Quality Gate Passed Quality Gate passed for 'equity.salt'

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 2, 2024

Quality Gate Failed Quality Gate failed for 'turingcrafters_EquityAI'

Failed conditions

58.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@Marisa-Pinheiro
Copy link
Member Author

Hello @marcusradell! I've started the first phase by creating the feature analysis folder without deleting the previous structure.

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