react-native-paper
react-native-paper copied to clipboard
"What do you dislike about React Native Paper?" November 2019 Edition
We, the React Native Paper core team, would like to get a current list of all the things that people are having problems with when using React Native Paper. This is first time we are running this community feedback gathering initiative, but we are planning to do it cyclically - twice a year. We hope this will help us better understand our users and prioritize the work for the upcoming 2020 year.
Please reply with all the issues that you are having with React Native Paper. Keep your descriptions short and ideally link to other places with more context. Feel free to mention not just technical things but rather any issue that can be ascribed to the React Native Paper project.
If something has been mentioned already, please use the upvote/emoji buttons instead of repeating the same thing so that it's easier to see how many people care about each issue. Please make one comment per topic so that people can upvote just one thing at a time.
Hypothetical Example:
Some of the animations are not native
That would be really nice if js based animations (e.g. Checkbox or RadioButton) were replaced with native ones. Please consider reimplementing animations with reanimated for better performance.
Simple template with header (feel free to copy and paste)
## Header
### Content
Dropdown/Select Component
Content
I'd love to see a select component from this lib.
Stabilized Components
Content
I've had a rough time getting Menu components (Menu, MenuItem, etc) to properly work. I will file a bug report in the issue tracker but I've had the following happen:
- The Menu briefly appears (< 1s) and then disappears.
- The Menu doesn't seem to exist on top of UI, despite how large my
zIndex
value is. - When it does appear, it doesn't want to play nicely in it's own space. I've had occasions where the Menu appears in a very different position on the screen. Though, I've mainly been developing with iPad so I'm not sure if that has great support yet or not. If it doesn't, supporting multiple sized devices as far as position would be very nice.
Theming
Content
I'd love better theming options. For example, I'd love to do:
<Button color="primary">Primary</Button>
<Button color="secondary">Secondary</Button>
instead of:
<Button color="#000">Primary</Button>
<Button color="#fff">Secondary</Button>
Customization
Content
I'd like more customization e.g. 'View' as title
<List.Accordion
title={titleProps => (
<View style={{ flexDirection: "row" }}>
<Text style={titleProps.style} numberOfLines={4}>
Nice text
</Text>
<TouchableRipple>
<Text>Edit</Text>
</TouchableRipple>
</View>
)}
/>
Now I end up with forking react-native-paper to make some things possible.
https://github.com/callstack/react-native-paper/issues/993 ->
https://github.com/profects/react-native-paper/blob/a18bdcd961e0aa596ed9355cdd0726c4c43e815a/src/components/Menu/MenuItem.tsx
https://github.com/profects/react-native-paper/blob/a18bdcd961e0aa596ed9355cdd0726c4c43e815a/src/components/List/ListAccordionRenderer.tsx
I would love to be able to install individual components without importing the entire library.
I would love to be able to install individual components without importing the entire library.
We have a babel plugin that removes not used components from bundle. Check this
Just like there is an error prop in TextInput button that changes the border of the TextInput to red, I would like that there be another success prop that would change the border to green or any colour that I pass. It will make it more flexible. Currently, we've found that the way to change border colour of TextInput is through the theme
's color
's placeholderColor
property, which is very weird.
More than the success prop, we would like to control the borderColor
of the TextInputs.
I would like to see a Date and Time Picker Component in this library, which will be compatible on both ios and android platform. It will be very helpful.
I would like to be able to import <Icon/>
from react-native-paper
Instead of
import Icon from 'react-native-vector-icons/MaterialCommunityIcons'
I could just
import { Icon } from 'react-native-paper'
More components, a slider for example! :) Maybe a Grid?
Typescript suggestions for icon names
If you give an icon an invalid name, you get an error telling you all of the available icon names:
<Button icon="some-inexistent-name"></Button>
// Invalid prop `name` of value `some-inexistent-name` supplied to `Icon`
It would be useful if the icon
prop had Typescript suggestions with the available names.
Also, in the error message, it would be useful to add a link to a website that has the available icon names.
Extra
Content
Add auxiliary components. For example, keyboard management, theme change, or self-organizing picture component depending on width or height.
-
<AutoSizeImage width={120} or height={120} />
flexible image component or useGetImageSize(uri) - use(Keyboard,Theme,Statusbar,Dimensions,...)
- BottomSheet
- Collapse Effect
Non-component Snackbar like react-native-snackbar
Custom Picker
@Trancever Yeah! It's awesome but sometimes I want the option of calling it like Snackbar.show(Message)
instead of <Snackbar>Message</Snackbar>
I would like to see component Theme overrides to execute in a central spot, like in @material-ui instead of having to create local versions.
@usmansbk that sounds more like program flow. You could implement this using AppContent or redux.
Dropdown/Select Component
Content
I'd love to see a select component from this lib. I know a request for a drowdown component has already been posted but i wanted to expand a bit on this...
I would like to call out the dropdown/select component from the react material-ui library for guidance. This is all written in js and is still smooth! (https://material-ui.com/components/selects/)
@iamclaytonray @jstansbe Could you point me to the Material Design Guidelines page that describes a select component for Android?
@Trancever I think there is no specific guideline how to make "select" component, it's more like extension of the "menu" component, which is called "Exposed dropdown menus": https://material.io/components/menus/#exposed-dropdown-menu
There are though guidelines for pickers: https://material.io/components/pickers/#mobile-pickers Would be nice to have them here as well :)
And maybe sliders? https://material.io/components/sliders/
@zufarzhan You should be able to implement "Exposed dropdown menu" with Menu
component easily. Just use TextInput wrapped with Touchable as an anchor and add some margin/padding to the menu to move it below TextInput. We don't really want to implement all possible cases in this lib. We want to provide building blocks that users can use to build more complex UI.
@Trancever @zufarzhan I've used the menu component with the text input to create what you're describing... and it does work. But isn't this the equivalent to <List.Icon /> or <Card.Actions />? The user could easily combine a list item and icon just fine, but the value comes from react-native-paper's application of material guidelines. There is a ton of value in creating a dropdown (text input + menu)... this is also a component that is missing from other notable UI libraries and would help differentiate rnp from them. I'm not really aware of rnp's goals though, so maybe some of these points are irrelevant.
Also, If it helps I can work on submitting a starting point (or work on the component throughout the conception=>release process).
Can we limit these convos or bring them elsewhere? The RFC is going to get muddied up with convos vs clear points that the community wants. (Plus, I'm getting spammed with emails for an issue I want to subscribe to but not so much on side conversations)
[Typescript] Some component prop types are not exported
I would like to extend TextInput
. To do so, I need the prop type, TextInputProp
. As of today, I have to import the types like this:
import { TextInputProps } from 'react-native-paper/lib/typescript/src/components/TextInput/TextInput'
This is very unsatisfying, because this path could change at any time and depends on your build logic. A tool such as api-extractor
would rightfully forbid you from not exporting indirect types, as it undermines the clear identification of your library API surface and prevent users from easily extending core features.
Component props are obviously part of the API surface, and as such must be exported.
One of the things I like about material-ui, is that the components are aggregated from sub components and these sub components are easily customizable. Since RN doesn't have the kind of style selectors available to style children '.TextInput > .MuiFormLabel-root'
with all sorts of specificity possible.
It would make sense to me to expose these sub container style objects on the api so you can optionally override this. It's kind of an ugly solution though. I guess the overriding theme of my suggestions is: make it possible to easily deviate from default Material Design.
Have text input adornments to represent states other than error, like success state or warning, etc. Something like this:
because of this https://github.com/callstack/react-native-paper/pull/1061
To Have textinput icon buttons....like password show hide
Add suffix, prefix, leading and trailing Icon to TextInput https://github.com/callstack/react-native-paper/issues/903
@zufarzhan You should be able to implement "Exposed dropdown menu" with
Menu
component easily. Just use TextInput wrapped with Touchable as an anchor and add some margin/padding to the menu to move it below TextInput. We don't really want to implement all possible cases in this lib. We want to provide building blocks that users can use to build more complex UI.
An example of this implementation would be very helpful. Tried wrapping TextInput
with a TouchableWithoutFeedback
, but the TextInput
gets focused and onPress
event does not fire.