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

Fixes issue #6267: Hide Navigation Tabs if Single connected Account #6277

Closed
wants to merge 1 commit into from
Closed

Fixes issue #6267: Hide Navigation Tabs if Single connected Account #6277

wants to merge 1 commit into from

Conversation

ViditJain123
Copy link

I wrapped the TabList with a div and have added conditional display property to make it visible only when we have move than one email address. This fixed the issue. I waiting for the review. :)
Screenshot from 2024-07-16 18-27-37
Screenshot from 2024-07-16 18-27-45

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

  • Conditional display of TabList in packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarChannelsContainer.tsx
  • Conditional display of TabList in packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageChannelsContainer.tsx
  • Hides navigation tabs if only one connected account is present
  • Improves UI by removing unnecessary elements when only one account is connected

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link

Welcome!

Hello there, congrats on your first PR! We're excited to have you contributing to this project.
By submitting your Pull Request, you acknowledge that you agree with the terms of our Contributor License Agreement.

Generated by 🚫 dangerJS against b8a4dc7

Copy link
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

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

Hi @ViditJain123 thanks for the PR, I have left comments :)

tabListId={SETTINGS_ACCOUNT_CALENDAR_CHANNELS_TAB_LIST_COMPONENT_ID}
tabs={tabs}
/>
<div style={{ display: hasMultipleAccounts ? 'block' : 'none' }}>
Copy link
Member

Choose a reason for hiding this comment

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

@ViditJain123 In React we should do something like {hasMultipleAccounts && <TabList ... />}

@charlesBochet
Copy link
Member

Also, we should not apply the additional padding in SettingsAccountsMessageChannelDetails in the case we are not in a tab. This results into an additional space. See by comparaison to Appearance page:
image

vs

image

I think we should extract this padding and place it in a StyledContainer in SettingsAccountsMessageChannelsContainer (resp. CalendarChannelsContainer) instead of having it in SettingsAccountsMessageChannelDetails. This way we could apply it in case of tabs and don't apply it in case of one connected account

@charlesBochet
Copy link
Member

Actually @ViditJain123, I've just noticed that another PR was opened by @adithej and that they was assigned on the ticket. I'll prioritize their PR and close this one, sorry about that. Feel free to work on any non-assigned good first issue :)

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.

2 participants