convert announcements to typescript#2667
convert announcements to typescript#2667junjun107 wants to merge 4 commits into2577-convert-frontend-to-typescriptfrom
Conversation
71d4571 to
4aa8716
Compare
SAUMILDHANKAR
left a comment
There was a problem hiding this comment.
Thank you @junjun107 for so much top-quality work on this PR.
It is taking me sometime to finish this PR, I expect 2 more days to try out all the typescript code so wanted to share my timeline.
On a quick glance as a part-time PM, if we keep code changes to playwright and vite config files in a separate PR/issue, maybe that will be easier to track what happened where.
Also want to thank the authors at
https://git-scm.com/docs/git-diff)https://stackoverflow.com/questions/15436859/why-does-git-diff-show-no-output
https://www.atlassian.com/git/tutorials/inspecting-a-repository/git-diff
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork
https://git-scm.com/book/en/v2/Git-Tools-Revision-Selection%23_commit_ranges
https://www.freecodecamp.org/news/git-diff-command-explained/
https://www.digitalocean.com/community/cheatsheets/how-to-use-git-log-and-git-diff
https://swcarpentry.github.io/git-novice/05-history.html
https://gemini.google.com/
for helping me review this PR so far.
|
|
||
| const handleChangeRowsPerPage = (event) => { | ||
| const handleChangeRowsPerPage = ( | ||
| event: React.ChangeEvent<HTMLInputElement> |
There was a problem hiding this comment.
maybe nit picky:
event: React.ChangeEvent<HTMLInputElement | HTMLSelectElement>
or
event: React.ChangeEvent<HTMLSelectElement>
because pagination rows‑per‑page, which in Material UI is rendered as a select, If you try to use properties specific to input (like event.target.checked or event.target.type), TypeScript will allow it — but at runtime, those properties don’t exist on a select*
*Help from Copilot AI
Acknowledging a small contributor from that project because it is not obvious who wrote that page:
TomasHubelbauer
| } | ||
|
|
||
| type SortField = "created_at" | "severity" | "title" | "announcementId"; | ||
| type SortDirection = "asc" | "desc"; |
There was a problem hiding this comment.
Learning from Hannah #2562 (comment)
maybe we can move the two interfaces and two types to separate file for future clarity?
Stretch goal: :) we can have something like announcements extends formikvalues similar to how you did in service file.
No description provided.