Conversation
Feat/improve styling options
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
| 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), |
There was a problem hiding this comment.
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.
| const computedWidth = Math.max( | ||
| DEFAULT_COLUMN_WIDTH * 2, | ||
| totalColumnWidth + modalPadding * 2 + labelOverhang | ||
| ); |
There was a problem hiding this comment.
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.
| pointerEvents={isDisabled ? "none" : undefined} | ||
| style={[ | ||
| styles.durationScrollFlatListContainer, | ||
| pickerColumnWidth != null && { flex: 0, width: pickerColumnWidth }, |
There was a problem hiding this comment.
| return pickerColumnWidth; | ||
| } | ||
|
|
||
| return pickerColumnWidth[column] ?? DEFAULT_COLUMN_WIDTH; |
There was a problem hiding this comment.
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.


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/TimerPickerModalnow supportstyles.pickerLabelGap(pixel spacing between number column and label, per-column or global) andstyles.pickerColumnWidth(fixed column widths, per-column or global), replacing the old percentage-basedlabelOffsetPercentage(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
TimerPickerModalnow 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-hookspre-commit formatting/linting with a version bump to2.6.0.Written by Cursor Bugbot for commit 57dccde. This will update automatically on new commits. Configure here.