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

chore: UI upt sync search with alpha branch #223

Draft
wants to merge 5 commits into
base: search
Choose a base branch
from

Conversation

AndlerRL
Copy link
Contributor

@AndlerRL AndlerRL added the chore label May 21, 2024
@AndlerRL AndlerRL self-assigned this May 21, 2024
Copy link

vercel bot commented May 21, 2024

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

Name Status Preview Comments Updated (UTC)
masterbots ❌ Failed (Inspect) May 21, 2024 10:15pm

Copy link
Contributor

coderabbitai bot commented May 21, 2024

Important

Review Skipped

Auto reviews are disabled on base/target branches other than the default branch. Please add the base/target branch pattern to the list of additional branches to be reviewed in the settings.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

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.
  • 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.

@AndlerRL AndlerRL marked this pull request as draft May 21, 2024 22:16
Copy link

⚡️ Lighthouse report

Page: https://masterbots-759fgdn7m-bitcash.vercel.app/
Report https://storage.googleapis.com/lighthouse-infrastructure.appspot.com/reports/1716330062754-79879.report.html

Category Score
🟠 Performance 89
🟢 Accessibility 93
🟢 Best practices 100
🟠 SEO 67
🔴 PWA 38

Page: https://masterbots-759fgdn7m-bitcash.vercel.app/b/moneybot
Report https://storage.googleapis.com/lighthouse-infrastructure.appspot.com/reports/1716330063165-97581.report.html

Category Score
🟢 Performance 92
🟢 Accessibility 93
🟢 Best practices 100
🟠 SEO 67
🔴 PWA 38

Page: https://masterbots-759fgdn7m-bitcash.vercel.app/u/slug-1
Report https://storage.googleapis.com/lighthouse-infrastructure.appspot.com/reports/1716330063637-99030.report.html

Category Score
🟢 Performance 91
🟢 Accessibility 93
🟢 Best practices 100
🟠 SEO 67
🔴 PWA 38

Page: https://masterbots-759fgdn7m-bitcash.vercel.app/p
Report https://storage.googleapis.com/lighthouse-infrastructure.appspot.com/reports/1716330064054-39964.report.html

Category Score
🟢 Performance 91
🟢 Accessibility 93
🟢 Best practices 100
🟠 SEO 67
🔴 PWA 38

Page: https://masterbots-759fgdn7m-bitcash.vercel.app/health
Report https://storage.googleapis.com/lighthouse-infrastructure.appspot.com/reports/1716330064427-29893.report.html

Category Score
🟢 Performance 92
🟢 Accessibility 93
🟢 Best practices 100
🟠 SEO 67
🔴 PWA 38

Page: https://masterbots-759fgdn7m-bitcash.vercel.app/health/a8103808-14a3-48ed-aa5a-9e490cfdcf0e
Report https://storage.googleapis.com/lighthouse-infrastructure.appspot.com/reports/1716330064786-58636.report.html

Category Score
🟢 Performance 92
🟢 Accessibility 93
🟢 Best practices 100
🟠 SEO 67
🔴 PWA 38

@@ -1,4 +1,8 @@
'use client'
Copy link
Member

Choose a reason for hiding this comment

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

@AndlerRL dont use client for this. use aria-data css.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why aria on the CSS? The idea here is to scroll into the thread location, not to change the styling. How do I use then client functions without a client component? The scrollIntoView is client side. Why not to use client here? 🤔

import { DialogProps } from '@radix-ui/react-dialog'
import type { MB } from '@repo/supabase'
import { cn } from '@/lib/utils'
'use client'
Copy link
Member

Choose a reason for hiding this comment

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

dont use client here, remember we need to discuss as team everytime we want to use client

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there any reason to not use use client? Why to put all the weight to the server side? 🤔

Copy link
Member

Choose a reason for hiding this comment

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

  • we are following next14 app router standards to benefits from nextjs features, that's the point.
  • you need to use client as long resort when any other way to do it with as server component.
  • all state needs to be handled thru url and aria data first as in <ThreadHeading> we use data-[state=open]:bg-mirage instead of const[open,setOpen] = useState().
  • when you use client on layout component can possibly get out of sync with nextjs app router state and therefore not update the rendered data.
  • best practice is use client only in small components like buttons and forms, but not on layout components cos you loose a lot of the benefits of using nextjs, basically you turn the whole app into a regular react app without next. you need follow the nextjs standard way.
  • when you start using use client you not only go against the technical design but also starting to create web vitals issues

import { useRouter, useSearchParams } from 'next/navigation'
import { useEffect, useRef, useState } from 'react'

// ! This component is not necessary to be split this way, only functionality.
Copy link
Member

Choose a reason for hiding this comment

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

This is work in progress, you can ignore it


const queryKey = [usePathname(), query]
const [lastQueryKey, setLastQueryKey] = useState(queryKey)
const { isFetchingNextPage, fetchNextPage, data, refetch } = useInfiniteQuery(
Copy link
Member

Choose a reason for hiding this comment

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

we dont want use client. that's why we are doing infinite scrolling the nextjs way

@gaboesquivel
Copy link
Member

Pretty much all changes are not needed, all we need to add to search once its completed is css updates.

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.

None yet

3 participants