Skip to content

Draft: Feat/paper v6 - #548

Open
iM-GeeKy wants to merge 55 commits into
masterfrom
feat/paper-v6
Open

iM-GeeKy wants to merge 55 commits into
masterfrom
feat/paper-v6

Conversation

@iM-GeeKy

@iM-GeeKy iM-GeeKy commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

Upgrade to React Native Paper 6.

Closes #549.

✨ What's new

📅 Date pickers

  • Docked date picker. DatePickerDocked is a 360dp calendar anchored to the field. DatePickerInput presentation is 'auto' (docked when both window sides are over 650, otherwise the modal), 'docked', or 'modal'.
  • Modal date input. DatePickerModalInput opens the typed-date view. mode is 'single' or 'range', and the calendar icon switches to the calendar. DatePickerModal can start there too with displayMode="input" ('calendar' stays the default).
  • Calendar modal. DatePickerModal mode is 'single', 'range', or 'multiple'. presentationStyle is 'overFullScreen' (default), 'pageSheet', or 'formSheet'.
  • Large-screen safe area. DatePickerModal no longer adds safe-area padding inside the centred card. Closes #546.

⚡ Performance

  • Month scrolling is O(1). The calendar mounts a fixed window of 13 months (the focused month ± 6). It used to mount every month in the valid year range, which is O(n) — 4,812 months for the default 1800–2200 span.

📦 Paper 6

📚 Docs and example

  • Updated docs. Install requirements, component pages, and a migration page. Live pickers point at the example site.
  • Example app. Restyled to match the docs site, and it hosts the live demos.

🛠️ Tooling and quality

  • New toolchain. Bun, Oxlint, Oxfmt, and Lefthook. All dependencies bumped to latest stable.
  • CI before release. Lint, tests, and the package build must pass.

@RichardLindhout Paper v6 is still in alpha so this shouldn't be merged yet, but it's right around the corner, so I performed the migration along with a lot of other things. I'd appreciate it if you just pull the project down and test it, change it, etc. I'm also not sure if this should be 0.25.0 or version 1.0 given the amount of changes.

Example

Web example at a large width (1280) and a small width (390).

Large · dark Large · light
Example app, large width, dark mode Example app, large width, light mode
Small · dark Small · light
Example app, small width, dark mode Example app, small width, light mode

Docked date picker

Large · dark Large · light
Docked date picker, large width, dark mode Docked date picker, large width, light mode
Small · dark Small · light
Docked date picker, small width, dark mode Docked date picker, small width, light mode

Modal date input

Large · dark Large · light
Modal date input, large width, dark mode Modal date input, large width, light mode
Small · dark Small · light
Modal date input, small width, dark mode Modal date input, small width, light mode

Range date input

Large · dark Large · light
Range date input, large width, dark mode Range date input, large width, light mode
Small · dark Small · light
Range date input, small width, dark mode Range date input, small width, light mode

iM-GeeKy and others added 23 commits November 15, 2026 10:59
The hover state sat flush against the month name. Padding the control keeps the label aligned with the calendar.

Co-authored-by: Cursor <cursoragent@cursor.com>
Give every file the same order for imports, types, constants, components, and styles, and share the web scrollbar styling.

Co-authored-by: Cursor <cursoragent@cursor.com>
Paper hides a placeholder while the label sits inside the field, so the expected format stayed invisible until focus.

Co-authored-by: Cursor <cursoragent@cursor.com>
Focus the field after the modal is shown and release it before close, so dismissing the dialog does not scroll back to the date pickers. Range headlines use a short month and day.

Co-authored-by: Cursor <cursoragent@cursor.com>
Give every example a Docs link so the matching picker page is one tap away.

Co-authored-by: Cursor <cursoragent@cursor.com>
Cover the remaining picker branches and drop checks the date parser cannot reach, so the suite reports 100% without warning noise.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
The example cards for those pickers were linking at the older input, single, and range guides.

Co-authored-by: Cursor <cursoragent@cursor.com>
Paint the vertical scrollbar on the dialog surface and keep weekday labels beside it, and resolve the month from the real scroll offset so a drag still shows days. Share the date input form and state layer, and cover the new paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
The docked picker and the typed-date fields each carried a second copy of the same logic, and the example screen mixed the demos with the site chrome.

Co-authored-by: Cursor <cursoragent@cursor.com>
Size the calendar for six week rows so months like January 2027 no longer scroll to reveal the last days. Give the docked month and year controls a rounded ripple target.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use the same rounded-square hover as the single date picker so the labels read as buttons and clear when the pointer leaves.

Co-authored-by: Cursor <cursoragent@cursor.com>
The weekday labels sat in a shorter row than the day cells, so the first row of numbers was tighter than the rows below it.

Co-authored-by: Cursor <cursoragent@cursor.com>
Move selection, month layout, and input masks into their own modules, register built-in locales from their entry points, and drop the fiber-walking coverage suites so the interaction tests stay in the normal typecheck.

Co-authored-by: Cursor <cursoragent@cursor.com>
Grow and shrink the card with the week's count so the actions stay against the last day row.

Co-authored-by: Cursor <cursoragent@cursor.com>
The year list was pinned to the month grid, so it stopped halfway down the screen.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Surface colors, card sizes, and header spacing follow the spec, weekday and period controls expose proper roles, and confirm stays disabled while a typed time is invalid.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keyboard time fields now show a translated error instead of an English accessibility hint, and phone sheets keep side insets while centered cards do not. Peers require React 19, React Native 0.78, and safe-area-context 5, and CI fails when coverage drops below the current suite.

Co-authored-by: Cursor <cursoragent@cursor.com>
Stop writing a generated version module when Metro starts, and reuse one external-link control across the example.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@RichardLindhout

Copy link
Copy Markdown
Member

Woah, looks great. Maybe we just do a pre-release and let our users test it out in their apps if they already have v6 they can try it and i guess it'll be soon they will release the v6 version?

@iM-GeeKy

iM-GeeKy commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator Author

It looks like paper will be moving from alpha to beta https://github.com/callstack/react-native-paper/milestone/26 and it's only 15% complete, so I'm not sure how long it will be honestly 🤷🏼‍♂️, but we can do a pre-release. Do we want this to be version 1.0 or 0.25? I'm leaning toward 1.0 as there are some pretty sweeping changes...

@RichardLindhout

Copy link
Copy Markdown
Member

1.0 prelease i guess. hmm maybe wait till they stabilize then. Users can fork based on this PR and comment on it i guess

@iM-GeeKy

iM-GeeKy commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator Author

I guess i'll wait and then we can release a 1.0 🤷🏼‍♂️. Let me know if you can think of anything else we might want to add/modify though. I tried my best to modernize a lot of it.

@RichardLindhout

Copy link
Copy Markdown
Member

Ok let's wait a bit. then probably

@RichardLindhout

Copy link
Copy Markdown
Member

Yeah the virtualizaton leyaer could probably be very optimized if we did our own kind of recyling like legendlist does than we don't have to calculate eveyr month height upfront. I believe this a big performance problem. Also hermes intl now finally got native and faster i believe so that should also make the library faster.

Maybe react compiler ready and we can remove all kind of dirty optimization we have to cache the callbacks and stuff but this is hard i blieve

@iM-GeeKy

Copy link
Copy Markdown
Collaborator Author

I can look into it and see what comes of it 👍🏻

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants