github-readme-quotes icon indicating copy to clipboard operation
github-readme-quotes copied to clipboard

refactor: remove Theme.js code duplication

Open Vedavyasa21 opened this issue 2 months ago β€’ 4 comments

Summary Removed duplicated theme constants in /frontend/src/util/themes/index.js and consolidated them into a single exported object. This ensures a single source of truth for theme values and improves maintainability.

Changes Made Deleted redundant theme entries that were duplicated from the backend version. Kept only one consolidated export for all theme constants. Verified frontend imports and functionality remain intact.

Summary by CodeRabbit

  • Chores
    • Removed the "default_repocard" theme option from the list of available themes.
    • No other themes or visual defaults were changed; existing theme behavior and appearance remain the same for users.

Vedavyasa21 avatar Oct 25 '25 15:10 Vedavyasa21

@veda1121 is attempting to deploy a commit to the shravan20's projects Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Oct 25 '25 15:10 vercel[bot]

Walkthrough

The default_repocard theme property was removed from the exported themes in two theme configuration files. No other theme entries, logic, or control flow were modified.

Changes

Cohort / File(s) Summary
Theme entry removals
frontend/src/util/themes/index.js, src/themes/themes.js
Deleted the default_repocard property from the exported themes objects in both files; other theme definitions unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Identical, small deletion applied to two related files.
  • No logic, control flow, or dependency changes to verify.

Poem

🐰 I hopped through code with careful cheer,
Saying goodbye to a card so dear.
Two tiny edits, quiet and neat,
A lighter theme β€” a tidy feat! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
βœ… Passed checks (2 passed)
Check name Status Explanation
Description Check βœ… Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check βœ… Passed The pull request title "refactor: remove Theme.js code duplication" directly aligns with the primary change in the pull request. The changeset removes the duplicate "default_repocard" theme entry from both frontend/src/util/themes/index.js and src/themes/themes.js, which was identical to the "default" theme. The title accurately captures this refactoring objective of eliminating code duplication and consolidating theme definitions into a single source of truth. The phrasing is clear, specific, and avoids vague terminology.
✨ Finishing touches
  • [ ] πŸ“ Generate docstrings
πŸ§ͺ Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

πŸ“œ 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 676b6046451b786ea6c70a17cb531801235f8f71 and a1c7239c553557e224700ee07833b275a95f0f0d.

πŸ“’ Files selected for processing (1)
  • src/themes/themes.js (0 hunks)
πŸ’€ Files with no reviewable changes (1)
  • src/themes/themes.js

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

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Oct 25 '25 15:10 coderabbitai[bot]

Thanks for the review! I have removed the default_repocard reference from frontend/src/config/cardTemplate/index.js to match the backend cleanup in src/themes/themes.js. This ensures the frontend and backend theme exports are now consistent, and no API failures should occur due to missing theme references.

Vedavyasa21 avatar Oct 26 '25 15:10 Vedavyasa21

Hey @zhravan once check the PR

Vedavyasa21 avatar Nov 20 '25 13:11 Vedavyasa21