Skip to content

Conversation

@akowalska622
Copy link
Contributor

@akowalska622 akowalska622 commented Nov 25, 2025

Summary

Followup: #243452

Resolves: #244153

A-la-carte: https://akowalska622-pr-244179-discover-tabs-add-separators.kbndev.co/

Initially issue focused only on adding separators, however a few more requirements for small polishes/bugfixes were added.

The complete list with requirement can be found in the issue

Most of the commits (apart from small clean ups) are scoped to a single bug/improvement.

Separators

Tabs should have separators, as per design:
image

Requirements for separators:

  • a separator should be visible on the right side of the tab, right outermost included (so separator between last tab and + button)
  • it shouldn't be visible when a tab is selected and the right side adjacent tab is selected (visually no separators around the selected tab)
  • it shouldn't be visible when a tab is hovered and the right side adjacent tab is hovered (visually no separators around the hovered tab)

It couldn't be done with pure css (targeting sibling element), because of wrappers (draggable wrapper and preview wrapper) the tabs aren't direct siblings. I eventually settled for managing the visibility of the separator from within the parent (tabs bar), based on selected and hovered state of a tab and previous tab to the one which is being hovered/selected.

From my testing it was the cleanest and sturdiest approach, but I'm open to different ones as well.

PR changes:

Screenshot 2025-11-25 at 15 13 48

tab separators

Loading spinner should respect the tab border radius

Screenshot 2025-11-27 at 13 52 25

Fixed overflowing shadow and layout shift on keyboard navigation

Screenshot 2025-11-28 at 12 49 59

keyboard nav

Drag and drop styling (transparent all tabs, but selected and dragged)

drag n drop

Dismissing tab action menu if switched to a different tab

close popover

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

Identify risks

Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

@akowalska622 akowalska622 self-assigned this Nov 25, 2025
@akowalska622 akowalska622 added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// Feature:DiscoverTabs Tabs feature within Discover labels Nov 25, 2025
@akowalska622 akowalska622 marked this pull request as ready for review November 25, 2025 14:28
@akowalska622 akowalska622 requested a review from a team as a code owner November 25, 2025 14:28
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@akowalska622 akowalska622 requested review from l-suarez and removed request for a team November 25, 2025 15:18
@akowalska622 akowalska622 marked this pull request as draft November 25, 2025 15:52
@akowalska622 akowalska622 force-pushed the discover-tabs-add-separators branch from 2cbfb69 to 6224ef6 Compare November 27, 2025 12:52
@akowalska622 akowalska622 changed the title [Discover] [Unified Tabs] Add separator between tabs [Discover] [Unified Tabs] Tabs new design polishes Dec 1, 2025
Comment on lines +198 to +204
// dismisses action popover when the selected tab changes
useEffect(() => {
if (prevSelectedItemIdRef.current !== selectedItemId && !isSelected && isActionPopoverOpen) {
setActionPopover(false);
}
prevSelectedItemIdRef.current = selectedItemId;
}, [selectedItemId, isSelected, isActionPopoverOpen]);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also do it simpler, but violating useEffect deps rule, so I went with ref here. I'm open for discussion though

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels like there should be an easier way to do this, but I'm not sure off the top of my head tbh. So I think it's good for now 👍

@akowalska622 akowalska622 marked this pull request as ready for review December 1, 2025 14:39
Copy link
Contributor

@davismcphee davismcphee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates and fixes! It looks a lot more polished with the separators now 👌

I noticed a few minor things while testing locally and threw together a PR against this branch attempting to address them: akowalska622#3. Would you mind giving it a try and merging if all seems good? I think with these final touches the new tabs styles will feel nice and polished 🙂

Comment on lines +198 to +204
// dismisses action popover when the selected tab changes
useEffect(() => {
if (prevSelectedItemIdRef.current !== selectedItemId && !isSelected && isActionPopoverOpen) {
setActionPopover(false);
}
prevSelectedItemIdRef.current = selectedItemId;
}, [selectedItemId, isSelected, isActionPopoverOpen]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels like there should be an easier way to do this, but I'm not sure off the top of my head tbh. So I think it's good for now 👍

Comment on lines 139 to 140
rgb(255, 0, 0) ${euiTheme.size.l},
rgb(255, 0, 0) calc(100% - ${euiTheme.size.l}),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did we change the size of the overflow shadow? It looks a bit big now imo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching, it's a leftover from testing and playing around with shadow, I'll revert

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in a9b652a

@akowalska622
Copy link
Contributor Author

Thanks for the review and additional polished @davismcphee! I'll definitely take a look today and update my branch with your suggestions, thanks for your time and effort ❤️

Copy link
Contributor

@MiloszRadzynski MiloszRadzynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM great work! 🔥🚀

@akowalska622
Copy link
Contributor Author

/ci

@elasticmachine
Copy link
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #65 / Alerting bulkDisable should bulk disable and untrack
  • [job] [logs] FTR Configs #73 / Maps endpoints apis search ES|QL should return getValues response in expected shape
  • [job] [logs] FTR Configs #73 / Maps endpoints apis search ES|QL should return getValues response in expected shape

History

cc @akowalska622

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:DiscoverTabs Tabs feature within Discover release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t//

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Discover] [Unified Tabs] Add tabs separators and improve minor issues

5 participants