Skip to content

fix(dock): improve icon visibility and fix separator height - #39

Merged
AllTerrainDeveloper merged 4 commits into
WordPress:trunkfrom
darksns:fix/dock-icons-separator-styling
May 1, 2026
Merged

fix(dock): improve icon visibility and fix separator height#39
AllTerrainDeveloper merged 4 commits into
WordPress:trunkfrom
darksns:fix/dock-icons-separator-styling

Conversation

@darksns

@darksns darksns commented Apr 29, 2026

Copy link
Copy Markdown
Contributor
  • Force monochrome white palette on plugin SVG icons that ship with hardcoded fill attributes, so they match the dashicons look
  • Add hover opacity transition on dock icons (0.7 → 1)
  • Fix horizontal separator height: was 60% (collapsing against the taskbar pill), now fixed 28px to match the dock tile glyph area
  • Bump dock border alpha from 0.08 to 0.2 for better visibility

- Force monochrome white palette on plugin SVG icons that ship with
  hardcoded fill attributes, so they match the dashicons look
- Add hover opacity transition on dock icons (0.7 → 1)
- Fix horizontal separator height: was 60% (collapsing against the
  taskbar pill), now fixed 28px to match the dock tile glyph area
- Bump dock border alpha from 0.08 to 0.2 for better visibility

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@AllTerrainDeveloper

Copy link
Copy Markdown
Collaborator

Thank you for your first contribution!

BEFORE AFTER
image image

There seems to be kind of a regression in the taskbar, a new "separator" appeared. Would you mind to refine it and we ship it!

Again, thank you!

@darksns

darksns commented Apr 30, 2026 via email

Copy link
Copy Markdown
Contributor Author

Address review feedback on PR WordPress#39: on a clean WordPress install
where the taskbar (or dock) has no menu items but at least one
system item is registered, the system separator was rendered as
a stray hairline with nothing to divide above/before it.

The TS code (src/dock.ts) creates the separator before appending
the first system or pinned item, so when no menu items precede
that cluster the separator becomes the dock's `:first-child`.
Hide it in that case via CSS — covers both the horizontal
taskbar and the vertical dock without touching the rendering
logic.
@darksns

darksns commented Apr 30, 2026

Copy link
Copy Markdown
Contributor Author

Hi! Thanks for the review and the screenshots — they made the regression easy to spot.

Pushed cfc786e which hides the separator when it's the first child of the dock. The TS code creates the system/pinned separator before its first cluster item, so when the dock has no menu items above (clean WP install) the separator becomes the first child and now display: none kicks in.

Verified both scenarios on Chrome, Firefox and Safari:

  • Clean install (no plugin menus in taskbar): separator hidden, no stray hairline
  • Plugin-rich install: separator visible between menu items and system cluster, as before
    CSS-only fix, no TS changes needed.

BEFORE
CleanShot 2026-04-30 at 23 09 23@2x

AFTER
CleanShot 2026-04-30 at 23 10 00@2x

darksns added 2 commits April 30, 2026 23:18
…arator-styling

# Conflicts:
#	assets/css/dock.css
After PR WordPress#31 unified dock + taskbar with the new
`data-wp-desktop-dock-placement` attribute, the bottom-placement
separator inherited `height: 60%` which collapses against the
floating pill's intrinsic height — leaving the hairline
effectively invisible against the translucent backdrop.

Set a fixed 28px height to match the dock tile inner glyph area,
restoring the same visibility intent of the earlier horizontal
taskbar fix on the new selector.
@darksns

darksns commented Apr 30, 2026

Copy link
Copy Markdown
Contributor Author

Pushed 5f69cb4: re-applies the height: 28px fix on the new data-wp-desktop-dock-placement="bottom" selector, since the old --horizontal modifier was removed by PR #31. Same intent as before, just on the unified dock selector.

Also rebased onto current trunk to clear the conflict — the final diff vs upstream is just the SVG icon normalization (filter: brightness(0) invert(1) on .wp-desktop-dock__item-svg), the :first-child hide-when-empty rule, and this 28px separator height. Tested on Chrome, Firefox and Safari, both with and without third-party top-level admin menus.

Ready for another look!

@AllTerrainDeveloper AllTerrainDeveloper left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks great now!

@AllTerrainDeveloper
AllTerrainDeveloper merged commit 293bab0 into WordPress:trunk May 1, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants