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

Replace removed labelVisible with displayMode. #1384

Merged
merged 4 commits into from
Nov 15, 2024

Conversation

KirillTregubov
Copy link
Contributor

@KirillTregubov KirillTregubov commented Nov 15, 2024

I was migrating to React Navigation v7 and I noticed that the docs were a bit outdated. I referred to this elements changelog and this Native Stack Navigator docs page when making my changes.

I updated the elements docs page itself, and the migration guide to help others with their migrations. Feel free to move it to a different category, as I created a new one for it "Changes to elements".

Please verify my formatting before accepting. I noticed you usually put the default value after the possible values, but I wasn't able to figure out how to do that within the list.

Thanks for the awesome library, I hope I was able to help fix the issue!

Copy link

netlify bot commented Nov 15, 2024

Deploy Preview for react-navigation-docs ready!

Name Link
🔨 Latest commit e32f598
🔍 Latest deploy log https://app.netlify.com/sites/react-navigation-docs/deploys/67369d149f365b0008717a3c
😎 Deploy Preview https://deploy-preview-1384--react-navigation-docs.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 configuration.

Copy link
Member

@satya164 satya164 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

@satya164 satya164 merged commit 48b5ea1 into react-navigation:main Nov 15, 2024
3 checks passed
satya164 pushed a commit to react-navigation/react-navigation that referenced this pull request Nov 18, 2024
**Motivation**

I noticed while migrating from v6 to v7 that `labelVisible` was changed
to `displayMode`. The migration guide and the elements documentation
pages did not include this information, so I went ahead and [updated
them](react-navigation/react-navigation.github.io#1384)
(the PR just landed).

However, I noticed while hovering in my IDE (VS Code) that the
description for `displayMode` was not updated. I went ahead and updated
it in the types to match the `headerBackButtonDisplayMode` description
(it's the same property).

**Test plan**

There are no code changes, this is strictly related to TypeScript DX.

Before:
![Screenshot of IDE
Before](https://github.com/user-attachments/assets/72e9b4fd-b062-4740-bf0f-f7d9c72f712d)

After:
![Screenshot of IDE
After](https://github.com/user-attachments/assets/badca395-8c5d-40f9-a5a8-77829f61a917)
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.

2 participants