Skip to content

fix(DatePicker): make underline variant border override order-independent - #1154

Merged
agupta-eightfold merged 1 commit into
mainfrom
agupta/datepicker-underline-order-independent
Jul 14, 2026
Merged

fix(DatePicker): make underline variant border override order-independent#1154
agupta-eightfold merged 1 commit into
mainfrom
agupta/datepicker-underline-order-independent

Conversation

@agupta-eightfold

@agupta-eightfold agupta-eightfold commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

SUMMARY:

Underline picker variant hides the box border via datepicker.module.scss .picker-underline { border-color: transparent }, which ties on specificity with .picker { border: ... } in Internal/ocpicker.module.scss — so the winner depends on the consuming app's CSS emission order, which webpack can flip on unrelated changes. When flipped, the box border reappears and clips the suffix calendar icon (seen on stage scheduling panel; QA unaffected on the same octuple version).

Fix: declare border-color: transparent in ocpicker.module.scss's own &-underline block — same-file order always puts it after the base rule, making the override bundler-order-proof. Covers DatePicker/TimePicker/RangePicker.

GITHUB ISSUE (Open Source Contributors)

N/A

JIRA TASK (Eightfold Employees Only):

TBD

CHANGE TYPE:

  • Bugfix Pull Request
  • Feature Pull Request

TEST COVERAGE:

  • Tests for this change already exist
  • I have added unittests for this change

TEST PLAN:

  1. Storybook: DatePicker/TimePicker/RangePicker with shape=underline, date selected — underline only, no box border, suffix icon fully visible. ✅
  2. Regression: rectangle/pill shapes keep their box border; jest suite green. ✅

🤖 Generated with Claude Code

@codesandbox-ci

codesandbox-ci Bot commented Jul 14, 2026

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

…dent

The underline variant relied on datepicker.module.scss's
.picker-underline { border-color: transparent } outranking the base
.picker { border: var(--picker-border) } from ocpicker.module.scss.
Both selectors have equal specificity, so the winner was decided by
CSS emission order in the consuming app's webpack build — which is
derived from the app-wide import graph and can flip on unrelated
changes (mini-css-extract conflicting-order resolution). When it
flips, the box border reappears around underline-sized content and
clips the suffix calendar icon.

Declare border-color: transparent inside ocpicker.module.scss's own
.picker-underline block, where same-file source order guarantees it
always follows the base .picker rule regardless of bundler ordering.
Covers DatePicker, TimePicker and RangePicker (shared internal styles).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@agupta-eightfold
agupta-eightfold force-pushed the agupta/datepicker-underline-order-independent branch from d41e015 to e915813 Compare July 14, 2026 10:24
@agupta-eightfold
agupta-eightfold merged commit 3e03f83 into main Jul 14, 2026
3 of 4 checks passed
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.01%. Comparing base (708a1d6) to head (e915813).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1154   +/-   ##
=======================================
  Coverage   85.00%   85.01%           
=======================================
  Files        1230     1230           
  Lines       21588    21588           
  Branches     8209     8209           
=======================================
+ Hits        18351    18352    +1     
+ Misses       3151     3150    -1     
  Partials       86       86           

☔ View full report in Codecov by Harness.
📢 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.

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.

1 participant