-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Fix New Arch handling of inline views when text truncated #49960
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
Conversation
|
This pull request was exported from Phabricator. Differential Revision: D70922174 |
|
This pull request was exported from Phabricator. Differential Revision: D70922174 |
423f204 to
aa0d125
Compare
…9960) Summary: Fixes facebook#49106 RN legacy arch, and web, will clip inline content which appears after elipsized text. This is the correct behavior, compared to new arch, which will put it in a random place depending on the platform. `line-clamp`: https://jsfiddle.net/7xgdke1b/ `text-overflow`: https://jsfiddle.net/7xgdke1b/2/ Fabric renderer does not, funnily enough, having an `isClipped` field on `TextMeasurement::Attachment` that is never used. This change propagates state for whether an attachment is beyond elipsized area to this measurement, then when we see it, we set empty layout results with `DisplayType::None` so that we don't create native views. We don't layout child views either, but this seems to work out okay, even when removing and re-adding `numberOfLines`. Changelog: [General][Fixed] - Fix New Arch handling of inline views when text truncated Reviewed By: mdvacca Differential Revision: D70922174
aa0d125 to
5ef3ceb
Compare
|
This pull request was exported from Phabricator. Differential Revision: D70922174 |
5ef3ceb to
6d2572a
Compare
…9960) Summary: Fixes facebook#49106 RN legacy arch, and web, will clip inline content which appears after elipsized text. This is the correct behavior, compared to new arch, which will put it in a random place depending on the platform. `line-clamp`: https://jsfiddle.net/7xgdke1b/ `text-overflow`: https://jsfiddle.net/7xgdke1b/2/ Fabric renderer does not, funnily enough, having an `isClipped` field on `TextMeasurement::Attachment` that is never used. This change propagates state for whether an attachment is beyond elipsized area to this measurement, then when we see it, we set empty layout results with `DisplayType::None` so that we don't create native views. We don't layout child views either, but this seems to work out okay, even when removing and re-adding `numberOfLines`. Changelog: [General][Fixed] - Fix New Arch handling of inline views when text truncated Reviewed By: mdvacca Differential Revision: D70922174
…9960) Summary: Fixes facebook#49106 RN legacy arch, and web, will clip inline content which appears after elipsized text. This is the correct behavior, compared to new arch, which will put it in a random place depending on the platform. `line-clamp`: https://jsfiddle.net/7xgdke1b/ `text-overflow`: https://jsfiddle.net/7xgdke1b/2/ Fabric renderer does not, funnily enough, having an `isClipped` field on `TextMeasurement::Attachment` that is never used. This change propagates state for whether an attachment is beyond elipsized area to this measurement, then when we see it, we set empty layout results with `DisplayType::None` so that we don't create native views. We don't layout child views either, but this seems to work out okay, even when removing and re-adding `numberOfLines`. Changelog: [General][Fixed] - Fix New Arch handling of inline views when text truncated Reviewed By: mdvacca Differential Revision: D70922174
6d2572a to
fa9da03
Compare
|
This pull request was exported from Phabricator. Differential Revision: D70922174 |
…9960) Summary: Pull Request resolved: facebook#49960 Fixes facebook#49106 RN legacy arch, and web, will clip inline content which appears after elipsized text. This is the correct behavior, compared to new arch, which will put it in a random place depending on the platform. `line-clamp`: https://jsfiddle.net/7xgdke1b/ `text-overflow`: https://jsfiddle.net/7xgdke1b/2/ Fabric renderer does not, funnily enough, having an `isClipped` field on `TextMeasurement::Attachment` that is never used. This change propagates state for whether an attachment is beyond elipsized area to this measurement, then when we see it, we set empty layout results with `DisplayType::None` so that we don't create native views. We don't layout child views either, but this seems to work out okay, even when removing and re-adding `numberOfLines`. Changelog: [General][Fixed] - Fix New Arch handling of inline views when text truncated Reviewed By: mdvacca Differential Revision: D70922174
|
This pull request was exported from Phabricator. Differential Revision: D70922174 |
fa9da03 to
14baa91
Compare
|
This pull request has been merged in 99f9626. |
|
This pull request was successfully merged by @NickGerleman in 99f9626 When will my fix make it into a release? | How to file a pick request? |
…9960) Summary: Pull Request resolved: facebook#49960 Fixes facebook#49106 RN legacy arch, and web, will clip inline content which appears after elipsized text. This is the correct behavior, compared to new arch, which will put it in a random place depending on the platform. `line-clamp`: https://jsfiddle.net/7xgdke1b/ `text-overflow`: https://jsfiddle.net/7xgdke1b/2/ Fabric renderer does not, funnily enough, having an `isClipped` field on `TextMeasurement::Attachment` that is never used. This change propagates state for whether an attachment is beyond elipsized area to this measurement, then when we see it, we set empty layout results with `DisplayType::None` so that we don't create native views. We don't layout child views either, but this seems to work out okay, even when removing and re-adding `numberOfLines`. Changelog: [General][Fixed] - Fix New Arch handling of inline views when text truncated Reviewed By: mdvacca Differential Revision: D70922174 fbshipit-source-id: 8c1f4aadbf53ff64ce55b44d6c7953d9b2e40bc5
Summary:
Fixes #49106
RN legacy arch, and web, will clip inline content which appears after elipsized text. This is the correct behavior, compared to new arch, which will put it in a random place depending on the platform.
line-clamp: https://jsfiddle.net/7xgdke1b/text-overflow: https://jsfiddle.net/7xgdke1b/2/Fabric renderer does not, funnily enough, having an
isClippedfield onTextMeasurement::Attachmentthat is never used.This change propagates state for whether an attachment is beyond elipsized area to this measurement, then when we see it, we set empty layout results with
DisplayType::Noneso that we don't create native views. We don't layout child views either, but this seems to work out okay, even when removing and re-addingnumberOfLines.Changelog:
[General][Fixed] - Fix New Arch handling of inline views when text truncated
Reviewed By: mdvacca
Differential Revision: D70922174