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

feat: tabs now support deep-linking #3619

Merged
merged 1 commit into from
Mar 17, 2023
Merged

Conversation

blakef
Copy link
Contributor

@blakef blakef commented Mar 10, 2023

Adds support for deep-linking in tabs. This will only work after #3618 goes it (note: it won't break anything if it does land before).

I updated all of these using this:

git grep -lE '<Tabs .*groupId' | xargs -J echo gsed -ri 's/<Tabs(.*)groupId="([^\"]*)"/<Tabs\1groupId="\2" queryString/'
CleanShot.2023-03-10.at.15.52.00.mp4

@netlify
Copy link

netlify bot commented Mar 10, 2023

Deploy Preview for react-native ready!

Name Link
🔨 Latest commit f9b4550
🔍 Latest deploy log https://app.netlify.com/sites/react-native/deploys/64122416fd4498000832f364
😎 Deploy Preview https://deploy-preview-3619--react-native.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@blakef blakef requested a review from cortinico March 10, 2023 16:04
blakef added a commit to blakef/cli that referenced this pull request Mar 10, 2023
These changes will only start to work once our documentation is updated
to support this feature:
- facebook/react-native-website#3618
- facebook/react-native-website#3619
- facebook/react-native-website#3620
@motiz88
Copy link
Contributor

motiz88 commented Mar 15, 2023

  1. I don't think we generally update old versioned snapshots of the docs unless necessary. Reverting those changes can help with the size of this diff.
  2. This doesn't fix existing inbound links that only include fragment references (without the new query params), right?

@blakef
Copy link
Contributor Author

blakef commented Mar 16, 2023

Answering out of order @motiz88:

This doesn't fix existing inbound links that only include fragment references (without the new query params), right?

No it doesn't fix that, just enables updating the query string when interacting (or the page if directly linked with the query string parameters set). Interestingly there's some other work that I have to follow up with here to scroll after load & update the tabs (some of the ids aren't visible on load. That'd also be a wider docusaurus contrib (but we can swizzle it for now).

FYI our CLI has a draft PR using this react-native-community/cli#1870

I don't think we generally update old versioned snapshots of the docs unless necessary. Reverting those changes can help with the size of this diff.

The change is automated and pretty low risk (IMHO). The CLI change means we'd want to update all of our supported versions (0.71, 0.70, 0.69). The win for our DX is significant enough that I think it's worth figuring out a way to make this more digestible for review.

Maybe I can just break out next + 0.71 as part of this to decrease the review burden?

blakef added a commit to blakef/cli that referenced this pull request Mar 16, 2023
These changes will only start to work once our documentation is updated
to support this feature:
- facebook/react-native-website#3618
- facebook/react-native-website#3619
- facebook/react-native-website#3620
blakef added a commit to blakef/cli that referenced this pull request Mar 16, 2023
These changes will only start to work once our documentation is updated
to support this feature:
- facebook/react-native-website#3618
- facebook/react-native-website#3619
- facebook/react-native-website#3620
@motiz88 motiz88 self-requested a review March 17, 2023 11:12
Copy link
Contributor

@motiz88 motiz88 left a comment

Choose a reason for hiding this comment

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

lgtm, assuming you've done a spot check that the old versions still work after this change.

@blakef blakef merged commit 04ea8cf into facebook:main Mar 17, 2023
@blakef blakef deleted the feat-tab-linking branch March 17, 2023 11:29
blakef added a commit to blakef/cli that referenced this pull request Mar 17, 2023
These changes will only start to work once our documentation is updated
to support this feature:
- facebook/react-native-website#3618
- facebook/react-native-website#3619
- facebook/react-native-website#3620
blakef added a commit to blakef/cli that referenced this pull request Mar 20, 2023
These changes will only start to work once our documentation is updated
to support this feature:
- facebook/react-native-website#3618
- facebook/react-native-website#3619
- facebook/react-native-website#3620
adamTrz pushed a commit to react-native-community/cli that referenced this pull request Mar 20, 2023
* feat: add deeplinks to our documentation

These changes will only start to work once our documentation is updated
to support this feature:
- facebook/react-native-website#3618
- facebook/react-native-website#3619
- facebook/react-native-website#3620

* refactor: decouple our version checks

There was a single version check that would log an available stable
version of React Native that was greater than the current version in a
project.

The change breaks that up into:
- what is the current version
- what is the next stable upgrade if available
- log any stable upgrade if available
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants