Skip to content

Update things#37

Merged
Nusab19 merged 8 commits intoContest-Hive:mainfrom
Nusab19:main
Apr 2, 2025
Merged

Update things#37
Nusab19 merged 8 commits intoContest-Hive:mainfrom
Nusab19:main

Conversation

@Nusab19
Copy link
Copy Markdown
Member

@Nusab19 Nusab19 commented Apr 2, 2025

Summary by CodeRabbit

  • New Features

    • Added a portfolio link for Safin Sarker, opening securely in a new tab.
    • Introduced a streamlined theme toggle for direct switching between light and dark modes.
    • Updated contest and platform sections to fetch the latest "Last Updated" timestamp dynamically and persist user platform selections.
  • Style

    • Refined UI text and layout (e.g., updated labels and alignment) for clearer, more intuitive displays.
    • Removed a redundant Markdown support label in the editor for a cleaner interface.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 2, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The changes introduce a new task in the TODO list, add a portfolio link for a person in the credits, and update several components to use dynamically fetched timestamps via an asynchronous helper. Other modifications include refactoring the theme toggle to simplify user interaction, replacing state with local storage for persistent UI values, adjusting minor UI text and formatting, and updating database connection parameters for tighter pool and timeout specifications.

Changes

File(s) Change Summary
TODO.md New task added: "make db queries from client side."
src/app/credits/components/imageCards.tsx Added a new portfolio link for Safin Sarker; updated anchor tag to open in a new tab with security attributes.
src/app/focused/page.tsx, src/components/ContestSection.tsx, src/lib/helpers/server.ts Integrated asynchronous retrieval of lastUpdated by importing and using getLastUpdatedTime instead of a static date.
src/components/ContestsTable.tsx Replaced useState with a custom useLocalStorage hook for the platform variable; performed layout and styling adjustments.
src/components/Navbar.tsx, src/components/ui/theme-toggle.tsx Refactored theme toggle: renamed from ModeToggle to ThemeToggle, adjusted import/export style, and simplified toggle by removing dropdown menu.
src/components/sub/MdEditor.tsx, src/components/sub/RelativeTime.tsx, src/components/sub/SelectPlatform.tsx Made minor UI updates: commented out the markdown label, changed text from "just now" to "Now" and "Last Modified:" to "Last Updated:", and updated button styling with dynamic text.
src/db/index.ts Lowered connection pool size and reduced several timeout settings in the MongoDB connection configuration.

Sequence Diagram(s)

sequenceDiagram
  participant C as Component (Focused/ContestSection)
  participant H as getLastUpdatedTime (Helper)
  participant S as Server
  C->>H: Call getLastUpdatedTime()
  H->>S: Send GET request for lastUpdated
  S-->>H: Return JSON data with lastUpdated
  H-->>C: Provide lastUpdated value
Loading
sequenceDiagram
  participant U as User
  participant T as ThemeToggle Component
  participant S as Theme State
  U->>T: Click toggle button
  T->>T: Execute toggleTheme()
  T->>S: Update theme ("dark" ↔ "light")
  S-->>T: New theme applied
Loading

Poem

I'm a rabbit in a code burrow, leaping with delight,
New tasks and toggles make my sprint feel so light.
Portfolio links hop open in a brand new tab,
Async calls and local storage—no more coding drab.
With themes that swing from dark to bright,
And database tweaks keeping things just right,
I hop, I cheer—oh what a joyful night!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 59efb38 and 0f7c5d2.

⛔ Files ignored due to path filters (1)
  • public/assets/svgs/portfolio.svg is excluded by !**/*.svg
📒 Files selected for processing (12)
  • TODO.md (1 hunks)
  • src/app/credits/components/imageCards.tsx (2 hunks)
  • src/app/focused/page.tsx (1 hunks)
  • src/components/ContestSection.tsx (1 hunks)
  • src/components/ContestsTable.tsx (4 hunks)
  • src/components/Navbar.tsx (2 hunks)
  • src/components/sub/MdEditor.tsx (1 hunks)
  • src/components/sub/RelativeTime.tsx (2 hunks)
  • src/components/sub/SelectPlatform.tsx (2 hunks)
  • src/components/ui/theme-toggle.tsx (1 hunks)
  • src/db/index.ts (1 hunks)
  • src/lib/helpers/server.ts (2 hunks)
✨ Finishing Touches
  • 📝 Docstrings were successfully generated. (🔄 Check again to generate docstrings again)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 using 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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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.

@Nusab19 Nusab19 merged commit 67b1282 into Contest-Hive:main Apr 2, 2025
1 check was pending
coderabbitai bot added a commit that referenced this pull request Apr 2, 2025
Docstrings generation was requested by @Nusab19.

* #37 (comment)

The following files were modified:

* `src/app/credits/components/imageCards.tsx`
* `src/components/ContestSection.tsx`
* `src/components/ContestsTable.tsx`
* `src/components/sub/MdEditor.tsx`
* `src/components/sub/SelectPlatform.tsx`
* `src/components/ui/theme-toggle.tsx`
* `src/db/index.ts`
* `src/lib/helpers/server.ts`
@coderabbitai coderabbitai bot mentioned this pull request Apr 2, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 2, 2025

Note

Generated docstrings for this pull request at #38

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