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

Discussion: RNTL v13 breaking changes #1505

Open
mdjastrzebski opened this issue Sep 20, 2023 · 5 comments
Open

Discussion: RNTL v13 breaking changes #1505

mdjastrzebski opened this issue Sep 20, 2023 · 5 comments
Assignees

Comments

@mdjastrzebski
Copy link
Member

mdjastrzebski commented Sep 20, 2023

Compatibility

React 19

The v13 release will most likely happen for React 19 release for React Native. See #1593 for more info.

RN versions support

Drop support for older versions of React Native versions - perhaps in line with supported RN version (0.70 atm). We should have clear information about supported RN versions and corresponding RNTL versions.

The reasoning behind is that support for older versions for RN requires additional checks and testing that would reduce our capacity to do more useful stuff and that the users on older version of RN should generally update their RN version first and only after that RNTL version.

  • this also includes dropping React 17 support

Drop support for React 18 and lower, and focus just on React 19.
This will require introduction of versioned documentation.

Using JSX transform

Based on #1492, we could use modern JSX transform by default. We should however assess that it would work with all supported RN versions.

Remove deprecated stuff

  • getByAccessibilityState, getByAccessibilityValue - already marked as deprecated
  • remove aliases getByA11yHint and getByAccessibilityHint and keep only one name: getByHintText

API improvements

  • Restrict allowed role value for *byRole queries to RN-supported roles Update ByRole queries to only accept roles #1527.
  • Unify accessible name handling in *ByRole with the new toHaveAccessibleName matcher. Basically, if element has explicit label (aria-label, accessibilityLabel, aria-labelledby, accessibilityLabelledBy) them name should match only that, and name derived from text content should be used only in the absence of explicit label.
@mdjastrzebski mdjastrzebski added the question Further information is requested label Sep 20, 2023
@mdjastrzebski mdjastrzebski added discussion and removed question Further information is requested labels Sep 20, 2023
@thymikee
Copy link
Member

Getting in line with RN official support makes sense if there are breaking changes necessary

@pierrezimmermannbam
Copy link
Collaborator

Also agree with those two. We could also change the type of byRole queries as discussed in #1527

@MattAgn
Copy link
Collaborator

MattAgn commented Nov 14, 2023

I agree as well :)

@mdjastrzebski
Copy link
Member Author

@pierrezimmermannbam @MattAgn added point about accessible name matching tweak for *ByRole query.

@mdjastrzebski
Copy link
Member Author

@pierrezimmermannbam @MattAgn @AugustinLF added point about removing deprecated queries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants