Skip to content

Conversation

@Kariamos
Copy link
Contributor

@Kariamos Kariamos commented Feb 5, 2026

This pull request refactors how modals are rendered and managed in the user invitation settings components for campaigns, projects, and workspaces. The main improvement is the introduction of an appendNode mechanism, allowing modals (such as user removal confirmations) to be appended to a specific DOM node, improving modal placement and behavior. This change is consistently applied across related components and their usages.

Modal rendering and placement improvements:

  • Added an appendNode state and a setModalNode callback in campaignSettings.tsx, projectSettings.tsx, and workspaceSettings.tsx to track and set the DOM node where modals should be appended. The Modal component is now given a ref to this callback to capture its node. [1] [2] [3] [4] [5] [6]
  • Updated the UserItem component to accept an optional appendNode prop, which is passed down to the RemoveConfirmModal for correct modal placement. [1] [2]
  • Modified the RemoveConfirmModal to accept an appendToNode prop and forward it to the underlying Modal component, ensuring the modal is rendered in the correct DOM location.

Consistent prop passing and usage:

  • Passed the appendNode prop from parent settings components (campaignSettings.tsx, projectSettings.tsx, workspaceSettings.tsx) to every UserItem instance, ensuring all user-related modals use the new placement logic. [1] [2] [3] [4]

General code improvements:

  • Updated imports to include useCallback where needed to optimize the setModalNode callback and prevent unnecessary re-renders. [1] [2] [3]

These changes make modal management more flexible and robust, especially in complex UI hierarchies.

@d-beezee d-beezee merged commit b01085a into master Feb 5, 2026
23 checks passed
@Kariamos Kariamos added core Team Core activity labels Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Team Core activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants