Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic working setup to use CPP Map instead of basic string type Settings copied from accessibilityState (fromRawValue) and from importantForAccessibility (toString) the CPP convertRawProps will use two functions to convert the prop: - fromRawValue which takes as param the prop RawValue - toString or toBoolean, to*** which convert the RawValue to String/Boolean/Number The error was triggered for missing conversion from RawValue (AccessibilityUnit field hours) toString. (std::string) accessibilityUnit.hours would call toString(accessibilityUnit.hours) Tasks Details: Complete draft CPP accessibilityUnit settings:Commit the changes and pushAdd more clear log statements and further verify value passed to accessibilityUnitLog the value passed from javascript in conversion.hAdd changes from PR #2Change logic in conversion.h to add the value passed from javascript -- Change the type from String to Hash in PR #3:Plan next tasksFind a prop that uses the Hash type (for ex accessibilityState)Start with a clear git statusCopy the CPP settings from accessibilityState Parse accessibilityUnit hours value to a string type. The value is already string, but in CPP is not mapped to string.importantForAccessibility uses 2 conversions, fromRawValue and toString. fromRawValue parses the props importantForAccessibility, while toString converts the value from IMPORTANT_FOR_ACCESSIBILITY to string.Follow the same implementation fromRawValue(IMPORTANT_FOR_ACCESSIBILITY), but avoid adding their toString(Important_For_Accessibility) conversion.Pass a static string auto hours = “10”; "Complete draft CPP accessibilityUnit settings: Commit the changes and push Add more clear log statements and further verify value passed to accessibilityUnit Log the value passed from javascript in conversion.h Add changes from PR [#2](https://github.com/fabriziobertoglio1987/react-native/pull/2/files) Change logic in conversion.h to add the value passed from javascript" "Change the type from String to Hash in PR [#3](https://github.com/fabriziobertoglio1987/react-native/pull/3/files): Plan next tasks Find a prop that uses the Hash type (for ex [accessibilityState](https://github.com/fabriziobertoglio1987/react-native/blob/41173cbeba53b26a3c838d16776daa8d10e57639/ReactCommon/react/renderer/components/view/AccessibilityProps.h#L41)) Start with a clear git status Copy the CPP settings from accessibilityState" "Parse accessibilityUnit hours value to a string type. The value is already string, but in CPP is not mapped to string. [importantForAccessibility](https://github.com/fabriziobertoglio1987/react-native/blob/41173cbeba53b26a3c838d16776daa8d10e57639/ReactCommon/react/renderer/components/view/accessibilityPropsConversions.h#L173-L209) uses 2 conversions, fromRawValue and toString. fromRawValue parses the props importantForAccessibility, while toString converts the value from IMPORTANT_FOR_ACCESSIBILITY to string. Follow the same implementation [fromRawValue(IMPORTANT_FOR_ACCESSIBILITY)](https://github.com/fabriziobertoglio1987/react-native/blob/41173cbeba53b26a3c838d16776daa8d10e57639/ReactCommon/react/renderer/components/view/accessibilityPropsConversions.h#L193), but avoid adding their toString(Important_For_Accessibility) conversion. Pass a static string auto hours = “10”;"
- Loading branch information