-
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
base changes for active/current node styling #62007
Merged
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
7806d11
base changes for selected node styling
0055a47
run style off of selected/current state
9e182b6
fix spelling mistake
01a7c66
merge upstream
b687ea1
placeholder to see active state
bc6f618
w/placeholder hex to demonstrate focus animation
63ccccc
active style w/ path animation
40c0129
position adjustment
dd90b83
active descendant to parent
aae54bd
Merge branch 'master' of https://github.com/elastic/kibana into resol…
9c6ca8d
add backing to match comp & transfer outline shape to defs
75f7277
switch to fixed positioning
b57d790
better documentation to differentiate UI actions
bd73015
late change: sync panel icon click
c6d457f
Robert Austin review: add comments, remove useMemo
ae79f32
Merge remote-tracking branch 'upstream/master' into resolver/active-d…
96394a8
Robert Austin review: add comments to reducer
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
run style off of selected/current state
- Loading branch information
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
29 changes: 29 additions & 0 deletions
29
x-pack/plugins/endpoint/public/embeddables/resolver/store/ui/selectors.ts
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,29 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { createSelector } from 'reselect'; | ||
import { ResolverUIState } from '../../types'; | ||
|
||
/** | ||
* id of the "current" tree node (fake-focused) | ||
*/ | ||
export const activeDescendantId = createSelector( | ||
(uiState: ResolverUIState) => uiState, | ||
({ activeDescendentId }) => { | ||
return activeDescendentId; | ||
} | ||
); | ||
|
||
/** | ||
* id of the currently "selected" tree node | ||
*/ | ||
export const selectedDescendantId = createSelector( | ||
(uiState: ResolverUIState) => uiState, | ||
/* eslint-disable no-shadow */ | ||
({ selectedDescendantId }) => { | ||
return selectedDescendantId; | ||
} | ||
); |
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
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.
ℹ️ Fun fact: "descendant" and "descendent" (at least in en-US) have slightly different meanings. "descendant" with a "a" is defined as a noun meaning
a person, plant, or animal that is descended from a particular ancestor
and "descendent" with an adjective "e" meaningdescending from an ancestor
. Given that many other ARIA attributes are also adjectives ("required","relevant") and a document element is difficult to classify as a "person, plant or animal" I would have suggested "descendent" as the better term, but 🤷♂