-
-
Notifications
You must be signed in to change notification settings - Fork 383
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
Conversation
There was a problem hiding this 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
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
There was a problem hiding this 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
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
There was a problem hiding this 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
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
There was a problem hiding this 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
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
d4e7013
to
c25af9f
Compare
There was a problem hiding this 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
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 usingReact.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 thepreferredTimeZone
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 theDayjsContext.Provider
value needs to be carefully considered. If there are existing consumers of this context that rely onadjustTimeZone
being provided, this change could break those components. It's crucial to verify that all consumers have been updated to accessadjustTimeZone
in the new way it is provided.
There was a problem hiding this 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
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
There was a problem hiding this 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
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 ofgetStandardLayout
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 ofgetStandardLayout
from404.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
There was a problem hiding this 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
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
This is mainly an enabler to allow us to introduce new functionality in the future.
Todo:
Summary by CodeRabbit
New Features
MenuItem
component to render menu items with icons and links.PollFolders
andPollsList
components for managing poll directories and displaying polls.Toaster
component for in-app notifications.BackButton
andPage
components for improved navigation.LogoLink
andLogoutButton
components for consistent branding and user logout functionality.PageLayout
component set for consistent page structure.ProBadge
andUserDropdown
components with updated logic and styling.Table
component.Poll
component with new links and translations.Toaster
component for toast notifications management.use-toast
hook.Bug Fixes
DateCard
by adjusting z-index values.EventCard
.InviteDialog
to improve link copying functionality.ProfileLayout
to use new layout components.TopBar
for a simpler UI.PageDialogFooter
for better visual spacing.Refactor
StandardLayout
withSidebarLayout
in admin pages.ProfileLayout
to fetch translations and generate menu items dynamically.UserDropdown
with optional styling and layout adjustments.usePlan
calls withIfFreeUser
context inProBadge
.IfFreeUser
to useuseSubscription
hook for subscription status checks.Style
style.css
.Documentation
"use client"
directive in user component for client-side rendering indication.Chores
Tests
Configurations
next.config.js
with Sentry configuration changes and conditional bundle analyzer setup.