Skip to content
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

Merged
merged 18 commits into from
Aug 27, 2018
Merged

Calendar integration ui #3395

merged 18 commits into from
Aug 27, 2018

Conversation

yanas
Copy link
Member

@yanas yanas commented Aug 22, 2018

No description provided.

@@ -93,7 +93,7 @@ class NavigateSectionList extends Component<Props> {

return (
<SectionList
ListEmptyComponent = { renderListEmptyComponent }
ListEmptyComponent = { renderListEmptyComponent() }
Copy link
Contributor

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 = {
Copy link
Contributor

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
},
Copy link
Contributor

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';
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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);
Copy link
Contributor

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>
)
)
Copy link
Contributor

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>
Copy link
Contributor

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 }
Copy link
Contributor

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() }
Copy link
Member Author

@yanas yanas Aug 23, 2018

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.

Copy link
Contributor

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 }
Copy link
Member Author

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.

@yanas yanas changed the title [WiP] Calendar integration ui Calendar integration ui Aug 27, 2018
@yanas yanas merged commit f2cb15b into master Aug 27, 2018
@yanas yanas deleted the calendar-integration-ui branch August 27, 2018 22:05
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.

2 participants