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

[Internal] Modular API's (in components) #177

Open
1 of 4 tasks
AbhiramTadepalli opened this issue Aug 31, 2024 · 6 comments
Open
1 of 4 tasks

[Internal] Modular API's (in components) #177

AbhiramTadepalli opened this issue Aug 31, 2024 · 6 comments
Assignees
Labels
Good First Issue Good for newcomers Type: Documentation Improvements or additions to documentation Type: Internal Chore tasks that are needed for other features

Comments

@AbhiramTadepalli
Copy link
Contributor

AbhiramTadepalli commented Aug 31, 2024

Overview of Proposed Changes

What: Ensure all API calls are occurring in their respective components
Why: Modularity, cleaner code

Details

  • Write/update documentation about how/which APIs are called in Trends
  • Identify API calls outside of components
  • Move outstanding stray API calls to inside components
  • Write documentation on how and where Trends is using the APIs
@AbhiramTadepalli AbhiramTadepalli added Good First Issue Good for newcomers Type: Documentation Improvements or additions to documentation Type: Internal Chore tasks that are needed for other features labels Aug 31, 2024
@AbhiramTadepalli AbhiramTadepalli changed the title [Internal] [Internal] Modular API's (in components) Aug 31, 2024
@Matrixk1ng
Copy link
Contributor

what do you mean by outstanding APIs. A little confused. I am going to use this to understand the code base

@Matrixk1ng
Copy link
Contributor

Matrixk1ng commented Sep 5, 2024

also when you say "respective components" do you mean, like the components folder? and not the API folder? or both?
And where do I write the Documentation

@AbhiramTadepalli
Copy link
Contributor Author

AbhiramTadepalli commented Sep 5, 2024

what do you mean by outstanding APIs.

API calls that are not inside a component/module (basically if index.tsx is just calling an API that would be better placed inside of a component)

I am going to use this to understand the code base

Sounds great! do you want me to assign you to it?

when you say "respective components" do you mean, like the components folder? and not the API folder? or both?

API's are called in the component files. We have the actual API functions in the /api folder, but they are called all throughout the code. (@TyHil if you want to add context?)

@TyHil
Copy link
Member

TyHil commented Sep 5, 2024

That's pretty much it. Just to say it another way: There's a professor API (which really just forwards an API call to the Nebula API with the right API key) that's called from the professorOverview component. If instead that API were called from the the dashboard/index.tsx file and the data was passed down to the professorOverview component that would be unnecessary.

I suppose it's important to note this PR could find that all the API calls are in the right places, as far down as they can be moved. Or not. Just good to check.

@Matrixk1ng
Copy link
Contributor

Matrixk1ng commented Sep 5, 2024

Also where to write the documentation? as small comments or confluence?

@AbhiramTadepalli
Copy link
Contributor Author

Confluence. Under Engineering. IMO should outline how and where we interact with APIs and how we use that data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Good for newcomers Type: Documentation Improvements or additions to documentation Type: Internal Chore tasks that are needed for other features
Projects
None yet
Development

No branches or pull requests

4 participants