Skip to content

Conversation

@WBroadwell
Copy link
Contributor

@WBroadwell WBroadwell commented Mar 13, 2025

Filter functionality for jobs

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Running front end and testing adding and removing the filters

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works (if a larger change)
  • New and existing unit tests pass locally with my changes

	modified:   package.json
	modified:   src/App.tsx
	renamed:    src/opportunities/components/FiltersField.js -> src/opportunities/components/FiltersField.tsx
	renamed:    src/opportunities/components/HorizontalIconButton.js -> src/opportunities/components/HorizontalIconButton.tsx
	renamed:    src/opportunities/components/Posts.js -> src/opportunities/components/Posts.tsx
	renamed:    src/opportunities/components/PostsField.js -> src/opportunities/components/PostsField.tsx
	renamed:    src/opportunities/components/SearchBar.js -> src/opportunities/components/SearchBar.tsx
	renamed:    src/opportunities/components/SmallTextButton.js -> src/opportunities/components/SmallTextButton.tsx
	renamed:    src/opportunities/pages/IndividualPost.js -> src/opportunities/pages/IndividualPost.tsx
	renamed:    src/opportunities/pages/Jobs.js -> src/opportunities/pages/Jobs.tsx
	modified:   src/opportunities/components/Posts.tsx
	modified:   src/opportunities/pages/Jobs.tsx
	modified:   src/opportunities/pages/Jobs.tsx
	modified:   src/opportunities/pages/Jobs.tsx
	modified:   src/opportunities/components/Posts.tsx
	modified:   src/opportunities/components/SearchBar.tsx
	modified:   src/opportunities/components/SmallTextButton.tsx
	modified:   src/style/general.css
	modified:   src/opportunities/components/Posts.tsx
	modified:   src/opportunities/components/Posts.tsx
Copy link
Member

@RafaelCenzano RafaelCenzano left a comment

Choose a reason for hiding this comment

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

Overall things look good, could you include a picture of the new UI? And can you fix the eslint issues on these files.

	modified:   src/opportunities/components/HorizontalIconButton.tsx
	modified:   src/opportunities/components/Posts.tsx
	modified:   src/opportunities/components/PostsField.tsx
	modified:   src/opportunities/components/SmallTextButton.tsx
	modified:   src/opportunities/pages/IndividualPost.tsx
	modified:   src/opportunities/pages/Jobs.tsx
@WBroadwell
Copy link
Contributor Author

image
lmk if you want the image somewhere in the documents, cancel leaves filters as is, search updates them based on choices and the clear button outside resets to initial list

eslint should be good now, saw proptypes being required for tsx files, u want me to swap the rest of the js components over to tsx and make the proptypes for them?

@RafaelCenzano
Copy link
Member

Yeah if possible any js files these use should tsx.

Is the filters missing the years? Could we also add a clear/reset to defaults button. And if possible adding defaults for the current semester and year.

Could you also add the majors?

@WBroadwell
Copy link
Contributor Author

I set the years up to fetch from backend, tested that it works if i enter the years as the initial but i figured i shouldn't leave that for the pr. I can add all that and work on converting the js to tsx, you want me to cancel the pr and add everything or merge then open fresh branch?

@WBroadwell
Copy link
Contributor Author

WBroadwell commented Mar 13, 2025

Also, ik u mentioned using the fetch years from the backend but i could use a react function to get the current year then subtract to get the others if thats easier/more error proof

@RafaelCenzano
Copy link
Member

I set the years up to fetch from backend, tested that it works if i enter the years as the initial but i figured i shouldn't leave that for the pr. I can add all that and work on converting the js to tsx, you want me to cancel the pr and add everything or merge then open fresh branch?

The lining is passing for now so that's good. If you want to make a separate pr to convert things to tsx that would be great. I've just been doing it as I've been updating pages.

	modified:   src/opportunities/components/Posts.tsx
	modified:   src/opportunities/pages/Jobs.tsx
@WBroadwell
Copy link
Contributor Author

image
new ui, filters title and buttons arent in the scroll. lmk if you want me to remove any of the majors since idk if some of them will have research or if we should just keep them all. ill start work on tsx tmr.

one other thing ab current semester, rn i have january-may as spring and june-august as summer. not sure if thats exactly right with dates or if its good enough, lmk if i should update it

@RafaelCenzano RafaelCenzano merged commit 1224827 into main Mar 13, 2025
4 checks passed
@RafaelCenzano RafaelCenzano deleted the Will-Frontend branch March 13, 2025 20:15
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