Skip to content

Conversation

@bfinzer
Copy link
Contributor

@bfinzer bfinzer commented Jan 2, 2026

[#CODAP-188] Bug fix: Slider thumb in Safari leaves gunk behind when dragging the thumb from right to left

  • The slider thumb, when pressed, was adding a drop shadow to help the user know that something had taken place. It turns out that Safari doesn't deal properly with erasing the drop shadow when the element moves. The solution is not to use a drop shadow at all, but to add a stroke to the SVG that draws the thumb. We do this no matter the browser and I think it looks better than the somewhat confusing drop shadow.
  • We also note that there was no hover tip for the slider thumb. (There is in V2.) Simply adding a title doesn't work due to the way React treats svg. We had to make a ThumbIcon component that renders the svg and has its own title.

…dragging the thumb from right to left

* The slider thumb, when pressed, was adding a drop shadow to help the user know that something had taken place. It turns out that Safari doesn't deal properly with erasing the drop shadow when the element moves. The solution is *not* to use a drop shadow at all, but to add a stroke to the SVG that draws the thumb. We do this no matter the browser and I think it looks better than the somewhat confusing drop shadow.
* We also note that there was no hover tip for the slider thumb. (There is in V2.) Simply adding a `title` doesn't work due to the way React treats svg. We had to make a ThumbIcon component that renders the svg *and* has its own `title`.
@bfinzer bfinzer requested a review from kswenson January 2, 2026 01:14
@codecov
Copy link

codecov bot commented Jan 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.65%. Comparing base (5ce4b1f) to head (3126e9f).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2273      +/-   ##
==========================================
+ Coverage   86.47%   86.65%   +0.18%     
==========================================
  Files         721      722       +1     
  Lines       38431    38436       +5     
  Branches     9503     9504       +1     
==========================================
+ Hits        33234    33308      +74     
+ Misses       5188     5119      -69     
  Partials        9        9              
Flag Coverage Δ
cypress 72.20% <100.00%> (+0.26%) ⬆️
jest 55.22% <75.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@cypress
Copy link

cypress bot commented Jan 2, 2026

codap-v3    Run #9435

Run Properties:  status check passed Passed #9435  •  git commit 1ea79f8c89: Increment the build number
Project codap-v3
Branch Review main
Run status status check passed Passed #9435
Run duration 02m 04s
Commit git commit 1ea79f8c89: Increment the build number
Committer eireland
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 4
View all changes introduced in this branch ↗︎

@kswenson kswenson requested a review from Copilot January 6, 2026 00:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a Safari-specific rendering issue where the slider thumb leaves visual artifacts when dragged from right to left. The solution replaces a CSS drop-shadow effect with an SVG stroke and adds a missing hover tooltip to the thumb.

  • Replaced CSS drop-shadow filter with SVG stroke styling to avoid Safari rendering artifacts
  • Created a new ThumbIcon component to properly support SVG title tooltips
  • Added hover tooltip to slider thumb using translation key

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
v3/src/components/slider/thumb-icon.tsx New component that renders the slider thumb SVG with proper title support
v3/src/components/slider/slider.scss Replaced drop-shadow filter with stroke styling for dragging state
v3/src/components/slider/slider-thumb.tsx Updated to use new ThumbIcon component and added tooltip via title prop

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@kswenson kswenson left a comment

Choose a reason for hiding this comment

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

👍 LGTM

@bfinzer bfinzer merged commit baf7e29 into main Jan 6, 2026
20 of 21 checks passed
@bfinzer bfinzer deleted the CODAP-188-slider-gunk-in-safari-v3 branch January 6, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants