-
Notifications
You must be signed in to change notification settings - Fork 977
Modal/Popover update - migrate Modal/Popover to the RN's Modal #1615
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
Conversation
…sed on Popover (tooltip, select, overflowMenu, datepicker, autocomplete)
Try running it with Kitten Tricks |
Try running it with Kitten Tricks |
* }; | ||
* ``` | ||
*/ | ||
class ModalServiceType { |
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 we need this one as we are using react-native Modal?
visible?: boolean; | ||
shouldUseContainer?: boolean; | ||
children?: React.ReactNode; | ||
animationType?: 'none' | 'slide' | 'fade'; |
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.
Please extract to the type
animationType?: 'none' | 'slide' | 'fade'; | ||
onShow?: (event: NativeSyntheticEvent<any>) => void; | ||
supportedOrientations?: Array< | ||
'portrait' | 'portrait-upside-down' | 'landscape' | 'landscape-left' | 'landscape-right' |
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.
Please extract to the type
type PopoverModalProps = Overwrite<ModalProps, { | ||
children?: React.ReactElement; | ||
}>; | ||
}> & Pick<ModalProps, 'animationType' | 'hardwareAccelerated' | 'supportedOrientations' | 'onShow'>; |
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.
Please extract to the type
return fitsBottom(frame, other) && fitsLeft(frame, other) && fitsRight(frame, other); | ||
} | ||
}; | ||
static INNER: PopoverPlacement = new class implements PopoverPlacement { |
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.
It does makes sense to split this file into multiple
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 few comments, but looks good
Try running it with Kitten Tricks |
import { ThemeProviderProps } from '../theme/themeProvider.component'; | ||
import { ModalPanel } from '../modal/modalPanel.component'; | ||
// import { ModalPanel } from '../modal/modalPanel.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 don't this you want to leave this comment here :)
# Conflicts: # src/components/ui/menu/menuGroup.component.tsx
Try running it with Kitten Tricks |
# Conflicts: # package.json # src/components/devsupport/components/measure/measure.component.tsx # src/components/theme/application/applicationProvider.component.tsx # src/components/theme/modal/modal.service.tsx # src/components/theme/modal/modal.spec.tsx # src/components/theme/modal/modalPanel.component.tsx # src/components/ui/autocomplete/autocomplete.component.tsx # src/components/ui/autocomplete/autocomplete.spec.tsx # src/components/ui/datepicker/datepicker.spec.tsx # src/components/ui/datepicker/rangeDatepicker.spec.tsx # src/components/ui/menu/menuGroup.component.tsx # src/components/ui/modal/modal.component.tsx # src/components/ui/modal/modal.spec.tsx # src/components/ui/overflowMenu/overflowMenu.component.tsx # src/components/ui/popover/popover.component.tsx # src/components/ui/popover/popover.spec.tsx # src/components/ui/select/select.spec.tsx # src/components/ui/tab/tab.spec.tsx # src/components/ui/tooltip/tooltip.component.tsx # yarn.lock
…rlays-update # Conflicts: # src/components/ui/tab/tab.spec.tsx
> | ||
{this.props.anchor()} | ||
</MeasureElement> | ||
<View> |
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.
Why did you add this View
component. It adds additional wrapper which broke some ui.
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.
@sayres @malashkevich please check my comment
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.
maybe there is should be Fragment
?
Please read and mark the following check list before creating a pull request:
Short description of what this resolves:
Modal and Popover components moved to RN's Modal component implementation