Secret-Hitler-Online icon indicating copy to clipboard operation
Secret-Hitler-Online copied to clipboard

Convert project to TypeScript

Open ShrimpCryptid opened this issue 10 months ago • 2 comments

In the process of converting core elements of the frontend from JavaScript to TypeScript to make future development easier.

TODOs:

  • [ ] Add a warning note on the front page about the new changes, requesting that players be vigilant for bugs
  • ~~[ ] Delete the Twitter buttons and elements; they don't work on certain browsers, like Brave~~ moved to #136

Known bugs:

  • [x] Player roles are not shown on victory screen for liberal players
  • [ ] In developer mode, hot reload will cause the websocket connection to stay open in the background, blocking logins and causing other strange behavior.
  • [x] PlayerDisplay does not show roles during final victory screen.
    • [ ] ~~PlayerDisplay now shows all roles too early~~ #140
  • [x] During victory sequence, the last action (execution/voting) should be shown for more suspense! (not a bug introduced here but a general sentiment)
  • [x] PlayerDisplay shows all roles for fascist players. (maybe ok?)
  • [x] Initial Role display shows incorrect card for Liberals

ShrimpCryptid avatar Apr 13 '24 23:04 ShrimpCryptid

  • [ ] Mystery black screen (after voting, goes away when Policy enacted popup appears.)
    • [ ] Can also appear for initial load screen. Low chance to happen anytime an alert is shown?
  • [x] Everyone is host except for the actual host
  • [ ] ~~Occasional disconnects >:(~~ #138
  • [ ] ~~If player has icon selection open, the game is started, and they are the president, they will be unable to make any actions without refreshing the page.~~ #139

image

Notes:

  • Disconnects may be caused by a race condition (multiple websockets trying to open at once; see how the number of failed connections is the same for like. 5 websocket connection attempts). The websocket onClose will still execute even if the current websocket is active.

ShrimpCryptid avatar Apr 14 '24 05:04 ShrimpCryptid

Note: This needs a defined scope. Maybe refactoring App.tsx is a good final goal?

ShrimpCryptid avatar Apr 17 '24 06:04 ShrimpCryptid