react-native-paper icon indicating copy to clipboard operation
react-native-paper copied to clipboard

"What do you dislike about React Native Paper?" November 2019 Edition

Open Trancever opened this issue 5 years ago • 149 comments

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

Trancever avatar Nov 26 '19 11:11 Trancever

Dropdown/Select Component

Content

I'd love to see a select component from this lib.

iamclaytonray avatar Nov 26 '19 15:11 iamclaytonray

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:

  1. The Menu briefly appears (< 1s) and then disappears.
  2. The Menu doesn't seem to exist on top of UI, despite how large my zIndex value is.
  3. 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.

iamclaytonray avatar Nov 26 '19 15:11 iamclaytonray

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>

iamclaytonray avatar Nov 26 '19 17:11 iamclaytonray

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 Schermafbeelding 2019-11-26 om 22 29 51

https://github.com/profects/react-native-paper/blob/a18bdcd961e0aa596ed9355cdd0726c4c43e815a/src/components/List/ListAccordionRenderer.tsx Schermafbeelding 2019-11-26 om 22 26 49

RichardLindhout avatar Nov 26 '19 21:11 RichardLindhout

I would love to be able to install individual components without importing the entire library.

harrisrobin avatar Nov 26 '19 22:11 harrisrobin

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

Trancever avatar Nov 27 '19 07:11 Trancever

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.

BalalRaza avatar Nov 28 '19 12:11 BalalRaza

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.

ravics09 avatar Nov 29 '19 05:11 ravics09

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'

jayu avatar Nov 29 '19 08:11 jayu

More components, a slider for example! :) Maybe a Grid?

jonasgroendahl avatar Nov 29 '19 14:11 jonasgroendahl

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`

Screen Shot 2019-11-14 at 9 19 30 PM

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.

nandorojo avatar Nov 29 '19 18:11 nandorojo

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

meftunca avatar Dec 02 '19 01:12 meftunca

Non-component Snackbar like react-native-snackbar Custom Picker

usmansbk avatar Dec 02 '19 11:12 usmansbk

Non-component Snackbar like react-native-snackbar

Check the docs. We do have a Snackbar component.

Trancever avatar Dec 02 '19 12:12 Trancever

@Trancever Yeah! It's awesome but sometimes I want the option of calling it like Snackbar.show(Message) instead of <Snackbar>Message</Snackbar>

usmansbk avatar Dec 02 '19 12:12 usmansbk

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.

mschipperheyn avatar Dec 02 '19 17:12 mschipperheyn

@usmansbk that sounds more like program flow. You could implement this using AppContent or redux.

mschipperheyn avatar Dec 02 '19 17:12 mschipperheyn

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/)

jstansbe avatar Dec 02 '19 18:12 jstansbe

@iamclaytonray @jstansbe Could you point me to the Material Design Guidelines page that describes a select component for Android?

Trancever avatar Dec 03 '19 09:12 Trancever

@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 avatar Dec 03 '19 11:12 zufarzhan

@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 avatar Dec 03 '19 15:12 Trancever

@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).

jstansbe avatar Dec 03 '19 17:12 jstansbe

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)

iamclaytonray avatar Dec 03 '19 17:12 iamclaytonray

[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.

jsamr avatar Dec 05 '19 13:12 jsamr

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.

mschipperheyn avatar Dec 05 '19 16:12 mschipperheyn

Have text input adornments to represent states other than error, like success state or warning, etc. Something like this: image

BalalRaza avatar Dec 06 '19 07:12 BalalRaza

because of this https://github.com/callstack/react-native-paper/pull/1061

x5engine avatar Dec 10 '19 08:12 x5engine

To Have textinput icon buttons....like password show hide

deep810 avatar Dec 10 '19 09:12 deep810

Add suffix, prefix, leading and trailing Icon to TextInput https://github.com/callstack/react-native-paper/issues/903

image

firede avatar Dec 10 '19 22:12 firede

@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.

mikedizon avatar Dec 11 '19 02:12 mikedizon