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

Optimize Recently View Jobs Page #109

Open
noahgiboney opened this issue Feb 6, 2025 · 0 comments
Open

Optimize Recently View Jobs Page #109

noahgiboney opened this issue Feb 6, 2025 · 0 comments
Assignees
Labels
frontend Frontend issue medium this issue should take about 1 week

Comments

@noahgiboney
Copy link
Collaborator

Description
Right now on the Recently Views tab, the API Is called every time a user switched tabs, this will be taxing on the API. We can optimize this by calling the API once when the user first switches tabs then doing everything locally from there.

Another thing that is happening is that when the recently viewed are loading, the loading indicator is not displayed. The steps section has the fix on this.

It would also be nice to have a way to clear local storage via a button, that will wipe local storage of the jobIDS and also clear the array locally. For this button make sure to use the same style from the figma.

Acceptance Criteria
Recently Viewed Tab is optimized, where the API is only running once, and then all jobs are inserted locally. Follow the steps to ensure all bases are covered. Button is implemented in a nice spot on the page.

Steps:

  • The API call to get the recent jobs should only get called once when the user first clicks on the recently viewed tab. After this, all modifications to the local storage must also add the job to the array that displays the recent jobs. In order to add the jobs to the recent jobs array, we need to pass a setter function (function that adds a job to recent jobs) all the way down to the Job Card component. This setter function can be optional in the JobGrid, as some callers wont need it. This was the cleanest solution I thought of, feel free to investigate other/ your own idea for how to do this in a clean way.
  • Update the recent jobs to have a default value of null so the loader display while the API is running.
  • Implement a button to wipe local storage and jobs array. For this button, use a confirmation modal, the same one that the sign out is using in the nav bar.
@noahgiboney noahgiboney added frontend Frontend issue medium this issue should take about 1 week labels Feb 6, 2025
@noahgiboney noahgiboney changed the title Optimize Recently View Jobs Optimize Recently View Jobs Page Feb 6, 2025
@markmcguire011 markmcguire011 self-assigned this Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Frontend issue medium this issue should take about 1 week
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants