Skip to content

Conversation

@MatiasArriola
Copy link
Contributor

📌 References

📝 Implementation

  • Dropdown: added loading? property, when true it disables the control and shows a loading spinner.
  • Add currentUser to AppContext: this allows to avoid re-fetching via API the user in each instance of the InstanceSelectionDropdown and InstanceSelectionStep. This re-fetch not only caused the additional /me request but also triggered other useEffects when the current user finished loading.
  • Add a loading state to InstanceSelectionStep and show a "Instances loading..." message instead of the MultiSelector
  • Add a loading state to InstanceSelectionDropdown and pass it to the Dropdown
  • Update styles for InstancesSelector component (from black border to material card-like)
  • ManualSyncPage: prevent unnecessary re-renders caused by updateSourceInstance callback updating because syncRule dependency object instance changed

TODO:

  • Review and fix unnecessary re-renders like the one fixed in ManualSyncPage (check wdyr logs)
    • GeneralInfoStep -> change name -> retriggers instances loading
  • Evaluate some form of caching for instances components, since instances.list() can be an expensive operation (maybe creating an InstancesContext and reusing it throughout all components is enough)
  • Test reusable components in all pages, i.e. InstanceSelectionDropdown
  • Create before/after comparisons

📹 Screenshots/Screen capture

InstancesSelector.webm
NewMetadataSyncRuleInstancesLoading.webm

🔥 Is there anything the reviewer should know to test it?

…and InstanceSelectionStep

perf: store currentUser in AppContext, reuse it later instead of refetching, which caused also a chain of effects with api calls
syncRule instance changed -> updateSourceInstance callback changed -> InstanceSelectionDropdown.onChangeSelected changed
@bundlemon
Copy link

bundlemon bot commented Oct 1, 2025

BundleMon

No change in files bundle size

Groups updated (1)
Status Path Size Limits
Build Folder
./**/*
1.76MB (-175.56KB -8.86%) +20%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

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.

1 participant