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: add option to show tabs on the side #11578

Merged
merged 3 commits into from Sep 13, 2023
Merged

feat: add option to show tabs on the side #11578

merged 3 commits into from Sep 13, 2023

Conversation

satya164
Copy link
Member

@satya164 satya164 commented Sep 4, 2023

Motivation

This adds ability to render the tab bar on left/right as a sidebar. It useful on larger screens where we may want to take advantage of the available horizontal screen and show a sidebar instead of a bottom tab bar.

Test plan

Open the "Bottom Tabs" example and resize the screen to see the different modes of the tab bar. Tap on the "<<" button on the bottom left to switch between a smaller and larger sidebar.

Video

RPReplay_Final1694275006.mp4

@codecov-commenter
Copy link

codecov-commenter commented Sep 4, 2023

Codecov Report

Patch coverage: 54.34% and project coverage change: -0.19% ⚠️

Comparison is base (e432c32) 75.77% compared to head (21a6782) 75.59%.

❗ Current head 21a6782 differs from pull request most recent head f16503e. Consider uploading reports for the commit f16503e to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11578      +/-   ##
==========================================
- Coverage   75.77%   75.59%   -0.19%     
==========================================
  Files         200      201       +1     
  Lines        5817     5859      +42     
  Branches     2271     2306      +35     
==========================================
+ Hits         4408     4429      +21     
- Misses       1362     1378      +16     
- Partials       47       52       +5     
Files Changed Coverage Δ
packages/bottom-tabs/src/views/BottomTabItem.tsx 64.70% <ø> (ø)
packages/drawer/src/views/DrawerView.tsx 64.63% <ø> (ø)
packages/elements/src/index.tsx 100.00% <ø> (ø)
packages/bottom-tabs/src/views/BottomTabBar.tsx 60.95% <40.00%> (-6.00%) ⬇️
packages/bottom-tabs/src/views/BottomTabView.tsx 90.90% <57.14%> (-3.38%) ⬇️
packages/bottom-tabs/src/views/TabBarIcon.tsx 100.00% <100.00%> (ø)
packages/elements/src/getDefaultSidebarWidth.tsx 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@netlify
Copy link

netlify bot commented Sep 4, 2023

Deploy Preview for react-navigation-example ready!

Name Link
🔨 Latest commit f16503e
🔍 Latest deploy log https://app.netlify.com/sites/react-navigation-example/deploys/6501c0a3a7b4f600081bceec
😎 Deploy Preview https://deploy-preview-11578--react-navigation-example.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.

@satya164 satya164 force-pushed the @satya164/side-tabs branch 2 times, most recently from c3c4a9b to f93311c Compare September 9, 2023 16:05
Copy link
Member

@osdnk osdnk left a comment

Choose a reason for hiding this comment

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

The code works and looks good in general. One question is if the name "bottom-tab" is still valid?

@satya164 satya164 marked this pull request as ready for review September 13, 2023 14:01
@satya164
Copy link
Member Author

@osdnk: One question is if the name "bottom-tab" is still valid

You could make the argument is that the default one is still bottom, and you could position tabs at the top in material-top-tabs so it's like this already 😅

But yeah, the only real argument I have is to avoid another big breaking change (especially to keep older blog posts, examples etc. working) and to keep our download counts on npm.

@satya164 satya164 enabled auto-merge (squash) September 13, 2023 14:04
@satya164 satya164 merged commit cd15fda into main Sep 13, 2023
8 checks passed
@satya164 satya164 deleted the @satya164/side-tabs branch September 13, 2023 14:04
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.

None yet

3 participants