Repository navigation
Update date picker to allow typing in dates - #101454
Krishna2323 wants to merge 98 commits into
Conversation
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
…calendar on focus Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
…gment Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
…rolls Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
…te field Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx bun ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
🚧 dubielzyk-expensify has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
BUG#2: When a highlighted date segment try to cut using RF-2.webm |
|
BUG#3: The cursor cannot move between individual digits using the arrow keys, whereas in the latest main branch, it moves between digits one by one. RF-3.webm |
It doesn't seem to be fixed yet. RF-4.webm |
|
@Krishna2323, could you please take a look at the above bugs reported. thanks. |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
…the committed date Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
@marufsharifi Fixed two issues and one needs a discussion. BUG#2 (Cmd+X): Fixed. Cutting a single segment wasn't handled, so the field restored the old value. BUG#3 (arrow keys): Intentional. Arrows move between segments, like a native date input. Autocomplete: Fixed. After deleting a digit, the incomplete date wasn't committed. Picking the same date again didn't trigger an update. The calendar now notifies the segments even when the value stays the same. BUG#1 (calendar/input sync): This also reproduces on main, so I don't think it belongs in this PR. The calendar clamps its view to |
|
I've been testing this today. but i will complete my review tomorrow. thanks. |
|
@Krishna2323, could you please merge the main. thanks. |
@Krishna2323 based on what you have said here
This seems to be a regression: #101454 could you please take another look at both issues. thanks. |
This doesn't seems to be fixed yet. RF-1.webm |
|
BUG#1: Pressing RF-2.webm |
|
BUG#2: When the user deletes the last digit of the year in the input field and then resizes the browser to a smaller screen size, the year automatically reverts to its previous value. RF-3.webm |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
…elected segment Signed-off-by: krishna2323 <belivethatkg@gmail.com>
…he Delete key Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
The date field refuses to commit an entry it cannot read, so the error reaches the form from the input rather than from a value the form could validate. That path had no tests: the confirmation list's dateInvalid branch, the effect that clears the error once the entry reads as a date again, and FormProvider's merge of input reported errors, including which error wins when the page has a rule of its own. The calendar's inbound viewDate catch-up is what makes it follow a date being typed, and the count that carries each request is what lets the same month be asked for twice. Both are covered now, along with holding a month or year pick to the dates the calendar offers. Signed-off-by: krishna2323 <belivethatkg@gmail.com>
The hook owns focus movement, overwrite on arrival, the undo and redo stacks, copying and cutting across separate inputs, settling a half typed segment on blur, and the counted requests that keep the calendar in step. The pure helpers under it were already covered, but those are the part least likely to regress. Each segment is given a stand-in for its input, so which segment the caret moved to and what the browser has selected inside one are both readable without rendering the field. Signed-off-by: krishna2323 <belivethatkg@gmail.com>
…r one The required error, the error the field reports for an entry it could not read, and the two guards that keep either from being saved were written out in both pages that ask for a transaction start date. They now ask a hook instead, which is also where they are tested, rather than the same guard being covered three times over or not at all. The pages keep their own layout. One is a step in a flow with a loading state and a Next button, the other a settings page, and the date they mean by starting from the beginning differs, so a shared component would carry more switches than the duplication costs. Signed-off-by: krishna2323 <belivethatkg@gmail.com>
The calendar stays attached to the field while the page scrolls, and a month or year picker opened from inside it answers escape itself. Both are guards on shared popover code, and a regression in either would show up as the calendar vanishing mid edit. An overlay-free popover in a narrow pane is the other half of that, since the calendar has to sit beside a field in a right hand pane while still becoming a full modal on a small screen. Jest resolves the native variant of both components, which has none of these listeners, so the tests ask for the web one by the same route other tests use to ask for the native one. Signed-off-by: krishna2323 <belivethatkg@gmail.com>
…date end to end Each segment is its own input, so the field only counts as left once focus lands outside all three. The space beside the date holds no text, so a repeated click there stands in for the word or the line a text field would have selected. The typing itself is covered through the field rather than through the hook alone: a whole date reaching the form, a half written one withheld, the digits showing as they are typed, the calendar opening on the first of them, and a date outside the offered range reporting an error. Typing is only offered without a touch screen and with room beside the field, so both are mocked the way the numeric input's tests already mock the first. Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
@marufsharifi all the comments/issues are handled, ready for review again. |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>

Explanation of Change
Fixed Issues
$ #101117
PROPOSAL:
Tests
Prereqs: Any account. Desktop Chrome and Safari, plus one touch device (mWeb or native).
Offline tests
QA Steps
Same as tests
Verify that no errors appear in the JS console
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
web_chrome.mp4