callstack / callstack/react-native-paper

M3 FAB shadow clipped by Android navbar

Aperta
#3,957 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
bug FAB
Lingua principale
TypeScript
Stelle
14.5k
Fork
2.2k
Merge medio
5g 23h
PR unite (30g)
12

Descrizione

### Current behaviour

The elevated `FAB` shadow is clipped by the Android navbar when positioned in the bottom right of the screen as per [M3 FAB layout specs](https://m3.material.io/components/floating-action-button/specs).

This is not an issue on iOS where the navbar is transparent by default.

### Expected behaviour

Shadow does is not clipped by navbar when set `bottom: 16`

Ideally the M3 `FAB` just has less shadow as well - like the [FAB pictured in your own docs](https://callstack.github.io/react-native-paper/docs/components/FAB/)

### How to reproduce?

1. Position the FAB in the bottom right
```ts
position: 'absolute',
bottom: 16,
right: 16,
```
2. Observe shadow clipping

### Preview

![fab-shadow](https://github.com/callstack/react-native-paper/assets/14974903/fcd424f4-e9dc-40a3-a17c-2e602929067c)

### What have you tried so far?

Overwriting shadow styles, or reducing elevation level - neither props are passed through by `FAB`

### Workaround

`bottom: 22` is the minimum distance from the bottom the `FAB` can be placed without the shadow clipping. Of course this does not conform to the M3 spec, but is better than having clipping

### Your Environment

| software | version
| --------------------- | -------
| ios | NA
| android | 13
| react-native | 0.71.4
| react-native-paper | 5.8.0
| node | 18.12.1
| yarn | 3.6.0
| expo sdk | 48.0.16

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.