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: open empathize with autoFocus true #455

Merged
merged 2 commits into from
Mar 7, 2024

Conversation

lauramargar
Copy link
Contributor

@lauramargar lauramargar commented Feb 26, 2024

Pull request template

When we use the floating predictive and autoFocus of the searchBox there is a bug when you open X for the first time, the empathize doesn't open.

Motivation and context

  • Dependencies. If any, specify:
  • Open issue. If applicable, link: EMP-3649

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that causes existing functionality to not work as expected)
  • Change requires a documentation update

What is the destination branch of this PR?

  • Main
  • Other. Specify:

How has this been tested?

To test it, you have to use the DesktopHeaderFloatingPredictive component in the desktop-top-section file and set the autoFocus property in the searchBox component to true.

@lauramargar lauramargar requested a review from a team as a code owner February 26, 2024 14:53
Copy link

Check PR 455 preview 👀

https://x.test.empathy.co/preview/455/index.html

@annacv annacv self-requested a review March 5, 2024 10:12
Copy link
Contributor

@annacv annacv left a comment

Choose a reason for hiding this comment

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

Hi! I have been testing several options: it seems that moving the if condition below allows empathize to be opened, without the extra div: I assume that with the if condition, the empathize's state logic is not loaded at the same time that the searchbox is clicked:

<component
      :is="isDesktopOrGreater ? 'div' : 'BaseScroll'"
      class="x-h-full desktop:x-my-16 desktop:x-ml-16"
    >
      <div v-if="showEmpathize || showIdentifierResults" class="x-layout-item desktop:x-block">
        <BaseKeyboardNavigation
          class="x-flex x-flex-col desktop:x-grid desktop:x-grid-cols-12 desktop:x-items-start desktop:x-gap-24"
          :navigationHijacker="navigationHijacker"
        >

Copy link

github-actions bot commented Mar 6, 2024

Check PR 455 preview 👀

https://x.test.empathy.co/preview/455/index.html

Copy link
Contributor

@annacv annacv left a comment

Choose a reason for hiding this comment

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

🎉

@annacv annacv merged commit b4753f6 into main Mar 7, 2024
4 checks passed
@annacv annacv deleted the bugfix/open-empathize-with-autofocus-true branch March 7, 2024 12:25
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