base changes for active/current node styling#62007
base changes for active/current node styling#62007bkimmel merged 17 commits intoelastic:masterfrom bkimmel:resolver/active-desc-styling
Conversation
…ver/active-desc-styling
| height={markerSize * 1.5} | ||
| className="backing" | ||
| /> | ||
| <rect x="7" y="-12.75" width="15" height="10" fill={NamedColors.resolverBackground} /> |
There was a problem hiding this comment.
Positioning with constants here to make the upstream merge with Robert's work easier later
There was a problem hiding this comment.
either way it'll be a one line change when merging in his changes, not sure how much easier it is to wait
| import { ResolverState, ResolverAction, ResolverUIState } from '../types'; | ||
|
|
||
| const uiReducer: Reducer<ResolverUIState, ResolverAction> = ( | ||
| uiState = { activeDescendentId: null }, |
There was a problem hiding this comment.
ℹ️ 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" meaning descending 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 🤷♂
|
Pinging @elastic/endpoint-app-team (Feature:Resolver) |
jonathan-buttner
left a comment
There was a problem hiding this comment.
Looks fine to me but might want to wait for a 👍 from Kevin or Rob
| ...uiState, | ||
| selectedDescendantId: action.payload.nodeId, | ||
| }; | ||
| } else if (action.type === 'userBroughtProcessIntoView') { |
| import { ResolverState, ResolverAction, ResolverUIState } from '../types'; | ||
| import { uniquePidForProcess } from '../models/process_event'; | ||
|
|
||
| const resolverNodeIdGenerator = htmlIdGenerator('resolverNode'); |
There was a problem hiding this comment.
todo: comment re: deterministic ID behavior
| const labelId = useMemo(() => resolverNodeIdGenerator(), [resolverNodeIdGenerator]); | ||
| const descriptionId = useMemo(() => resolverNodeIdGenerator(), [resolverNodeIdGenerator]); | ||
|
|
||
| const isActiveDescendant = useMemo(() => { |
There was a problem hiding this comment.
consider removing useMemo
| will-change: left, top, width, height; | ||
| contain: strict; | ||
|
|
||
| & .backing { |
There was a problem hiding this comment.
could you add a comment explaining that this enables the animated stroke when a node becomes active, and explain that dasharray and dashoffset should be the same value, and that the value should be larger than the length of the path?
| height={markerSize * 1.5} | ||
| className="backing" | ||
| /> | ||
| <rect x="7" y="-12.75" width="15" height="10" fill={NamedColors.resolverBackground} /> |
There was a problem hiding this comment.
either way it'll be a one line change when merging in his changes, not sure how much easier it is to wait
💛 Build succeeded, but was flaky
Test FailuresKibana Pipeline / kibana-xpack-agent / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/security/management·js.security app Management Security navigation Clicking save in create role section brings user back to listingStandard OutStack TraceHistory
To update your PR or re-run it, just comment with: |
…into event-log/query-support * 'event-log/query-support' of github.com:gmmorris/kibana: (41 commits) [jenkins] refer to sizes in most pipeline code (elastic#62082) skip flaky suite (elastic#60470) [Discover] Fix flaky FT in field visualize (elastic#62418) [ML] Data Frame Analytics: Fix feature importance (elastic#61761) [Reporting] Use a shim for server config (elastic#62086) [Reporting] Fix reporting for non-default spaces (elastic#62226) Fix bug that coerced empty scaled float value to 0 (elastic#62251) [SIEM] [Detection Engine] Remove has manage api keys requireme… (elastic#62446) [Maps] Safely handle empty string and invalid strings from EuiColorPicker (elastic#62507) Reporting/bug more blacklisted headers (elastic#62389) [SIEM] Prevent undefined behavior in our ML popover (elastic#62498) [SIEM] [Detection Engine] remove all unknowns from all rules t… (elastic#62327) base changes for active/current node styling (elastic#62007) [kbn/ui-shared-deps] expand and split (elastic#62364) [ML] DF Analytics - ensure destination index pattern created (elastic#62450) Mark rule run as failure if there was an error (elastic#62383) Add docs for metric explorer alerts (elastic#62314) skip flaky suite (elastic#62281) [SIEM][Detection Engine] Fixes export of single rule and the icons fixes flakiness (elastic#62406) ...
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |

Summary
We're implementing the "active state" (unselected) style on nodes as provided by Security Design / UX ( @marrasherrier / @lindseypoli ). To keep "active" separate from "current", a locus and reducer was added to the Resolver UI state ( https://github.com/elastic/kibana/pull/62007/files#diff-118fa940615495cf306a955b1341de5bR13 ). The "encircling" effect is created by adding a shape identical to the outline of the "cube" it surrounds ( https://github.com/elastic/kibana/pull/62007/files#diff-b18117271821fdd985eed1e1c4fd749fR212 )
and animated when the node takes the "current" state by applying an offset to its
stroke-dasharray( https://github.com/elastic/kibana/pull/62007/files#diff-b18117271821fdd985eed1e1c4fd749fR308 )edit: late change - updated the reducer to activate the node that the panel pans to on icon click (
https://github.com/elastic/kibana/pull/62007/files#diff-118fa940615495cf306a955b1341de5bR31
)
Screenshot:
late change - sync with panel:

FF:

Adds "active-descendant/selected" style to Resolver nodes per mocks depicted here:
##Comp from D/UX: For comparison to screenshot above

Please note, this is the mock from security design, not a screenshot
Please note, this is the mock from security design, not a screenshot
Checklist
Delete any items that are not applicable to this PR.
For maintainers