Skip to content

Commit

Permalink
📝 ToDoアプリ - ToDo一覧画面のFAB(Icon)に設定しているraisedを削除 (#1126)
Browse files Browse the repository at this point in the history
## ✅ What's done

[`rn-spoiler`のExpo SDK 48アップグレード対応](https://github.com/ws-4020/rn-spoiler/pull/133)で以下を検知

ToDo一覧画面のFAB(Icon)は、`react-native-elements`の`Icon`を使用していますが、`raised`を指定した場合に以下のWarningが出力されます。

> WARN  (ADVICE) View #355 of type RCTView has a shadow set but cannot calculate shadow efficiently. Consider setting a background color to fix this, or apply the shadow to a more specific component.

`shadow`関連のPropsを扱う場合は`backgroundColor`も設定した方が良いという警告ですが、`raised`を`true`に設定した場合に、`react-native-elements`では`backgroundColor`を設定していないようです。

- https://github.com/react-native-elements/react-native-elements/blob/v3.4.3/src/icons/Icon.tsx#L177

ToDoアプリでは、`Icon`の`raised`の使用を学習の目的としていないので、ToDo一覧画面のFAB(Icon)から`raised`を削除しました。

- [x] `raised`の削除
  - 以下で対象を確認(`shadow`系のPropsを使用していないかも併せて確認)
  - `git grep -E "raised|shadow[Color|Offset|Opacity|Radius]" -- website/`
- [x] ToDo一覧画面のキャプチャを貼り付ける箇所のキャプチャ更新
  • Loading branch information
creature-water-valley authored May 8, 2023
1 parent 7877641 commit acff75f
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 2 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ const styles = StyleSheet.create({
name="plus"
type="font-awesome-5"
color={theme.colors?.primary}
raised
reverse
size={30}
containerStyle={styles.iconContainerStyle}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,6 @@ export const TodoBoard: React.FC = () => {
name="plus"
type="font-awesome-5"
color={theme.colors?.primary}
raised
reverse
size={30}
containerStyle={styles.iconContainerStyle}
Expand Down

0 comments on commit acff75f

Please sign in to comment.