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: nav updates #9973

Merged
merged 5 commits into from
Jul 25, 2024
Merged

feat: nav updates #9973

merged 5 commits into from
Jul 25, 2024

Conversation

ackernaut
Copy link
Member

@ackernaut ackernaut commented Jul 12, 2024

Closes #9970

Demo and on-demand env

Test

  • Nav follows UI designs for dash nav and org admin nav for both desktop and mobile
  • Org nav sections are sorted by tier (enterprise, team, starter) then alphanumeric within each tier

Summary by CodeRabbit

  • New Features

    • Added tooltip functionality for organization actions in the dashboard navigation list.
  • Style

    • Updated styling across multiple components to improve visual consistency and user experience.
    • Refined padding, font styles, and layout properties for better presentation.
  • Refactor

    • Streamlined imports and replaced several styled components to enhance code maintainability.
    • Improved rendering logic for better organisation display and interaction.

Copy link
Contributor

coderabbitai bot commented Jul 12, 2024

Walkthrough

The changes primarily focus on enhancing the dashboard navigation design to improve user experience. Key modifications include importing new components such as ManageAccounts and Tooltip, updating the styling and layout of navigation items, introducing tooltips for organization actions, and refining margins and padding for a cleaner interface. These updates align with the objective of making the navigation more intuitive and visually appealing.

Changes

File Path Change Summary
.../DashNavList.tsx Removed obsolete imports, added new imports for tooltips, updated component styling, and modified rendering logic.
.../DashNavListTeams.tsx Adjusted paddingLeft and className properties for better alignment and styling consistency.
.../DashSidebar.tsx Refactored sidebar styles, updated padding and layout, removed unnecessary components, enhanced visual presentation.
.../LeftDashNavItem.tsx Adjusted isActive state styling, modified fontWeight, paddingRight, and hover/focus/active states for improved UX.
.../MobileDashSidebar.tsx Replaced OrgName with TopNavItemsWrap, updated padding values, introduced new structure for organization name display.
.../SideBarStartMeetingButton.tsx Adjusted button width based on state, refined container element styling for better visual presentation.
.../Organization/OrgNav.tsx Refactored component names, introduced new OrgLabel, adjusted layout properties for better overflow handling.

Assessment against linked issues

Objective Addressed Explanation
Implement dash nav design updates (Issue #9970)
- Remove borders, tier tag, specific nav items, and menu
- Add updated org name section label, icon button for settings and members with tooltip
- Refine margins, padding, and general layout improvements

Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 2d4513a and ff294be.

Files selected for processing (1)
  • packages/client/components/DashNavList/DashNavList.tsx (4 hunks)
Additional comments not posted (8)
packages/client/components/DashNavList/DashNavList.tsx (8)

2-10: Ensure the new imports are necessary.

The new imports for ManageAccounts, TierEnum, Tooltip, TooltipContent, and TooltipTrigger appear to be necessary for the updated functionality and styling.


20-23: LGTM!

The StyledIcon component is correctly defined using ManageAccounts with appropriate styling.


26-26: LGTM!

The organizationsRef prop type update to remove the nullable type is appropriate and enforces stricter data handling.


Line range hint 34-45:
LGTM!

The useFragment hook is correctly used to fetch organization data with an appropriate fragment definition.


47-53: LGTM!

The sorting logic for organizations based on their tier using TierEnumValues is correct and ensures a consistent order.


55-58: LGTM!

The conditional rendering correctly displays a message if there are no teams.


69-81: LGTM!

The tooltip integration for the settings link is correctly implemented and enhances usability by providing contextual information.


82-82: LGTM!

The DashNavListTeams component is correctly used to display teams for each organization.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ackernaut ackernaut marked this pull request as draft July 12, 2024 17:34
@ackernaut ackernaut marked this pull request as ready for review July 12, 2024 17:54
@ackernaut ackernaut marked this pull request as draft July 12, 2024 17:59
@ackernaut ackernaut marked this pull request as ready for review July 16, 2024 22:24
Copy link
Contributor

@nickoferrall nickoferrall left a comment

Choose a reason for hiding this comment

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

Looks good to me! I think the TierEnum array needs changing, but other than that, I think it's ready to be merged.

I prefer this design. It looks a lot cleaner, and the settings icon really gets my attention with the lighter team names.

const isDesktop = useBreakpoint(Breakpoint.SIDEBAR_LEFT)
const teams = organizations?.flatMap((org) => org.viewerTeams)

const tiers = ['enterprise', 'team', 'starter']
Copy link
Contributor

Choose a reason for hiding this comment

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

-1 we should use TierEnum here instead as the we might change the names, e.g. team back to pro

Copy link
Member Author

Choose a reason for hiding this comment

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

I see this in other places, but I’m not sure the best way to import and define a TierEnum here.

@@ -43,11 +44,11 @@ const DashNavList = (props: Props) => {
organizationsRef
)

const tiers = ['enterprise', 'team', 'starter']
const TierEnumValues: TierEnum[] = ['enterprise', 'team', 'starter']
Copy link
Member Author

Choose a reason for hiding this comment

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

@nickoferrall does this work to check the tiers?

Copy link
Member Author

Choose a reason for hiding this comment

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

See commit

Copy link
Contributor

Choose a reason for hiding this comment

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

That works!

@ackernaut ackernaut merged commit 2dd490a into master Jul 25, 2024
7 of 8 checks passed
@ackernaut ackernaut deleted the feat/nav-updates branch July 25, 2024 15:36
@github-actions github-actions bot mentioned this pull request Jul 26, 2024
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement dash nav design updates
2 participants