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: Creation of a contact when selecting a linked contact #1018

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

Merkur39
Copy link
Member

@Merkur39 Merkur39 commented Nov 7, 2024

When we wanted to create a new contact from the linked contact addition,
the form component was rendered because the creation of the new contact triggers useQueries higher up the React tree.

This re-rendering caused the form to lose any changes it had already made, such as adding the new linked contact.

When we wanted to create a new contact from
the linked contact addition,
the form component was rendered because the
creation of the new contact triggers useQueries
higher up the React tree.

This re-rendering caused the form to lose any changes
it had already made, such as adding the new linked contact.
Copy link

bundlemon bot commented Nov 7, 2024

BundleMon

Files updated (2)
Status Path Size Limits
app/contacts.(hash).js
285.37KB (+145B +0.05%) -
intents/contacts.(hash).js
28.33KB (+116B +0.4%) -
Unchanged files (5)
Status Path Size Limits
vendors/contacts.(hash).js
926.52KB -
services/autoDefineLabels/contacts.js
305.52KB -
services/keepIndexFullNameAndDisplayNameUpToD
ate/contacts.js
305.46KB -
app-contacts.(hash).min.css
27.08KB -
img/icon.(hash).svg
454B -

Total files change +261B +0.01%

Groups updated (1)
Status Path Size Limits
**/*.js
1.81MB (+261B +0.01%) -
Unchanged groups (2)
Status Path Size Limits
**/*.css
83.72KB -
img/.
454B -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

contact: {}
}
expect(isSameContactProp(prevProps, nextProps)).toBe(false)
})
Copy link
Contributor

Choose a reason for hiding this comment

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

I do not understand why we check only related things. It is because the only rerender that annoy us are when we created a related contact ?

Copy link
Member Author

@Merkur39 Merkur39 Nov 7, 2024

Choose a reason for hiding this comment

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

Returns are only due to the creation or update of contacts.
This can only happen directly by adding a linked contact, when we are in the creation form.

@Merkur39 Merkur39 merged commit 362c60b into master Nov 7, 2024
2 checks passed
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.

2 participants