[Cases][AttachmentV2] Attachment tab ui update#270518
Conversation
|
Pinging @elastic/kibana-cases (Team:Cases) |
| .filter( | ||
| (type) => | ||
| type.id !== FILE_ATTACHMENT_TYPE && | ||
| type.getAttachmentTabViewObject?.()?.children != null | ||
| ) | ||
| .map((type) => type.id) |
There was a problem hiding this comment.
💅 filter() and map() can go into a single reduce(). But I guess the list is always short so it does not make a difference.
There was a problem hiding this comment.
The list is short and I think this reads better than reduce
.reduce<string[]>((acc, type) => {
if (
type.id !== FILE_ATTACHMENT_TYPE &&
type.getAttachmentTabViewObject?.()?.children != null
) {
acc.push(type.id);
}
return acc;
}, [])
|
I can reproduce the page height issue when expanding the observables accordion. Should probably be fixed before releasing this. Wdyt? |
88ee128 to
1fb8517
Compare
4632996 to
d45de7b
Compare
d1abbc5 to
56c9992
Compare
| /> | ||
| )} | ||
| {ATTACHMENT_TABS.includes(activeTabId as CASE_VIEW_PAGE_TABS) && ( | ||
| {ATTACHMENT_TAB_ALIASES.has(activeTabId) && ( |
There was a problem hiding this comment.
are we going to update the activeTabId as more attachment types are added? Given the breakdown of alert => security.alert, should we create new ones for that so we can have a closer one to one mapping?
There was a problem hiding this comment.
these are params of old tabs, previously tab=alert will go to alert sub-tab. the tabs are dynamic now, so I'm collapsing them to go to attachment instead
We could... types are defined inside cases, but I also feel that this is redundant and create too much hard coded baggage. I need to think about this more and see what the design direction is heading..
| const isAttachmentsTabActive = ATTACHMENT_TAB_ALIASES.has(activeTab); | ||
|
|
||
| const tabs: CaseViewTab[] = useMemo( | ||
| const tabs: Tab[] = useMemo( |
There was a problem hiding this comment.
Can we please add telemetry for which sections users expanded? We still want to track specific attachment interaction as best we can
There was a problem hiding this comment.
I can add EBT for this - do you want to do it in this PR, or in a wholistic telemetry PR?
| await testSubjects.click('case-view-tab-title-files'); | ||
| await testSubjects.existOrFail('case-view-tab-content-files'); | ||
|
|
||
| await cases.casesFilesTable.addFile(require.resolve('./elastic_logo.png')); |
There was a problem hiding this comment.
Should we add a check after the addition that the files accordion shows up to be safe?
michaelolo24
left a comment
There was a problem hiding this comment.
Some nits, but most changes I think will need to come in a UX pass
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
Page load bundle
History
|
Summary
Updates attachment tab per design. Each table only show up if there is attachment (if no alert on a case, alert table does not show up). Observables is always present because it is technically not an attachment and there is no other way to add observables
Update/refresh button is added to improve search experience
Screen.Recording.2026-05-29.at.1.38.09.PM.mov
Checklist
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesbackport:*labels.