-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 context.pageName by fixing missing executionContext and add enableExecutionContextTracking flag #204547
Merged
maryam-saeidi
merged 24 commits into
elastic:main
from
maryam-saeidi:195778-fix-pageName-second-try
Dec 18, 2024
Merged
Fix context.pageName by fixing missing executionContext and add enableExecutionContextTracking flag #204547
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
3925c21
Fix missing executionContext
maryam-saeidi d0b0d51
Revert ExecutionContextStart directly
maryam-saeidi b0c621c
add router to bazel
Dosant dcc81b8
Merge pull request #4 from Dosant/195778-fix-pageName
maryam-saeidi 68cae60
Add temporary TODOs
maryam-saeidi 3f82e98
Merge branch 'main' into 195778-fix-pageName
maryam-saeidi 87ae813
Revert useExecutionContext test in APM
maryam-saeidi 89b004b
Remove TODO from src/plugins/discover/public/application/context/cont…
davismcphee 81a712c
fix(dataset-quality): remove TODO
7e4df5d
Merge branch 'main' into 195778-fix-pageName
maryam-saeidi 2a5a780
Remove comments for IM, Snapshot restore, UA
ElenaStoeva 7c85f18
Merge branch 'main' into 195778-fix-pageName
maryam-saeidi a83ff91
Allow disabling default execution context tracking if there is a cust…
maryam-saeidi 899a3fe
Change disableExecutionContextTracking to enableExecutionContextTracking
maryam-saeidi 1fc0b38
Fix executionContext dep and enable tracking for observability
maryam-saeidi 7a04db2
Remove comments
maryam-saeidi 79586d6
Make executionContext dep optional
maryam-saeidi 6ebfcf3
Merge branch 'main' into 195778-fix-pageName-second-try
maryam-saeidi b22b5b8
Fix test
maryam-saeidi e23b561
Enable execution context tracking for observability
maryam-saeidi 9b3532c
Fix comment
maryam-saeidi c56ab90
Rename SharedUXContext to SharedUXRouterContext
maryam-saeidi 53a7e9a
Throw error if executionContext is undefined
maryam-saeidi 2e2eb1f
Merge branch 'main' into 195778-fix-pageName-second-try
maryam-saeidi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library") | ||
|
||
SRCS = glob( | ||
[ | ||
"**/*.ts", | ||
"**/*.tsx", | ||
], | ||
exclude = [ | ||
"**/test_helpers.ts", | ||
"**/*.config.js", | ||
"**/*.mock.*", | ||
"**/*.test.*", | ||
"**/*.stories.*", | ||
"**/__snapshots__/**", | ||
"**/integration_tests/**", | ||
"**/mocks/**", | ||
"**/scripts/**", | ||
"**/storybook/**", | ||
"**/test_fixtures/**", | ||
"**/test_helpers/**", | ||
], | ||
) | ||
|
||
DEPS = [ | ||
|
||
] | ||
|
||
js_library( | ||
name = "shared-ux-router", | ||
package_name = "@kbn/shared-ux-router", | ||
srcs = ["package.json"] + SRCS, | ||
deps = DEPS, | ||
visibility = ["//visibility:public"], | ||
) |
2 changes: 2 additions & 0 deletions
2
packages/shared-ux/router/impl/__snapshots__/route.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
import { createContext, useContext } from 'react'; | ||
import { SharedUXRoutesContextType } from './types'; | ||
|
||
const defaultContextValue = {}; | ||
|
||
export const SharedUXRoutesContext = createContext<SharedUXRoutesContextType>(defaultContextValue); | ||
|
||
export const useSharedUXRoutesContext = (): SharedUXRoutesContextType => | ||
useContext(SharedUXRoutesContext as unknown as React.Context<SharedUXRoutesContextType>); |
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
do we need this here? Seems like this will also be called inside
<Route/>
componentThere 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.
I don't think so, but I am not sure how to verify that. Would you mind checking it? If you and your team don't see a use case for it, I can remove it, but I am not sure why it was added in the first place.
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.
I double-checked. Agree that we should keep it here