[Workplace Search] Fix Chrome issues with GitHub sources#105680
Merged
scottybollinger merged 4 commits intoelastic:masterfrom Jul 14, 2021
Merged
[Workplace Search] Fix Chrome issues with GitHub sources#105680scottybollinger merged 4 commits intoelastic:masterfrom
scottybollinger merged 4 commits intoelastic:masterfrom
Conversation
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
Previously had the org route hard-coded
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.
yakhinvadim
approved these changes
Jul 14, 2021
Contributor
yakhinvadim
left a comment
There was a problem hiding this comment.
Great work, thanks a ton for looking into it! 🙏
Contributor
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Jul 14, 2021
) * 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
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Jul 14, 2021
) * 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.
Contributor
kibanamachine
added a commit
that referenced
this pull request
Jul 15, 2021
…105698) * 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: 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. Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
kibanamachine
added a commit
that referenced
this pull request
Jul 15, 2021
…105699) * 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: 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. Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
jloleysens
added a commit
to jloleysens/kibana
that referenced
this pull request
Jul 15, 2021
…-png-pdf-report-type * 'master' of github.com:elastic/kibana: (75 commits) [Search Sessions] Don’t try to delete errored searches (elastic#105434) [Search Sessions] fix saved object can be created even if courier:batchSearches is enabled (elastic#105407) [Remote Clusters] Fixed remote clusters details flyout for long strings (elastic#105592) [ML] Functional tests - re-activate a11y tests (elastic#105198) [APM] Typed client-side routing (elastic#104274) [Canvas] Expression error (elastic#103048) [ML] Fixing job wizard with missing description (elastic#105574) [Security Solution][Alerts] - Add alerts subfeature UI (elastic#105505) Upgrade EUI to v35.0.0 (elastic#105127) [Reporting] Clean up types for internal APIs needed for UI (elastic#105508) skip flaky suite (elastic#105087) [Workplace Search] Fix Chrome issues with GitHub sources (elastic#105680) [Fleet] Add containerized fleet server instructions to Fleet README (elastic#105669) [ML] Add api integration test for analytics map endpoint (elastic#105531) Fixes cypress flake across two tests (elastic#105645) [Logs&Metrics UI] add owner properties to plugin manifest (elastic#105580) chore(NA): introduce preset for jest-integration tests on @kbn/test (elastic#105144) [Enterprise Search] Added Thumbnails to Search UI (elastic#104199) Translate App Search credentials list (elastic#105619) [APM] APM agent config created prior to Fleet migration is not injected into integration policy (elastic#105504) ... # Conflicts: # x-pack/plugins/reporting/common/types.ts # x-pack/plugins/reporting/public/management/report_listing.test.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes https://github.com/elastic/workplace-search-team/issues/1882
Summary
This PR addresses an edge case bug that occurs in the connection of Github sources. There were 3 issues that were fixed in this PR.
stateparam from the Rails server. Because the Kibana chrome fires before theuseEffectcall is made, there was a flash of Kibana chrome that was initially fixed by just hiding the chrome altogether and letting the app show the chrome where needed. Unfortunately, Github requires an extra redirect and that was throwing everything off. The solution was to move the logic of parsing the state from the query params to the template and hiding the chrome only whereaccountwas set in the state. (805711d)Checklist