-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Calendar integration ui #3395
Calendar integration ui #3395
Conversation
@@ -93,7 +93,7 @@ class NavigateSectionList extends Component<Props> { | |||
|
|||
return ( | |||
<SectionList | |||
ListEmptyComponent = { renderListEmptyComponent } | |||
ListEmptyComponent = { renderListEmptyComponent() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this change necessary? SectionList doc says ListEmptyComponent can be a render function.
@@ -6,17 +6,32 @@ import Container from './Container'; | |||
import Text from './Text'; | |||
import type { Item } from '../../Types'; | |||
|
|||
type Props = { | |||
export type Props = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the export necessary? I may be missing where it's being used outside of this file.
label: t('welcomepage.calendar'), | ||
content: CalendarList ? <CalendarList /> : null, | ||
defaultSelected: true | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Atlaskit tabs automatically hides the tab if it has no content?
@@ -1,3 +1,3 @@ | |||
export { default as ConferenceNotification } from './ConferenceNotification'; | |||
export { default as MeetingList } from './MeetingList'; | |||
export { default as CalendarList } from './CalendarList'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotta remove MeetingList.web.js.
@@ -0,0 +1,126 @@ | |||
// @flow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this file a copy/paste from MeetingList with no changes?
const { disabled } = this.props; | ||
|
||
return ( | ||
AbstractCalendarList |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't abstract classes normally extended?
= createSection(t('calendarSync.today'), TODAY_SECTION); | ||
const sectionMap = new Map(); | ||
|
||
sectionMap.set(TODAY_SECTION, todaySection); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this means sections will always have a length of at least 1, which means SectionList will never show ListEmptyComponent.
}) } | ||
</Container> | ||
) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A loading icon somewhere would be nice. It can take 2+ seconds for the calendar data to load.
@@ -68,6 +85,7 @@ export default class NavigateSectionListItem extends Component<Props> { | |||
className = 'navigate-section-tile-body'> | |||
{ duration } | |||
</Text> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is NavigateSectionListItem specifically for calendar entries or do you know if it was intended to be something more general? It's markup makes it look like it was specific for calendar entries.
@@ -68,6 +85,7 @@ export default class NavigateSectionListItem extends Component<Props> { | |||
className = 'navigate-section-tile-body'> | |||
{ duration } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know much about the data here and why an array is used with assumption about what each index in the array stands for? It looks like index 0 might be meeting url but the variable name is date. Index 1 might be data but the variable name is duration.
@@ -93,7 +93,7 @@ class NavigateSectionList extends Component<Props> { | |||
|
|||
return ( | |||
<SectionList | |||
ListEmptyComponent = { renderListEmptyComponent() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was fixing an issue and was intentional. With the change below the case of disconnected calendar doesn't work anymore, so I reverted this change.
The problem basically is that NavigateSectionList expects a function, while SectionList expects a Component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a fix I'm working on for it now, which should try to fix the empty component never displaying. It seems like it worked on native because it was calling _getRenderListEmptyComponent() in the calendarlist instead of passing in _getRenderListEmptyComponent.
{ duration } | ||
</Text> | ||
</Container> | ||
{ elementAfter || null } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we add the elementAfter, as a completely constructed element, then we don't need the action props I've added previously. I'm going to remove them.
No description provided.