-
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Positioning with constants here to make the upstream merge with Robert's work easier 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.
either way it'll be a one line change when merging in his changes, not sure how much easier it is to wait
@@ -10,12 +10,18 @@ import { dataReducer } from './data/reducer'; | |||
import { ResolverState, ResolverAction, ResolverUIState } from '../types'; | |||
|
|||
const uiReducer: Reducer<ResolverUIState, ResolverAction> = ( | |||
uiState = { activeDescendentId: null }, |
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" 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) |
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.
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') { |
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.
todo: comment
import { animateProcessIntoView } from './methods'; | ||
import { cameraReducer } from './camera/reducer'; | ||
import { dataReducer } from './data/reducer'; | ||
import { ResolverState, ResolverAction, ResolverUIState } from '../types'; | ||
import { uniquePidForProcess } from '../models/process_event'; | ||
|
||
const resolverNodeIdGenerator = htmlIdGenerator('resolverNode'); |
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.
todo: comment re: deterministic ID behavior
@@ -143,6 +148,14 @@ export const ProcessEventDot = styled( | |||
const labelId = useMemo(() => resolverNodeIdGenerator(), [resolverNodeIdGenerator]); | |||
const descriptionId = useMemo(() => resolverNodeIdGenerator(), [resolverNodeIdGenerator]); | |||
|
|||
const isActiveDescendant = useMemo(() => { |
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.
consider removing useMemo
@@ -265,6 +297,16 @@ export const ProcessEventDot = styled( | |||
white-space: nowrap; | |||
will-change: left, top, width, height; | |||
contain: strict; | |||
|
|||
& .backing { |
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.
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?
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.
looks awesome
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.
lgtm
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 Out
Stack Trace
History
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