-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Workplace Search] Fix bug when transitioning to personal dashboard #100061
[Workplace Search] Fix bug when transitioning to personal dashboard #100061
Conversation
The unmount callback should have never been in the useEffect keyed off of the pathname. Another issue appeared earlier and I tried to fix it with the now removed conditional, but it should have been removed into it’s own useEffect that only runs when the component is unmounted, not on every route change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Scotty!
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Async chunks
Unknown metric groupsReferences to deprecated APIs
History
To update your PR or re-run it, just comment with: |
…lastic#100061) The unmount callback should have never been in the useEffect keyed off of the pathname. Another issue appeared earlier and I tried to fix it with the now removed conditional, but it should have been removed into it’s own useEffect that only runs when the component is unmounted, not on every route change. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
💔 Backport failed
Successful backport PRs will be merged automatically after passing CI. To backport manually run: |
…100061) (#100090) The unmount callback should have never been in the useEffect keyed off of the pathname. Another issue appeared earlier and I tried to fix it with the now removed conditional, but it should have been removed into it’s own useEffect that only runs when the component is unmounted, not on every route change. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
* master: (27 commits) Disable contextMenu when event is not event.kind=event (elastic#100027) Updates the monorepo-packages list (elastic#100096) Removes circular deps for lists in tooling and bumps down byte limit for lists (elastic#100082) [Security Solutions] Breaks down the io-ts packages to decrease plugin size (elastic#100058) fix-typo: Use of `than` instead of `then` (elastic#100030) [Fleet] Fix error when searching for keys whose names have spaces (elastic#100056) [Workplace Search] Fix bug when transitioning to personal dashboard (elastic#100061) [index pattern field editor] Update runtime field painless docs url (elastic#100014) [QA] Switch tests to use importExport - visualize (elastic#98063) [Canvas] Remove unused legacy autocomplete component (elastic#99215) Re-enable formerly flaky shareable test (elastic#98826) [Uptime] [Synthetics Integration] ensure that proxy url is not overwritten (elastic#99944) [Security Solutions][Lists] Trims down list plugin size by breaking out the exception builder into chunks by using react lazy loading (elastic#99989) [Uptime] Increase debounce and add immediate submit to `useQueryBar` (elastic#99675) chore(NA): moving @kbn/docs-utils into bazel (elastic#100051) [Enterprise Search] Fix SchemaFieldTypeSelect axe issues (elastic#100035) Remove outdated comment about schema validation not working (it does work now). (elastic#100055) Rename alert status OK to Recovered and fix some UX issues around disabling a rule while being in an error state (elastic#98135) [Fleet] Do not use async method in plugin setup|start (elastic#100033) Skip flaky functional test suite ...
…lastic#100061) The unmount callback should have never been in the useEffect keyed off of the pathname. Another issue appeared earlier and I tried to fix it with the now removed conditional, but it should have been removed into it’s own useEffect that only runs when the component is unmounted, not on every route change. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Summary
This PR fixes an edge case bug where being on an org source details page and then transitioning to the personal dashboard caused the source subnav to appear when it shouldn't have. The issue is that we weren't resetting state when we were unmounting and I had erroneously had the reset callback in the wrong
useEffect
callback.The unmount callback should have never been in the
useEffect
keyed off of thepathname
. Another issue appeared earlier and I tried to fix it with the now removed conditional, but it should have been removed into its ownuseEffect
that only runs when the component is unmounted, not on every route change.Before
After
Checklist