Refactor function or property names #31
Labels
enhancement
New feature or request
help wanted
Extra attention is needed
question
Further information is requested
common
acc
will be named as{type}Acc
item
will be named as{type}
utils.js
getFormattedDate(date, format)
toformatDate(date, format)
getCurrentMonth(date)
will be removed by lintgenDayOfWeek(DayOfWeekString)
togenDateBlock(dayOW)
, which dayOW means dayOfWeekstr2numberString
ingenDayOfWeek
todayOWMap
genTimeBlock(dayOfWeek, hours, minutes)
togenTimeBlock(dayOW, hours, minutes)
addColor(events)
toassignColor(events)
hashString(s)
will be removed by lintcolorGenerator(num)
topickColor(idx)
,color_list
tocolorList
TimeTableView.js
numberOfDays
tonDays
formatDateHeader
todateHeaderFormat
selectedDate
andpivotDate
should be fixed and lintedcurrentMoment
tocurrentDate
generateTimes(pivotTime, endPivotTime)
togenTimes(pivotTime, endPivotTime)
or better syntaxHeader.js
getFontSizeHeader(numberOfDays)
toheaderFontSize(nDays)
getDayTextStyles(numberOfDays)
todayTextStyle(nDays)
getColumns(numberOfDays, selectedDate)
todatesFrom...(nDays, ...)
Columns({ columns, numberOfDays, format})
toDaysHeader({ dates, nDays, format })
and removeColumn
Component.Title
role seems to be speicifed. It is empty.numberOfDays
tonDays
selectedDate
to...
formatDate
todateFormat
Events.js
Events
toEventTable
getEventsByNumberOfDays(numberOfDays, events, selectedDate)
tocatEventsByDays(nDays, events, ...)
getStyleForEvent(item)
tocalcEventStyle(event)
getEventsWithPosition(totalEvents)
toadjustEventStyle(allEvents)
getEventItemWidth
; change as const (if hooks)sortEventByDates(events)
tosortEventsByDate(events)
numberOfDays
tonDays
selectedDate
to...
Event.js
selectedDate
TimeTableView
is saving propspivotDate
to statecurrentMoment
. And inUNSAFE_componentWillReceiveProps
, it updatescurrentMoment
as undocumented propsselectedDate
. AndcurrentMoment
is injected to child components. Will there be scenarios usingselectedDate
? In my current view, we could just remove that state and just usepivotDate
, renaming allselectedDate
items topivotDate
.Extra alert
Please feel free to comment for discussion, related to above items.
The text was updated successfully, but these errors were encountered: