callstack / callstack/react-native-paper

Cannot increase Button label's font size without throwing off labels vertical alignment

Ouverte
#4,695 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug
Langage dominant
TypeScript
Étoiles
14.5k
Forks
2.2k
Merge moyen
5 j 23 h
PR mergées (30 j)
12

Description

### Current behaviour
The button labels font size doesn't scale for large devices, you have a tiny label that looks unlike anything else on the screen... you can't increase the font size or the vertical alignment of the label is lost.
We tried patching this ourselves but the button itself is coded like a complete rats nest, full of magic numbers and strange floating views layed on top of other views. Why this is needed for a button that still doesn't work remains a mystery but perhaps the framework designers can figure it out.

Adjusting the button height does nothing to fix the vertical alignment either.
Ideally we'd like to be able to increase the button height AND increase the font size, but we could live with thin frail buttons if their labels just looked semi-normal.

We'd even settle for react-native-paper resizing the label itself, and providing a simple size prop i.e. "large" | "medium" | "small". Really we'd be okay with anything better than what we currently have.

![Image](https://github.com/user-attachments/assets/94ea8b15-3730-4ee5-a44a-57f9dc01720e)

As of now we're not even using react-native-paper's buttons since they make the entire app look sloppily done on any large device. Which these days is most devices. But this means we now have 2 UI frameworks installed, one for a simple button and the other for everything else.

### Expected behaviour
Just a simple button that looks normal on different devices.

### How to reproduce?
Create any project and add a button to it. Try making it look normal on large devices. You can't.

### What have you tried so far?
It's not my job to provide basic functionality

### Your Environment
It's not an environment problem.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Reproduisez le problème en créant un projet, en ajoutant un bouton react-native-paper et en testant des modifications de la taille de police du libellé et de la hauteur du bouton sur un appareil de grande taille. L’issue ne mentionne aucun fichier source ni aucun test ; le travail est terminé lorsque le libellé du bouton reste aligné verticalement, tandis que le bouton et le libellé peuvent être redimensionnés sur différents appareils.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
react-native
Domaine
frontend, mobile
Type d'issue
Bug
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.