Remove incorrect information about ion-tab-bar being optional#3797
Closed
SaebAmini wants to merge 1 commit intoionic-team:mainfrom
Closed
Remove incorrect information about ion-tab-bar being optional#3797SaebAmini wants to merge 1 commit intoionic-team:mainfrom
SaebAmini wants to merge 1 commit intoionic-team:mainfrom
Conversation
|
@SaebAmini is attempting to deploy a commit to the Ionic Team on Vercel. A member of the Team first needs to authorize it. |
2 tasks
github-merge-queue bot
pushed a commit
to ionic-team/ionic-framework
that referenced
this pull request
Sep 12, 2024
Issue number: N/A --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> As mentioned in this [PR](ionic-team/ionic-docs#3797), React `IonTabs` requires `IonTabBar` do be a child, else it doesn't render and throws an error. Angular, JS, and Vue doesn't have this requirement. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> I didn't see any reason why React does not mimic the other frameworks. In order to keep consistency, I've updated the React tabs. This would allow `ion-tabs` and `ion-tab-bar` can be used as standalone elements as mentioned in the [docs](https://ionicframework.com/docs/api/tabs). - React follows the same structure as the other frameworks: `IonTabs` doesn't require `IonTabBar` to be a child to render. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Dev build: 8.3.1-dev.11726159792.1a6f49de How to test: 1. Create a Ionic React app through the Ionic CLI with tabs as the starter 2. Run the app 3. Comment out the `IonTabBar` 4. Notice that the `IonTabs` does not render 5. Notice that there's an error in the console: "IonTabs needs a IonTabBar" 6. Install the dev build: `npm install @ionic/react@8.3.1-dev.11726159792.1a6f49de` 7. Make sure the `IonTabBar` is still commented out 8. Verify that `IonTabs` renders 9. Verify that there isn't an error in the console
Contributor
|
Thank you for the PR! I'm going to close it because we realized that only React had the requirement to have tab bar as a child of tabs. We decided to remove this requirement in this PR. Thank you for bring this to our attention. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Attempting to use an ion-tabs without an ion-tab-bar results in an uncaught exception: