Skip to content

feat(NcAppSidebarTab): Redesign active tab as rounded filled pill#8447

Open
nfebe wants to merge 1 commit intomainfrom
feat/redesign-sidebar-tabs
Open

feat(NcAppSidebarTab): Redesign active tab as rounded filled pill#8447
nfebe wants to merge 1 commit intomainfrom
feat/redesign-sidebar-tabs

Conversation

@nfebe
Copy link
Copy Markdown
Contributor

@nfebe nfebe commented Apr 20, 2026

🖼️ Screenshots

🏚️ Before 🏡 After
active-tabs-before-7520 active-tabs-after-7520

Screencast

active-tabs-demo-7520.webm

Closes #7520

@nfebe nfebe force-pushed the feat/redesign-sidebar-tabs branch from 39f2471 to 9056878 Compare April 20, 2026 23:41
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.57%. Comparing base (034beb5) to head (a83c6d0).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8447      +/-   ##
==========================================
+ Coverage   54.55%   54.57%   +0.02%     
==========================================
  Files         106      106              
  Lines        3439     3441       +2     
  Branches     1002     1002              
==========================================
+ Hits         1876     1878       +2     
  Misses       1322     1322              
  Partials      241      241              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nfebe nfebe marked this pull request as ready for review April 27, 2026 10:25
@nfebe nfebe added the 3. to review Waiting for reviews label Apr 27, 2026
@nfebe nfebe requested review from ShGKme, kra-mo and susnux April 27, 2026 10:25
@nfebe nfebe force-pushed the feat/redesign-sidebar-tabs branch from 9056878 to 1ab6511 Compare April 27, 2026 10:26
@ShGKme ShGKme added the enhancement New feature or request label Apr 27, 2026
@ShGKme ShGKme added this to the 9.7.0 milestone Apr 27, 2026
@ShGKme ShGKme changed the title feat(sidebar-tabs): Redesign active tab as rounded filled pill feat(NcAppSidebarTab): Redesign active tab as rounded filled pill Apr 27, 2026
@ShGKme ShGKme added the design Design, UX, interface and interaction design label Apr 27, 2026
Copy link
Copy Markdown
Contributor

@susnux susnux left a comment

Choose a reason for hiding this comment

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

What about backwards compatibility with old servers?
This likely needs legacy workarounds just like we did with the border rework we recently did. So that apps on e.g. NC32 still have the old design.

@ShGKme
Copy link
Copy Markdown
Contributor

ShGKme commented Apr 27, 2026

(I removed the icon and added font-weight to make it closer to the draft on the screenshot)

Design Current
image image
  • It looks like the highlight is supposed to be on the bottom of the button, without the 2px gap
  • The highlight width looks more like 65% rather than the current 80%
  • The highlight height looks more like 5px (or more) rather than the current 4px. With 4px the border radius is 2px, which is barely a circle section (but might be different due to a different size)

Another thing that catches my eyes — how it lies on the gray line between the tablist and the tab content. Previously it looked fine to me, but now with the border radius and the gap if feels like the gap is missing between the buttons and the content, or not necessary at all.

Before image
After image

Also, I'm not sure what it is supposed to look like with the icon. On the draft there are no icons. With the current size, it looks unbalanced to me, with the icon too close to the top.

image

cc @kra-mo

Comment thread src/components/NcAppSidebarTab/NcAppSidebarTab.vue
Comment thread src/components/NcAppSidebar/NcAppSidebarTabsButton.vue Outdated
Comment thread src/components/NcAppSidebar/NcAppSidebarTabsButton.vue Outdated
Comment thread src/components/NcAppSidebar/NcAppSidebarTabsButton.vue
@nfebe nfebe force-pushed the feat/redesign-sidebar-tabs branch 2 times, most recently from e97cd55 to 6b2a7e2 Compare April 27, 2026 13:47
@nfebe nfebe requested a review from ShGKme April 27, 2026 14:48
@nfebe nfebe force-pushed the feat/redesign-sidebar-tabs branch from 6b2a7e2 to bb2edfc Compare April 27, 2026 21:39
@kra-mo
Copy link
Copy Markdown
Member

kra-mo commented Apr 28, 2026

Also, I'm not sure what it is supposed to look like with the icon. On the draft there are no icons. With the current size, it looks unbalanced to me, with the icon too close to the top.

Yeah, I see what you mean, some more padding would be nice.

@kra-mo
Copy link
Copy Markdown
Member

kra-mo commented Apr 28, 2026

It would be good to have the font-weight just be 500 consistently. See #8469

@ShGKme
Copy link
Copy Markdown
Contributor

ShGKme commented Apr 28, 2026

@kra-mo What about the other points from above?

  • Marker width (80%/50% or ~65%)
  • Marker thickness (height, 4px or 5px)
  • Marker position (on the bottom or with a gap)
  • The border between tabs and the content, or the gap above the border

@kra-mo
Copy link
Copy Markdown
Member

kra-mo commented Apr 28, 2026

Marker width (80%/50% or ~65%)

I was thinking a bit, and honestly, it being wider works in more cases so maybe it's better to just go with that.

Marker thickness (height, 4px or 5px)

It does look better if it's a bit thicker, but 4px is a variable, I'd say maybe 6px (1.5x).

Marker position (on the bottom or with a gap)

On the bottom, no gap.

The border between tabs and the content, or the gap above the border

Yes, elements with border radius should not hug hard edges. We should add a bit of a gap :)

@nfebe nfebe force-pushed the feat/redesign-sidebar-tabs branch from bb2edfc to 2bed8ec Compare April 28, 2026 12:33
@nfebe
Copy link
Copy Markdown
Contributor Author

nfebe commented Apr 28, 2026

image

renderIcon() {
return this.$slots.icon?.()
renderIcon(selected = false) {
return this.$slots.icon?.({ selected })
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Although the new param's name reflects HTML (aria-selected) and the current internal variable name, I'm not sure about the naming:

  • Parent's selected tab is defined by active prop, which results in 2 names for the same thing (The current tab is active and whether the tab is active is selected)
  • Boolean flag pattern seems more fitting here, e.g. isSelected/isActive. And it also would allow in the future having both the boolean flag and the value if needed.

Note: this changes the component API and refactoring it later would be only possible with backward compatibility and migration.

The new prop might not be required for this feature. There is an active prop already.

It is slightly more complicated to use, though.

<NcAppSidebar v-model:active="active">

	<!-- ... -->

	<NcAppSidebarTab name="Settings" id="settings-tab">
		<template #icon>
			<IconCog v-if="active === 'settings-tab'" :size="20" />
			<IconCogOutline v-else :size="20" />
		</template>
	</NcAppSidebarTab>

</NcAppSidebar>

cc @susnux

Comment on lines +256 to +258
gap: var(--default-grid-baseline);
margin: 10px 8px 0 8px;
padding-block-end: var(--default-grid-baseline);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This also needs the legacy check

Image

@nfebe nfebe force-pushed the feat/redesign-sidebar-tabs branch from 2bed8ec to 82c1372 Compare April 30, 2026 01:04
The active sidebar tab now renders as a fully-rounded filled pill with
an inset, rounded blue indicator that grows into place when selected,
replacing the previous full-width bottom border and bold label treatment.

Tabs keep a small gap between each other to eliminate the hover radius
artifact, and the tab icon slot now receives the active state so
consumers can render filled/outlined icon variants.

Signed-off-by: nfebe <fenn25.fn@gmail.com>
@nfebe nfebe force-pushed the feat/redesign-sidebar-tabs branch from 82c1372 to a83c6d0 Compare April 30, 2026 01:17
@Antreesy Antreesy modified the milestones: 9.7.0, 9.7.1 Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews design Design, UX, interface and interaction design enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Redesign sidebar tabs

5 participants