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 and fix prettier config #987

Merged
merged 2 commits into from
Jan 19, 2024
Merged

📦 Update and fix prettier config #987

merged 2 commits into from
Jan 19, 2024

Conversation

lukevella
Copy link
Owner

@lukevella lukevella commented Jan 19, 2024

Summary by CodeRabbit

  • New Features

    • Integrated Tailwind CSS-specific formatting rules for improved styling consistency.
    • Enhanced visual layout and styling for various components across admin, auth, invite, menu, poll, and user interfaces.
  • Improvements

    • Optimized class order for better readability and style prioritization in multiple components.
    • Updated visual behavior of interactive elements for a more intuitive user experience.
  • Bug Fixes

    • Corrected class name order for consistent application of styling across components.
    • Fixed layout inconsistencies in components to ensure uniform appearance.
  • Refactor

    • Streamlined conditional class assignments to enhance performance and maintainability.
  • Style

    • Adjusted visual presentation of components to align with design standards.
  • Documentation

    • Updated instructions for component usage to reflect recent styling changes.
  • Chores

    • Performed routine maintenance updates to keep the codebase clean and efficient.

Copy link

vercel bot commented Jan 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 19, 2024 7:09am
landing ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 19, 2024 7:09am

Copy link
Contributor

coderabbitai bot commented Jan 19, 2024

Walkthrough

The overarching theme of the changes is the reorganization of CSS class names within JSX elements across various components, affecting the styling and visual presentation. This consistent adjustment suggests a refactoring effort to adhere to a new coding standard or to integrate with a plugin like Tailwind CSS for more efficient style management.

Changes

File Path Change Summary
.prettierrc Added "prettier-plugin-tailwindcss" plugin.
.../layout.tsx, .../(admin)/..., .../(auth)/..., .../invite/[urlId]/..., .../menu/..., .../poll/[urlId]/..., .../components/..., .../utils/auth.ts Reordered CSS classes and attributes in JSX elements; altered class application logic and visual styling.
.../style.css Reordered @apply directives and modified CSS properties.

🐇✨
In code's meadow, where styles cascade,
A rabbit hopped, refactoring made.
Classes shuffled, with care and grace,
Now every element finds its place. 🌱🎨

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-tests for this file.
  • 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 tests 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 from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

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

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

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 e2c4cc7 and a08e198.
Files ignored due to path filters (2)
  • package.json is excluded by: !**/*.json
  • yarn.lock is excluded by: !**/*.lock
Files selected for processing (41)
  • .prettierrc (1 hunks)
  • apps/web/src/app/[locale]/(admin)/layout.tsx (2 hunks)
  • apps/web/src/app/[locale]/(admin)/menu-item.tsx (1 hunks)
  • apps/web/src/app/[locale]/(admin)/new/page.tsx (1 hunks)
  • apps/web/src/app/[locale]/(admin)/polls/layout.tsx (1 hunks)
  • apps/web/src/app/[locale]/(admin)/polls/loading.tsx (1 hunks)
  • apps/web/src/app/[locale]/(admin)/polls/polls-folders.tsx (1 hunks)
  • apps/web/src/app/[locale]/(admin)/polls/polls-list.tsx (4 hunks)
  • apps/web/src/app/[locale]/(admin)/settings/menu-item.tsx (3 hunks)
  • apps/web/src/app/[locale]/(admin)/sidebar.tsx (4 hunks)
  • apps/web/src/app/[locale]/(auth)/login/loading.tsx (1 hunks)
  • apps/web/src/app/[locale]/(auth)/login/login-form.tsx (1 hunks)
  • apps/web/src/app/[locale]/(auth)/login/page.tsx (1 hunks)
  • apps/web/src/app/[locale]/(auth)/register/page.tsx (1 hunks)
  • apps/web/src/app/[locale]/invite/[urlId]/invite-page.tsx (2 hunks)
  • apps/web/src/app/[locale]/invite/[urlId]/loading.tsx (1 hunks)
  • apps/web/src/app/[locale]/invite/[urlId]/nav.tsx (1 hunks)
  • apps/web/src/app/[locale]/menu/back-button.tsx (1 hunks)
  • apps/web/src/app/[locale]/menu/page.tsx (1 hunks)
  • apps/web/src/app/[locale]/poll/[urlId]/guest-poll-alert.tsx (1 hunks)
  • apps/web/src/app/[locale]/poll/[urlId]/page.tsx (1 hunks)
  • apps/web/src/app/[locale]/poll/[urlId]/skeleton.tsx (1 hunks)
  • apps/web/src/app/components/logo-link.tsx (1 hunks)
  • apps/web/src/app/components/page-layout.tsx (3 hunks)
  • apps/web/src/components/auth/auth-forms.tsx (1 hunks)
  • apps/web/src/components/auth/auth-layout.tsx (1 hunks)
  • apps/web/src/components/card.tsx (1 hunks)
  • apps/web/src/components/event-card.tsx (3 hunks)
  • apps/web/src/components/invite-dialog.tsx (2 hunks)
  • apps/web/src/components/layouts/poll-layout.tsx (1 hunks)
  • apps/web/src/components/page-dialog.tsx (1 hunks)
  • apps/web/src/components/pay-wall.tsx (1 hunks)
  • apps/web/src/components/poll-status.tsx (2 hunks)
  • apps/web/src/components/poll/poll-subheader.tsx (1 hunks)
  • apps/web/src/components/settings/settings.tsx (2 hunks)
  • apps/web/src/components/table.tsx (3 hunks)
  • apps/web/src/components/text-input.tsx (1 hunks)
  • apps/web/src/components/user-dropdown.tsx (10 hunks)
  • apps/web/src/components/user.tsx (1 hunks)
  • apps/web/src/style.css (3 hunks)
  • apps/web/src/utils/auth.ts (1 hunks)
