-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Replace entityId by recordId in the front end. #6355
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Replaced all instances of entityId
with recordId
across the frontend codebase to standardize identifier terminology.
- Updated
CalendarEventDetails.tsx
andEventFieldDiffValue.tsx
to userecordId
inFieldContext.Provider
. - Modified
useFieldContext.tsx
to replaceentityId
withrecordId
in context and state management. - Commented out
objectFilterDropdownSelectedEntityIdState
references inuseFilterDropdown.ts
anduseFilterDropdownStates.ts
. - Updated test files like
useFilterDropdown.test.tsx
andusePersistField.test.tsx
to reflect the newrecordId
terminology. - Ensured consistency in hooks like
useClearField.ts
,useInitDraftValueV2.ts
, anduseIsFieldEmpty.ts
by replacingentityId
withrecordId
.
30 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Could you create a util
getRecordFieldInputId
that returns${recordId}-${fieldDefinition?.metadata?.fieldName}
from params. - Could you clean
recordId: recordId
=>recordId,
); | ||
}); | ||
}); | ||
// it('should set objectFilterDropdownSelectedEntityId', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok we should get rid of objectFilterDropdownSelectedEntityId
state, but we should rewrite this test for objectFilterDropdownSelectedRecordIdsState
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what should I in this case, keep test cases as it is and create a new issue to rewrite the tests?
What do u suggest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job !
|
In recordStoreFamilySelector({ recordId: recordId, fieldName }), To : recordStoreFamilySelector({ recordId, fieldName }), |
Got it, my bad should have cleaned in the first place. But will do and let you know. |
…l getRecordFieldInputId
Could u please review and let me know if there are more changes to be made. Thanks :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lucasbordeau is off this week so I will merge like this to avoid further conflicts. Great work thanks again!
Thanks @ehconitin for your contribution! |
Hey @lucasbordeau, I replaced every
entityId
withrecordId
in the frontend.Some clarifications:
At this line, I changed
recordId
toselectedRecordId
because that component hasentityId
defined in code at this line which was to be changed torecordId
. To avoid repeated constants, I changed the arguments toselectedRecordIds
.At the following links:
It seems to be the tests. As I can see, it is checking for both
objectFilterDropdownSelectedEntityIdState
andobjectFilterDropdownSelectedRecordIdsState
. SinceentityIds
are supposed to be removed andrecordedId
state is already being checked, I commented out all theentityidState
code. If they are to be removed or uncommented, please let me know, and I will do as expected.