Skip to content

Conversation

@clairep94
Copy link
Collaborator

@clairep94 clairep94 commented Oct 27, 2025

Context:

I was trying to record a demo of how I migrate files for the final presentation, and got a bit hyper-focused so I ended up migrating the majority of the client/modules/User folder

Contains changes from #3702, #3703, #3704

  • Should be reviewed after those for easier review

I have also manually tested these forms to make sure nothing broke

Changes:

client/modules/User pages & components related to the User api

  • Doesn't include stuff related to controller as it's not migrated yet

Notes:

Cherry-picked relevant commits from the giant rough-work PR here for easier review

Checks:

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123
  • meets the standards outlined in the accessibility guidelines

…useSyncFormTranslations to handle null formRef
…med export; update useSyncFormTranslations FormlikeType to take generic
@clairep94 clairep94 marked this pull request as ready for review October 27, 2025 11:39
@clairep94 clairep94 added the pr05 Grant Projects pr05 Grant Projects label Oct 27, 2025
@clairep94 clairep94 changed the title Pr05 finals client modules user Pr05 Typescript Migration #21: client/modules/User Oct 27, 2025
@clairep94
Copy link
Collaborator Author

@raclim @khanniie

Comment on lines +137 to +139
if (!user.cookieConsent) {
user.cookieConsent = CookieConsentOptions.NONE;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixes type-error flagged for in case user.cookieConsent is undefined

* If using a native button, specifies on an onClick action
*/
onClick?: () => void;
onClick?: (evt: React.MouseEvent<HTMLButtonElement>) => void;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

some callers want to pass a React.MouseEvent for evt.preventDefault

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I believe this isn't used anywhere anymore, it seems like a specific notification for a planned outage?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Also don't think this is used anywhere anymore

import { APIKeyForm } from '../components/APIKeyForm';
import Nav from '../../IDE/components/Header/Nav';
import ErrorModal from '../../IDE/components/ErrorModal';
import { hideErrorModal } from '../../IDE/actions/ide';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can't tell if this was deleted since I wrote the PR originally and now it looks in the diff like I'm adding it back? I don't recall adding this in myself

Copy link
Collaborator Author

@clairep94 clairep94 Dec 14, 2025

Choose a reason for hiding this comment

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

Ah ok I think I may have added this in to resolve a type-error that ErrorModal requires an closeModal prop, see here

Then I looked up where else usese ErrorModal and copied the implementation from IDEOverlays

Sorry was struggling to remember from October haha

Copy link
Member

Choose a reason for hiding this comment

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

oh no worries!! thanks for the explanation haha

Copy link
Member

@khanniie khanniie left a comment

Choose a reason for hiding this comment

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

thank you so much for the great work!!

@khanniie khanniie requested a review from raclim December 14, 2025 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr05 Grant Projects pr05 Grant Projects

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants