Skip to content

Update deprecated enums in RCTTextPrimitivesConversions.h#2377

Merged
Saadnajmi merged 4 commits intomicrosoft:mainfrom
joannaquu:joannaqu/vision
Feb 28, 2025
Merged

Update deprecated enums in RCTTextPrimitivesConversions.h#2377
Saadnajmi merged 4 commits intomicrosoft:mainfrom
joannaquu:joannaqu/vision

Conversation

@joannaquu
Copy link
Copy Markdown

Summary:

NSUnderlinePatternDash/NSUnderlinePatternDot are deprecated. Use their drop-in replacements (NSUnderlineStylePatternDash and NSUnderlineStylePatternDot) instead.

Test Plan:

Local build

@joannaquu joannaquu requested a review from a team as a code owner February 19, 2025 21:43
@tido64
Copy link
Copy Markdown
Member

tido64 commented Feb 24, 2025

@anandrajeswaran
Copy link
Copy Markdown

Thanks, but I think this should be fixed upstream first. We will then cherry-pick to the relevant branches.

Ah, sorry my comment crossed. Will close the other one, but indeed we should take this fix upstream but really shouldn't block getting this fix in this fork

@joannaquu
Copy link
Copy Markdown
Author

Thanks, but I think this should be fixed upstream first. We will then cherry-pick to the relevant branches.

Ah, sorry my comment crossed. Will close the other one, but indeed we should take this fix upstream but really shouldn't block getting this fix in this fork

@tido64 Thanks, opened a pr!

@Saadnajmi
Copy link
Copy Markdown
Collaborator

Saadnajmi commented Feb 26, 2025

Other note: We can merge this without fixing upstream, but need to add diff tags per https://github.com/microsoft/react-native-macos/blob/main/docs/DiffsWithUpstream.md

Also if we want this internally, it needs to be back ported to the stable branch we are using and all above it. In this case, 0.77-stable through 0.74-stable.

EDIT: I see it's merged upstream, and that this particular bit of code is new architecture only so we don't actually use it internally yet. The upstream fix will come to React Native macOS in 0.79, so if we want it sooner, we can still add the diff tags and port to whatever stable branches we want it on :)

@Saadnajmi
Copy link
Copy Markdown
Collaborator

Lemme know if you need me to click the merge button

@joannaquu
Copy link
Copy Markdown
Author

Lemme know if you need me to click the merge button

yes please 🙏

@Saadnajmi
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@Saadnajmi Saadnajmi merged commit 47880ca into microsoft:main Feb 28, 2025
12 checks passed
@joannaquu joannaquu deleted the joannaqu/vision branch February 28, 2025 20:57
joannaquu added a commit to joannaquu/react-native-macos that referenced this pull request Feb 28, 2025
…2377)

<!-- Thanks for submitting a pull request! We appreciate you spending
the time to work on these changes. Please provide enough information so
that others can review your pull request. The four fields below are
mandatory. -->

<!-- This fork of react-native provides React Native for macOS for the
community. It also contains some changes that are required for usage
internal to Microsoft. We are working on reducing the diff between
Facebook's public version of react-native and our
microsoft/react-native-macos fork. Long term, we want this fork to only
contain macOS concerns and have the other iOS and Android concerns
contributed upstream.