Files skipped from review due to trivial changes (23)
  • apps/web/src/app/[locale]/(admin)/layout.tsx
  • apps/web/src/app/[locale]/(admin)/polls/layout.tsx
  • apps/web/src/app/[locale]/(admin)/polls/polls-list.tsx
  • apps/web/src/app/[locale]/(admin)/settings/menu-item.tsx
  • apps/web/src/app/[locale]/(auth)/login/login-form.tsx
  • apps/web/src/app/[locale]/(auth)/login/page.tsx
  • apps/web/src/app/[locale]/invite/[urlId]/invite-page.tsx
  • apps/web/src/app/[locale]/invite/[urlId]/loading.tsx
  • apps/web/src/app/[locale]/invite/[urlId]/nav.tsx
  • apps/web/src/app/[locale]/menu/back-button.tsx
  • apps/web/src/app/[locale]/poll/[urlId]/skeleton.tsx
  • apps/web/src/app/components/page-layout.tsx
  • apps/web/src/components/auth/auth-forms.tsx
  • apps/web/src/components/card.tsx
  • apps/web/src/components/invite-dialog.tsx
  • apps/web/src/components/page-dialog.tsx
  • apps/web/src/components/pay-wall.tsx
  • apps/web/src/components/poll-status.tsx
  • apps/web/src/components/poll/poll-subheader.tsx
  • apps/web/src/components/settings/settings.tsx
  • apps/web/src/components/table.tsx
  • apps/web/src/components/text-input.tsx
  • apps/web/src/components/user-dropdown.tsx
Additional comments: 38
.prettierrc (1)
  • 2-2: The addition of the "prettier-plugin-tailwindcss" plugin to the Prettier configuration file is consistent with the PR's objective to integrate Tailwind CSS-specific formatting rules.
apps/web/src/app/[locale]/(auth)/login/loading.tsx (1)
  • 5-5: The reordering of classes in the className attribute is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
apps/web/src/app/[locale]/poll/[urlId]/page.tsx (1)
  • 9-9: The reordering of class names in the className attribute is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
apps/web/src/app/components/logo-link.tsx (1)
  • 7-7: The reordering of class names in the className attribute is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
apps/web/src/components/auth/auth-layout.tsx (1)
  • 18-18: The reordering of CSS classes in the AuthFooter component is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
apps/web/src/app/[locale]/(admin)/polls/loading.tsx (5)
  • 5-5: The reordering of class names and style properties within the JSX is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
  • 7-7: The reordering of class names and style properties within the JSX is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
  • 11-11: The reordering of class names and style properties within the JSX is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
  • 14-14: The reordering of class names and style properties within the JSX is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
  • 17-17: The reordering of class names and style properties within the JSX is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
apps/web/src/app/[locale]/menu/page.tsx (1)
  • 12-12: The reordering of class names in the Link component's className attribute is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
apps/web/src/app/[locale]/(admin)/menu-item.tsx (2)
  • 26-26: The reordering of conditional class assignments in the MenuItem function is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
  • 27-27: The reordering of conditional class assignments in the MenuItem function is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
apps/web/src/app/[locale]/(auth)/register/page.tsx (1)
  • 16-16: The reordering of class names in the div element is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
apps/web/src/app/[locale]/(admin)/new/page.tsx (1)
  • 19-19: The reordering of CSS classes in the div element's className attribute within the PageHeader component is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
apps/web/src/app/[locale]/poll/[urlId]/guest-poll-alert.tsx (2)
  • 36-36: The swapping of order of class names in the RegisterLink and LoginLink components within the GuestPollAlert component is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
  • 39-39: The swapping of order of class names in the RegisterLink and LoginLink components within the GuestPollAlert component is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
apps/web/src/app/[locale]/(admin)/polls/polls-folders.tsx (1)
  • 30-30: The reordering of classes in the className attribute of the PollFolder component is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
apps/web/src/components/user.tsx (2)
  • 47-47: The indentation and formatting of the conditional expression have been adjusted, which is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
  • 48-48: The indentation and formatting of the conditional expression have been adjusted, which is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
apps/web/src/style.css (3)
  • 11-13: The reformatting of the font-feature-settings property is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
  • 31-31: The reordering and modifying of the @apply directives for various CSS classes is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
  • 41-41: The reordering and modifying of the @apply directives for various CSS classes is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
