-
Notifications
You must be signed in to change notification settings - Fork 734
Feat/calendar #2503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Feat/calendar #2503
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…point (other then today)
ethanshar
approved these changes
Apr 19, 2023
lidord-wix
pushed a commit
that referenced
this pull request
May 15, 2023
* Initial creation of new calendar component * Push typings * render initial components for example screen * Add DateUtils with stubs * Add tests for DateUtils * Add stub implementation to getDaysOfWeekNumber * Day - render day from date * Basic implementation of getWeekNumbersOfMonth * Install date-fns * Basic implementation of Month * Add Week * Fix Month component * Change to millis * Add key to week * Fix hardcoded month value we pass to Month component * Add test for invalid month * Render header in calendar item * Header - render header * fix CalendarItem render * Create getDaysOfWeekNumber and dependencies * radability * Add context provider and change firstDayOfWeek to enum * Add date and setDate to context * Add getDateObject worklet * Fix calendar context types and add initialDate prop * Basic Agenda * Header - add months by presing arrow buttons * Add TODOs * Move FirstDayOfWeek from enum to enum+union and fix tests * MILLIS to MS * Add mock data (script still needs work) and link (types need work) * Fix script and types * addMonth - use Date's setMonth function * Moving 'firstDayOfWeek' to be enum * WeekDaysNames - adding new component to Header * add ts notes * update comment for ts version ^4.3.2 * Set WeekDaysNames format in Header * use FirstDayOfWeek enum * use 'DayNamesFormat' enum * remove console * Day - adding onPress Adding style.ts file Calendar - pass date to calendatItem * add todo * Minor fixes and remove todos * Change context's date to selectedDate * remove style file * valueOf to getTime * export Event * Day - adding selection * Wrap CalendarItem with FlashList * Agenda - add headers + scroll on date change * Agenda - set date on scroll * Fix mock and script * UI touchups * sort imports and add test for 'getMonthForIndex' and adding tests to 'isSameDay' * Header - small ui changes * Context - adding 'showWeeksNumbers' * fix indentation * margin * Add TODOs * Add flex to day * Day - mark today * Fix FirstDayOfWeek enum and add update sources * Adding UpdateSource to setDate calls * Implement setDate to store lastUpdateSource * dateutils - adding 'isSameMonth' * Add estimatedItemSize prop to FlashLists * Update mock data * Fix TS errors * Context - add updateSource * fix screen errors * fix updateSource on Context * fix type * Calendar - add scrollToIndex on selectedDate change * Agenda - verify update source and use isSameDay * Calendar - fix scrollToIndex * Agenda initial index * isSameMonth - support MonthProps type for params * remove synchronous calls to isNumber from a worklet * Calendar - add setDate on calendar scroll (by user) to the first of the month * Fix getWeekNumbersOfMonth and add missing tests * Fix typing issues * fix scrolledByUser.value * Calendar - fix scrolledByUser * merge fix * shush ts wrannings * Add todos * DateUtils - add 'getNormalizedDate' function * Change week numbering from ISO to default Change week numbering to use "default" (Jan 1st) and not ISO (Jan 4th) * DateUtils - adding 'isToday' and 'isPastDate' * adding assets * Agenda - fixed height for items and initialScrollIndex * TodayButton * Update calendars mock data * Adding 'staticHeader' prop to calendar and passing it on context * Fix lint * HeaderHeight to context * Utils - use JS Date only inside utils (not as a parameter nor return type) and fix tests to use our inner utils * Fix tests and remove getNormalizedDate * fix lint * Calendar - setDate when 'initialDate' prop changes * Header - fix arrows * fix margins * DateUtils - add 'getTimestamp' from DateObject * fix extra days text color * Adding 'showExtraDays' prop (currently only controls the text color) * re export calendar in incubator * Use useDidUpdate for setDate coming from props change * Fix Android item scroll * Day - fix extra days * hide extraDays * Day - fix inactive date selected * fix CalendatItem default height * Day - fix today background when inactive * Header - arrow press - set day to be the first of the month * demo screen - comment out unused * CalendarProcessor - add past and future range and pass date as start point (other then today) * DateUtils - add 'addYears' to a given date * Day - sync color and backgroundColor animations * Calendar - add infinite scroll * move addPages up * minor changes * Simple POC for scrollable list with native interactions * Add basic implementation of mock server * Add mini example of AgendaList with animated scroll handler * revert playgroundScren changes * fix callback * typo * UpdateSource should not be optional or undefined --------- Co-authored-by: Ethan Sharabi <1780255+ethanshar@users.noreply.github.com> Co-authored-by: M-i-k-e-l <michaelle@wix.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Calendar - adding functionality to phase 0
Changelog
Calendar - adding functionality to phase 0