If you are making a new change then one of the following should be done:
- Consider if it is possible to achieve the desired behavior without
making a change to microsoft/react-native-macos. Often a change can be
made in a layer above in facebook/react-native instead.
- Create a corresponding PR against
[facebook/react-native](https://github.com/facebook/react-native)
**Note:** Ideally you would wait for Facebook feedback before submitting
to Microsoft, since we want to ensure that this fork doesn't deviate
from upstream.
-->

## Summary:

<!-- Explain the **motivation** for making this change. What existing
problem does the pull request solve? -->
`NSUnderlinePatternDash`/`NSUnderlinePatternDot` are
[deprecated](https://developer.apple.com/documentation/uikit/nsunderlinepatterndash).
Use their drop-in replacements (`NSUnderlineStylePatternDash` and
`NSUnderlineStylePatternDot`) instead.

## Test Plan:

<!-- Demonstrate the code is solid. Example: The exact commands you ran
and their output, screenshots / videos if the pull request changes the
user interface. -->
Local build
joannaquu added a commit to joannaquu/react-native-macos that referenced this pull request Feb 28, 2025
…2377)

<!-- Thanks for submitting a pull request! We appreciate you spending
the time to work on these changes. Please provide enough information so
that others can review your pull request. The four fields below are
mandatory. -->

<!-- This fork of react-native provides React Native for macOS for the
community. It also contains some changes that are required for usage
internal to Microsoft. We are working on reducing the diff between
Facebook's public version of react-native and our
microsoft/react-native-macos fork. Long term, we want this fork to only
contain macOS concerns and have the other iOS and Android concerns
contributed upstream.

If you are making a new change then one of the following should be done:
- Consider if it is possible to achieve the desired behavior without
making a change to microsoft/react-native-macos. Often a change can be
made in a layer above in facebook/react-native instead.
- Create a corresponding PR against
[facebook/react-native](https://github.com/facebook/react-native)
**Note:** Ideally you would wait for Facebook feedback before submitting
to Microsoft, since we want to ensure that this fork doesn't deviate
from upstream.
-->

## Summary:

<!-- Explain the **motivation** for making this change. What existing
problem does the pull request solve? -->
`NSUnderlinePatternDash`/`NSUnderlinePatternDot` are
[deprecated](https://developer.apple.com/documentation/uikit/nsunderlinepatterndash).
Use their drop-in replacements (`NSUnderlineStylePatternDash` and
`NSUnderlineStylePatternDot`) instead.

## Test Plan:

<!-- Demonstrate the code is solid. Example: The exact commands you ran
and their output, screenshots / videos if the pull request changes the
user interface. -->
Local build
joannaquu added a commit to joannaquu/react-native-macos that referenced this pull request Feb 28, 2025
…2377)

<!-- Thanks for submitting a pull request! We appreciate you spending
the time to work on these changes. Please provide enough information so
that others can review your pull request. The four fields below are
mandatory. -->

<!-- This fork of react-native provides React Native for macOS for the
community. It also contains some changes that are required for usage
internal to Microsoft. We are working on reducing the diff between
Facebook's public version of react-native and our
microsoft/react-native-macos fork. Long term, we want this fork to only
contain macOS concerns and have the other iOS and Android concerns
contributed upstream.

If you are making a new change then one of the following should be done:
- Consider if it is possible to achieve the desired behavior without
making a change to microsoft/react-native-macos. Often a change can be
made in a layer above in facebook/react-native instead.
- Create a corresponding PR against
[facebook/react-native](https://github.com/facebook/react-native)
**Note:** Ideally you would wait for Facebook feedback before submitting
to Microsoft, since we want to ensure that this fork doesn't deviate
from upstream.
-->

## Summary:

<!-- Explain the **motivation** for making this change. What existing
problem does the pull request solve? -->
`NSUnderlinePatternDash`/`NSUnderlinePatternDot` are
[deprecated](https://developer.apple.com/documentation/uikit/nsunderlinepatterndash).
Use their drop-in replacements (`NSUnderlineStylePatternDash` and
`NSUnderlineStylePatternDot`) instead.

## Test Plan:

<!-- Demonstrate the code is solid. Example: The exact commands you ran
and their output, screenshots / videos if the pull request changes the
user interface. -->
Local build
joannaquu added a commit to joannaquu/react-native-macos that referenced this pull request Feb 28, 2025
…2377)

<!-- Thanks for submitting a pull request! We appreciate you spending
the time to work on these changes. Please provide enough information so
that others can review your pull request. The four fields below are
mandatory. -->

<!-- This fork of react-native provides React Native for macOS for the
community. It also contains some changes that are required for usage
internal to Microsoft. We are working on reducing the diff between
Facebook's public version of react-native and our
microsoft/react-native-macos fork. Long term, we want this fork to only
contain macOS concerns and have the other iOS and Android concerns
contributed upstream.

If you are making a new change then one of the following should be done:
- Consider if it is possible to achieve the desired behavior without
making a change to microsoft/react-native-macos. Often a change can be
made in a layer above in facebook/react-native instead.
- Create a corresponding PR against
[facebook/react-native](https://github.com/facebook/react-native)
**Note:** Ideally you would wait for Facebook feedback before submitting
to Microsoft, since we want to ensure that this fork doesn't deviate
from upstream.
-->

## Summary:

<!-- Explain the **motivation** for making this change. What existing
problem does the pull request solve? -->
`NSUnderlinePatternDash`/`NSUnderlinePatternDot` are
[deprecated](https://developer.apple.com/documentation/uikit/nsunderlinepatterndash).
Use their drop-in replacements (`NSUnderlineStylePatternDash` and
`NSUnderlineStylePatternDot`) instead.

## Test Plan:

<!-- Demonstrate the code is solid. Example: The exact commands you ran
and their output, screenshots / videos if the pull request changes the
user interface. -->
Local build
Saadnajmi pushed a commit that referenced this pull request Feb 28, 2025
Saadnajmi pushed a commit that referenced this pull request Feb 28, 2025
Saadnajmi pushed a commit that referenced this pull request Feb 28, 2025
Saadnajmi pushed a commit that referenced this pull request Feb 28, 2025
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.

4 participants