Skip to content

Release v2.6.0#78

Merged
troberts-28 merged 7 commits intomainfrom
release/v2.6.0
Feb 25, 2026
Merged

Release v2.6.0#78
troberts-28 merged 7 commits intomainfrom
release/v2.6.0

Conversation

@troberts-28
Copy link
Owner

@troberts-28 troberts-28 commented Feb 25, 2026

Release v2.6.0


Note

Medium Risk
Touches core picker layout and modal sizing logic, so regressions are possible across different font sizes, max values, and column visibility configurations; changes are otherwise contained to UI/styling behavior.

Overview
Adds new style controls for layout. TimerPicker/TimerPickerModal now support styles.pickerLabelGap (pixel spacing between number column and label, per-column or global) and styles.pickerColumnWidth (fixed column widths, per-column or global), replacing the old percentage-based labelOffsetPercentage (now deprecated with new warnings).

Updates internal layout/positioning to use the new system. Label and AM/PM positioning is computed from font size and max digit width, and TimerPickerModal now auto-sizes its content width based on visible columns and configured widths.

Docs/examples are updated to demonstrate the new styling options, examples tweak scroll indicator visibility, and the repo adds lint-staged + simple-git-hooks pre-commit formatting/linting with a version bump to 2.6.0.

Written by Cursor Bugbot for commit 57dccde. This will update automatically on new commits. Configure here.

@troberts-28 troberts-28 merged commit e65cf57 into main Feb 25, 2026
1 check passed
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 5 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on March 23

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

"format": "prettier --check ./src ./examples",
"format:fix": "prettier --write ./src ./examples",
"prepare": "yarn build"
"prepare": "simple-git-hooks"
Copy link

Choose a reason for hiding this comment

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

Prepare script no longer builds package

High Severity

The prepare script was changed from yarn build to simple-git-hooks. The prepare script runs on yarn install / npm install, so the package no longer builds automatically. After cloning and running yarn install, the dist/ folder will not exist, and the examples (and any devs importing the package) will fail because main points to dist/commonjs/index.js.

Fix in Cursor Fix in Web

top: 0,
// Only apply percentage-based left when using legacy positioning.
// The new pixel-based positioning is applied per-column in PickerItem.
...(useLegacyLabelPosition ? { left: `${labelOffsetPercentage}%` } : undefined),
Copy link

Choose a reason for hiding this comment

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

pickerLabelContainer incorrectly spread into pickerAmPmContainer

Medium Severity

pickerAmPmContainer spreads customStyles?.pickerLabelContainer before customStyles?.pickerAmPmContainer. pickerLabelContainer is meant for the column labels (e.g. h, m, s) and pickerAmPmContainer for the AM/PM indicator. Applying pickerLabelContainer to pickerAmPmContainer causes user overrides for the column labels to wrongly affect the AM/PM positioning and layout.

Fix in Cursor Fix in Web

const computedWidth = Math.max(
DEFAULT_COLUMN_WIDTH * 2,
totalColumnWidth + modalPadding * 2 + labelOverhang
);
Copy link

Choose a reason for hiding this comment

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

paddingHorizontal string yields NaN computed width

Medium Severity

modalPadding casts customContentContainerStyle?.paddingHorizontal to number, but React Native paddingHorizontal can be a string (e.g. "10%"). When a string is used, modalPadding * 2 becomes NaN, so computedWidth is NaN and the modal content container gets an invalid width, breaking layout.

Fix in Cursor Fix in Web

pointerEvents={isDisabled ? "none" : undefined}
style={[
styles.durationScrollFlatListContainer,
pickerColumnWidth != null && { flex: 0, width: pickerColumnWidth },
Copy link

Choose a reason for hiding this comment

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

pickerColumnWidth zero creates zero-width column

Low Severity

When pickerColumnWidth is 0 (or a per-column object with 0 for a column), the condition pickerColumnWidth != null is true, so { flex: 0, width: 0 } is applied and the column gets zero width, making it effectively invisible.

Fix in Cursor Fix in Web

return pickerColumnWidth;
}

return pickerColumnWidth[column] ?? DEFAULT_COLUMN_WIDTH;
Copy link

Choose a reason for hiding this comment

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

resolveColumnWidth returns non-numbers causing string concatenation in width

Medium Severity

resolveColumnWidth returns pickerColumnWidth[column] ?? DEFAULT_COLUMN_WIDTH without validating that the value is a number. When a per-column object contains a string (e.g. from JSON or form input), the return value is a string. The subsequent totalColumnWidth sum uses +, so numeric and string operands trigger string concatenation instead of addition, producing a wrong total and thus an incorrect or huge computedWidth.

Fix in Cursor Fix in Web

@troberts-28 troberts-28 deleted the release/v2.6.0 branch February 26, 2026 08:53
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