Skip to content
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

Fix create task #7498

Merged
merged 1 commit into from
Oct 8, 2024
Merged

Fix create task #7498

merged 1 commit into from
Oct 8, 2024

Conversation

ijreilly
Copy link
Collaborator

@ijreilly ijreilly commented Oct 8, 2024

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This pull request addresses an issue with creating tasks introduced by a previous PR, focusing on improving loading states and error handling in the record creation process. Here are the key changes:

  • Modified useOpenCreateActivityDrawer to set loading state before opening the right drawer, enhancing user experience
  • Improved error handling and loading state management in RightDrawerRecord component for undefined object names and record IDs
  • Simplified RecordShowContainer by replacing isNewViewableRecordLoadingState with a new prop isNewRightDrawerItemLoading
  • Enhanced value handling in useRecordShowPage hook for better management of undefined or falsy values
  • Conditional rendering of RecordValueSetterEffect based on loading state in RightDrawerRecord

These changes collectively aim to fix the task creation issue and improve the overall robustness of the record creation and loading process.

4 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings

<RecordValueSetterEffect recordId={objectRecordId} />
{!isNewViewableRecordLoading && (
<RecordValueSetterEffect recordId={objectRecordId} />
)}
<RecordShowContainer
objectNameSingular={objectNameSingular}
objectRecordId={objectRecordId}
loading={false}
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: The loading prop is set to false, but isNewRightDrawerItemLoading is used. Ensure this doesn't cause inconsistent loading states

@lucasbordeau
Copy link
Contributor

LGTM

@thomtrp thomtrp merged commit be171e8 into main Oct 8, 2024
13 checks passed
@thomtrp thomtrp deleted the fix-create-task branch October 8, 2024 14:20
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