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

🎨 Update admin layout and pages #976

Merged
merged 75 commits into from
Jan 13, 2024
Merged

🎨 Update admin layout and pages #976

merged 75 commits into from
Jan 13, 2024

Conversation

lukevella
Copy link
Owner

@lukevella lukevella commented Jan 12, 2024

This is mainly an enabler to allow us to introduce new functionality in the future.

Todo:

  • Delete orphaned and unused code
  • Fix broken link on polls page in production build
  • Final testing

Summary by CodeRabbit

  • New Features

    • Introduced a new sidebar layout for administrative pages.
    • Added a MenuItem component to render menu items with icons and links.
    • Enhanced the polls page with asynchronous data fetching and UI updates.
    • Created PollFolders and PollsList components for managing poll directories and displaying polls.
    • Updated the billing and preferences pages with structural improvements.
    • Added a Toaster component for in-app notifications.
    • Introduced BackButton and Page components for improved navigation.
    • Created LogoLink and LogoutButton components for consistent branding and user logout functionality.
    • Developed a PageLayout component set for consistent page structure.
    • Added new ProBadge and UserDropdown components with updated logic and styling.
    • Implemented pagination functionality in the Table component.
    • Updated the Poll component with new links and translations.
    • Introduced new cookie management utilities.
    • Added a Toaster component for toast notifications management.
    • Implemented a custom toast notification system with use-toast hook.
  • Bug Fixes

    • Fixed positioning issue in DateCard by adjusting z-index values.
    • Corrected layout and content rendering in EventCard.
    • Refactored InviteDialog to improve link copying functionality.
    • Updated ProfileLayout to use new layout components.
    • Removed animation from TopBar for a simpler UI.
    • Adjusted UI elements in PageDialogFooter for better visual spacing.
    • Fixed response behavior in API handlers for Stripe checkout and portal.
  • Refactor

    • Replaced StandardLayout with SidebarLayout in admin pages.
    • Modified ProfileLayout to fetch translations and generate menu items dynamically.
    • Enhanced UserDropdown with optional styling and layout adjustments.
    • Replaced direct usePlan calls with IfFreeUser context in ProBadge.
    • Updated IfFreeUser to use useSubscription hook for subscription status checks.
  • Style

    • Updated various components with new styling for text, buttons, and layout adjustments.
    • Made adjustments to global styles in style.css.
  • Documentation

    • Added "use client" directive in user component for client-side rendering indication.
  • Chores

    • Removed unused code and imports across various files.
  • Tests

    • Updated authentication tests by removing redundant user dropdown interactions.
  • Configurations

    • Updated next.config.js with Sentry configuration changes and conditional bundle analyzer setup.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between d5327d7 and 09f4b16.
Files selected for processing (1)
  • apps/web/next.config.js (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • apps/web/next.config.js

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 09f4b16 and 31bc2e9.
Files selected for processing (2)
  • apps/web/src/app/[locale]/(admin)/polls/polls-list.tsx (1 hunks)
  • apps/web/src/app/components/logo-link.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • apps/web/src/app/[locale]/(admin)/polls/polls-list.tsx
  • apps/web/src/app/components/logo-link.tsx

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 31bc2e9 and 19f40c3.
Files selected for processing (2)
  • apps/web/src/app/[locale]/(admin)/polls/polls-list.tsx (1 hunks)
  • apps/web/src/app/[locale]/poll/[urlId]/page.tsx (2 hunks)
Files skipped from review as they are similar to previous changes (2)
  • apps/web/src/app/[locale]/(admin)/polls/polls-list.tsx
  • apps/web/src/app/[locale]/poll/[urlId]/page.tsx

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 19f40c3 and d4e7013.
Files selected for processing (1)
  • apps/web/src/app/[locale]/(admin)/polls/polls-list.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • apps/web/src/app/[locale]/(admin)/polls/polls-list.tsx

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 19f40c3 and c25af9f.
Files selected for processing (2)
  • apps/web/src/app/[locale]/(admin)/polls/polls-list.tsx (1 hunks)
  • apps/web/src/utils/dayjs.tsx (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • apps/web/src/app/[locale]/(admin)/polls/polls-list.tsx
Additional comments: 2
apps/web/src/utils/dayjs.tsx (2)
  • 210-215: The introduction of the adjustTimeZone function using React.useCallback is a good practice for optimizing performance, especially if this function is going to be passed down and used by many components. However, it's important to ensure that the preferredTimeZone variable, which is a dependency of this callback, will not change frequently, as this would negate the benefits of memoization.

  • 249-249: The removal of adjustTimeZone from the DayjsContext.Provider value needs to be carefully considered. If there are existing consumers of this context that rely on adjustTimeZone being provided, this change could break those components. It's crucial to verify that all consumers have been updated to access adjustTimeZone in the new way it is provided.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between c25af9f and bcf0541.
Files selected for processing (1)
  • apps/web/src/app/[locale]/(admin)/polls/polls-list.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • apps/web/src/app/[locale]/(admin)/polls/polls-list.tsx

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between bcf0541 and cfeacb4.
Files selected for processing (1)
  • apps/web/src/pages/404.tsx (2 hunks)
Additional comments: 1
apps/web/src/pages/404.tsx (1)
  • 3-8: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [1-14]

The import and usage of getStandardLayout have been removed. This change simplifies the file by removing unnecessary layout configuration for the 404 page. Ensure that the removal of getStandardLayout does not affect other pages or components that might rely on it.

Verification successful

The search for getStandardLayout within .tsx files did not yield any results, indicating that the function is not used elsewhere in the .tsx files of the codebase. This suggests that the removal of getStandardLayout from 404.tsx is unlikely to have affected other pages or components.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that no other pages or components require getStandardLayout.
rg --type tsx 'getStandardLayout'

Length of output: 61



Script:

#!/bin/bash
# Search for 'getStandardLayout' within .tsx files without specifying the file type to ripgrep.
rg 'getStandardLayout' -g '*.tsx'

Length of output: 33

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between cfeacb4 and 62eecf3.
Files selected for processing (1)
  • apps/web/src/app/[locale]/(admin)/new/page.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • apps/web/src/app/[locale]/(admin)/new/page.tsx

@lukevella lukevella changed the title ✨ Big UI Update ✨ Update admin layout and polls page Jan 13, 2024
@lukevella lukevella changed the title ✨ Update admin layout and polls page ✨ Update admin layout and pages Jan 13, 2024
@lukevella lukevella changed the title ✨ Update admin layout and pages 🎨 Update admin layout and pages Jan 13, 2024
@lukevella lukevella merged commit a1bac0c into main Jan 13, 2024
5 checks passed
@lukevella lukevella deleted the experimental branch January 13, 2024 08:09
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

1 participant