Skip to content

[7.14] [Workplace Search] Fix Chrome issues with GitHub sources (#105680)#105698

Merged
kibanamachine merged 1 commit intoelastic:7.14from
kibanamachine:backport/7.14/pr-105680
Jul 15, 2021
Merged

[7.14] [Workplace Search] Fix Chrome issues with GitHub sources (#105680)#105698
kibanamachine merged 1 commit intoelastic:7.14from
kibanamachine:backport/7.14/pr-105680

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backports the following commits to 7.14:

)

* Fix route validation

This param is not always required. Was already fixed for org version but the personal dashboard came later and was not fixed.

Original fix for org:
elastic@30d8b1d#diff-07f094b2a4719e8511f003d8e278a77cd6b808d11b14d1c528705f9b259c328fR373

* Fix route to account for private github route

Previously had the org route hard-coded

* Move the logic for parsing the query params to template

Because the useEffect call comes after the initial render, the chrome flashes. We originally got around this by hiding the chrome always because in non-github scenarios, this worked fine.

However, because the oauth plugin sends the state in the quert params and uses the same URL, we need to parse that to determine whether this is an org or accoutn route. We now do that logic in the template and set the chrome before calling the useEffect.

We still need to pass both the parsed params and the original quert string because the redirect passes that string to the next view.
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Jul 14, 2021
@kibanamachine kibanamachine enabled auto-merge (squash) July 14, 2021 23:47
@kibanamachine
Copy link
Copy Markdown
Contributor Author

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
enterpriseSearch 2.1MB 2.1MB +177.0B

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @scottybollinger

@kibanamachine kibanamachine merged commit 66da660 into elastic:7.14 Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants