User Picker component renders in incorrect position inside Popup on first render

XMLWordPrintable

    • Minor

      Issue Summary

      When using the User Picker component from Atlassian's Forge UI Kit 2 inside a Popup component, the User Picker appears in an incorrect position upon the first rendering. 

      Steps to Reproduce

      1. Create a sample Forge app using UI Kit 2.
      1. Implement the User Picker component inside a Popup component.
        1. const App = () => {
            const [isOpen, setIsOpen] = useState(false)
            return (
              <>
                <Text>Popup with UserPicker</Text>
                <Popup
                  content={() => {
                    return (
                      <UserPicker
                        label='Assignee'
                        placeholder='Select a user'
                        name='user'
                        description='The selected user will be assigned to this task'
                        onChange={(user) => console.log(user)}
                      />
                    )
                  }}
                  isOpen={isOpen}
                  trigger={() => (
                    <Button
                      appearance='primary'
                      isSelected={isOpen}
                      onClick={() => setIsOpen(!isOpen)}
                    >
                      {isOpen ? 'Close' : 'Open'}
                    </Button>
                  )}
                />
              </>
            )
          }
          ForgeReconciler.render(
            <React.StrictMode>
              <App />
            </React.StrictMode>
          ) 
      1. Render the Popup containing the User Picker.
      1. Observe the position of the User Picker on the first rendering.

      Expected Results

      The User Picker should render directly within the Popup, maintaining its position relative to the Popup's boundaries. (Screenshot 2024-12-26 at 5.57.38 PM.png)

      Actual Results

      On the first render, the User Picker appears in an incorrect position, not aligned properly within the Popup. (See Screenshot 2024-12-26 at 5.57.03 PM.png)

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

            Assignee:
            Jonathan Weiss
            Reporter:
            Sherica Ocbania
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: