Skip to content

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 146 commits into from
Apr 19, 2023
Merged

Feat/calendar #2503

merged 146 commits into from
Apr 19, 2023

Conversation

Inbal-Tish
Copy link
Collaborator

Description

Calendar - adding functionality to phase 0

Changelog

Calendar - adding functionality to phase 0

@Inbal-Tish Inbal-Tish requested a review from ethanshar April 19, 2023 10:35
@ethanshar ethanshar merged commit 48c3bf2 into master 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>
@Inbal-Tish Inbal-Tish deleted the feat/Calendar branch June 13, 2023 08:42
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.

3 participants