apps/web/src/app/[locale]/(admin)/sidebar.tsx (5)
  • 44-44: The reordering of class names in the className attribute is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
  • 83-83: The reordering of class names in the className attribute is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
  • 105-105: The reordering of class names in the className attribute is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
  • 142-142: The reordering of class names in the className attribute is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
  • 152-152: The reordering of class names in the className attribute is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
apps/web/src/components/event-card.tsx (6)
  • 44-44: The reordering of class names in the className attribute is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
  • 47-47: The reordering of class names in the className attribute is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
  • 59-59: The reordering of class names in the className attribute is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
  • 108-108: The reordering of class names in the className attribute is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
  • 116-116: The reordering of class names in the className attribute is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
  • 121-121: The reordering of class names in the className attribute is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
apps/web/src/components/layouts/poll-layout.tsx (3)
  • 170-170: The modification of the layout styling in the Layout component is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
  • 171-171: The modification of the layout styling in the Layout component is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
  • 172-172: The modification of the layout styling in the Layout component is consistent with the Prettier and Tailwind CSS integration. This change is purely stylistic and does not affect functionality.
apps/web/src/utils/auth.ts (1)
  • 225-225: The change in the type declaration of getAuthOptions and the GetServerSessionParams type is a significant alteration that could potentially affect the authentication logic. Ensure that this change has been thoroughly tested and that it aligns with the intended functionality.

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 a08e198 and e2e0253.
Files ignored due to path filters (11)
  • apps/docs/tsconfig.json is excluded by: !**/*.json
  • apps/landing/tsconfig.json is excluded by: !**/*.json
  • apps/web/tsconfig.json is excluded by: !**/*.json
  • package.json is excluded by: !**/*.json
  • packages/backend/tsconfig.json is excluded by: !**/*.json
  • packages/database/tsconfig.json is excluded by: !**/*.json
  • packages/emails/tsconfig.json is excluded by: !**/*.json
  • packages/icons/tsconfig.json is excluded by: !**/*.json
  • packages/languages/tsconfig.json is excluded by: !**/*.json
  • packages/ui/tsconfig.json is excluded by: !**/*.json
  • packages/utils/tsconfig.json is excluded by: !**/*.json
Files selected for processing (15)
  • .github/ISSUE_TEMPLATE/---bug-report.md (2 hunks)
  • .github/ISSUE_TEMPLATE/---feature-request.md (1 hunks)
  • apps/docs/contribute/documentation.mdx (1 hunks)
  • apps/docs/contribute/translations.mdx (2 hunks)
  • apps/docs/introduction.mdx (1 hunks)
  • apps/docs/self-hosting/introduction.mdx (1 hunks)
  • apps/docs/workflow/finalize.mdx (1 hunks)
  • apps/landing/src/components/blog/markdown-styles.module.css (1 hunks)
  • apps/landing/src/pages/cookie-policy.tsx (1 hunks)
  • apps/landing/src/pages/privacy-policy.tsx (1 hunks)
  • apps/landing/src/pages/terms-of-use.tsx (1 hunks)
  • apps/landing/src/style.css (1 hunks)
  • packages/ui/alert.tsx (2 hunks)
  • packages/ui/table.tsx (1 hunks)
  • packages/ui/toast.tsx (3 hunks)
Files skipped from review due to trivial changes (12)
  • .github/ISSUE_TEMPLATE/---feature-request.md
  • apps/docs/contribute/documentation.mdx
  • apps/docs/contribute/translations.mdx
  • apps/docs/introduction.mdx
  • apps/docs/self-hosting/introduction.mdx
  • apps/landing/src/components/blog/markdown-styles.module.css
  • apps/landing/src/pages/cookie-policy.tsx
  • apps/landing/src/pages/terms-of-use.tsx
  • apps/landing/src/style.css
  • packages/ui/alert.tsx
  • packages/ui/table.tsx
  • packages/ui/toast.tsx
Additional comments: 5
apps/docs/workflow/finalize.mdx (1)
  • 30-30: An empty line has been added within the <Steps> component. This change does not seem to affect the functionality or layout and appears to be a formatting adjustment.
.github/ISSUE_TEMPLATE/---bug-report.md (3)
  • 4-4: The title field in the bug report template is empty. If this is intentional to prompt the user to fill it in, it's fine; otherwise, it should be populated with a default value or placeholder.
  • 6-6: The assignees field is also empty. Similar to the title field, if this is intentional, it's acceptable. If not, consider adding a default assignee or guidance for the user.
  • 27-37: The formatting changes in the "Desktop" and "Smartphone" sections improve readability by removing extra spaces and adding hyphens. This is a good practice for maintaining a clean and consistent markdown format.
apps/landing/src/pages/privacy-policy.tsx (1)
  • 10-10: The classes in the div element have been reordered. This change is likely related to the updated Prettier configuration and should not affect the functionality, but it's important to ensure that the visual layout remains consistent across different browsers and screen sizes.

@lukevella lukevella merged commit 239563e into main Jan 19, 2024
5 checks passed
@lukevella lukevella deleted the fix-prettier branch January 19, 2024 07:23
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.

1 participant