Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix static view config validation for RNSVGSvgViewAndroid #2274

Conversation

fabriziocucci
Copy link
Contributor

@fabriziocucci fabriziocucci commented May 13, 2024

Summary

As per title, when running an app in bridgless mode the following redbox appears:

StaticViewConfigValidator: Invalid static view config for 'RNSVGSvgViewAndroid'.

'validAttributes.borderBlockColor' is missing.
'validAttributes.borderBlockEndColor' is missing.
'validAttributes.borderBlockStartColor' is missing.
'validAttributes.borderEndEndRadius' is missing.
'validAttributes.borderEndStartRadius' is missing.
'validAttributes.borderStartEndRadius' is missing.
'validAttributes.borderStartStartRadius' is missing.

Test Plan

Tested that the redbox is gone.

Compatibility

OS Implemented
iOS N/A
Android

Checklist

  • I have tested this on a device and a simulator
  • I added documentation in README.md
  • I updated the typed files (typescript)
  • I added a test for the API in the __tests__ folder

@jakex7
Copy link
Member

jakex7 commented May 14, 2024

Hi @fabriziocucci,
actually, I am not familiar with this error but I noticed that in LogCat after adding your changes there are a few more errors regarding border. Is this something we should be concerned about? How could we resolve them all?

image

@fabriziocucci
Copy link
Contributor Author

@jakex7 thanks for raising the question, these are unfortunately two separate but connected problems.

This diff is a workaround to fix the static view config validation (similarly to what was already done in the past here).

For the pre-existing console errors (+ the additional 7 added by this changes), I'm afraid we'll have to do something at framework level (e.g. push all border props in the BaseViewManger or something else).

Does that clarifies a bit?

@jakex7
Copy link
Member

jakex7 commented May 15, 2024

Sure, thanks for the clarification.

Copy link
Member

@WoLewicki WoLewicki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jakex7 jakex7 merged commit 19b2e42 into software-mansion:main May 15, 2024
5 of 6 checks passed
@fabriziocucci
Copy link
Contributor Author

Thank you both @jakex7 and @WoLewicki! ❤️

jakex7 added a commit that referenced this pull request May 15, 2024
# Summary

As per title, when running an app in bridgless mode the following redbox
appears:

> StaticViewConfigValidator: Invalid static view config for
'RNSVGSvgViewAndroid'.
> 
> 'validAttributes.borderBlockColor' is missing.
> 'validAttributes.borderBlockEndColor' is missing.
> 'validAttributes.borderBlockStartColor' is missing.
> 'validAttributes.borderEndEndRadius' is missing.
> 'validAttributes.borderEndStartRadius' is missing.
> 'validAttributes.borderStartEndRadius' is missing.
> 'validAttributes.borderStartStartRadius' is missing.

## Test Plan

Tested that the redbox is gone.

## Compatibility

| OS      | Implemented |
| ------- | :---------: |
| iOS     |    N/A     |
| Android |    ✅     |

## Checklist

<!-- Check completed item, when applicable, via: [X] -->

- [X] I have tested this on a device and a simulator
- [ ] I added documentation in `README.md`
- [ ] I updated the typed files (typescript)
- [ ] I added a test for the API in the `__tests__` folder

---------

Co-authored-by: Jakub Grzywacz <jakub.grzywacz@swmansion.com>
jakex7 added a commit that referenced this pull request May 15, 2024
# Summary

As per title, when running an app in bridgless mode the following redbox
appears:

> StaticViewConfigValidator: Invalid static view config for
'RNSVGSvgViewAndroid'.
> 
> 'validAttributes.borderBlockColor' is missing.
> 'validAttributes.borderBlockEndColor' is missing.
> 'validAttributes.borderBlockStartColor' is missing.
> 'validAttributes.borderEndEndRadius' is missing.
> 'validAttributes.borderEndStartRadius' is missing.
> 'validAttributes.borderStartEndRadius' is missing.
> 'validAttributes.borderStartStartRadius' is missing.

## Test Plan

Tested that the redbox is gone.

## Compatibility

| OS      | Implemented |
| ------- | :---------: |
| iOS     |    N/A     |
| Android |    ✅     |

## Checklist

<!-- Check completed item, when applicable, via: [X] -->

- [X] I have tested this on a device and a simulator
- [ ] I added documentation in `README.md`
- [ ] I updated the typed files (typescript)
- [ ] I added a test for the API in the `__tests__` folder

---------

Co-authored-by: Jakub Grzywacz <jakub.grzywacz@swmansion.com>
github-merge-queue bot referenced this pull request in valora-inc/wallet May 25, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[react-native-svg](https://togithub.com/react-native-community/react-native-svg)
| [`^15.2.0` ->
`^15.3.0`](https://renovatebot.com/diffs/npm/react-native-svg/15.2.0/15.3.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-svg/15.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-svg/15.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-svg/15.2.0/15.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-svg/15.2.0/15.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>react-native-community/react-native-svg
(react-native-svg)</summary>

###
[`v15.3.0`](https://togithub.com/software-mansion/react-native-svg/releases/tag/v15.3.0)

[Compare
Source](https://togithub.com/react-native-community/react-native-svg/compare/v15.2.0...v15.3.0)

Minor release fixing some long-standing bugs. Thank you for your
contributions! 🎉

#### What's Changed

- Add dxguid.lib to release action by
[@&#8203;Arthurmtro](https://togithub.com/Arthurmtro) in
[https://github.com/software-mansion/react-native-svg/pull/2243](https://togithub.com/software-mansion/react-native-svg/pull/2243)
- fix: set default strokeWidth to 1 on android by
[@&#8203;jakex7](https://togithub.com/jakex7) in
[https://github.com/software-mansion/react-native-svg/pull/2269](https://togithub.com/software-mansion/react-native-svg/pull/2269)
- fix: remove `err` export by
[@&#8203;jakex7](https://togithub.com/jakex7) in
[https://github.com/software-mansion/react-native-svg/pull/2270](https://togithub.com/software-mansion/react-native-svg/pull/2270)
- fix: Fix pod install not working with lower version of Cocoapods due
to visionOS by [@&#8203;jihoon416](https://togithub.com/jihoon416) in
[https://github.com/software-mansion/react-native-svg/pull/2240](https://togithub.com/software-mansion/react-native-svg/pull/2240)
- fix: Fix static view config validation for RNSVGSvgViewAndroid by
[@&#8203;fabriziocucci](https://togithub.com/fabriziocucci) in
[https://github.com/software-mansion/react-native-svg/pull/2274](https://togithub.com/software-mansion/react-native-svg/pull/2274)
- fix: radialGradient `r={0}` by
[@&#8203;jakex7](https://togithub.com/jakex7) in
[https://github.com/software-mansion/react-native-svg/pull/2271](https://togithub.com/software-mansion/react-native-svg/pull/2271)
- fix: toDataUrl line breaks by
[@&#8203;jakex7](https://togithub.com/jakex7) in
[https://github.com/software-mansion/react-native-svg/pull/2272](https://togithub.com/software-mansion/react-native-svg/pull/2272)
- fix: change android package name by
[@&#8203;jakex7](https://togithub.com/jakex7) in
[https://github.com/software-mansion/react-native-svg/pull/2275](https://togithub.com/software-mansion/react-native-svg/pull/2275)
- fix: parsing `<` inside comments by
[@&#8203;jakex7](https://togithub.com/jakex7) in
[https://github.com/software-mansion/react-native-svg/pull/2277](https://togithub.com/software-mansion/react-native-svg/pull/2277)

#### New Contributors

- [@&#8203;Arthurmtro](https://togithub.com/Arthurmtro) made their first
contribution in
[https://github.com/software-mansion/react-native-svg/pull/2243](https://togithub.com/software-mansion/react-native-svg/pull/2243)
- [@&#8203;jakex7](https://togithub.com/jakex7) made their first
contribution in
[https://github.com/software-mansion/react-native-svg/pull/2269](https://togithub.com/software-mansion/react-native-svg/pull/2269)
- [@&#8203;jihoon416](https://togithub.com/jihoon416) made their first
contribution in
[https://github.com/software-mansion/react-native-svg/pull/2240](https://togithub.com/software-mansion/react-native-svg/pull/2240)
- [@&#8203;fabriziocucci](https://togithub.com/fabriziocucci) made their
first contribution in
[https://github.com/software-mansion/react-native-svg/pull/2274](https://togithub.com/software-mansion/react-native-svg/pull/2274)

**Full Changelog**:
software-mansion/react-native-svg@v15.2.0...v15.3.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 5pm,every weekend" in timezone
America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone
America/Los_Angeles.

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/valora-inc/wallet).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbIm5wbSIsInJlbm92YXRlIl19-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: valora-bot <valorabot@valoraapp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants