-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add back-to-top links to resume sections #94
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
feat: Add back-to-top links to resume sections #94
Conversation
|
Caution Review failedThe pull request is closed. Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds an anchor id to the resume page title and introduces a reusable BackToTopLink component, then places that link beside the H2 headings in the Experience and Recommendation partials by converting each header into a flex wrapper. Changes
Sequence Diagram(s)sequenceDiagram
participant User as User
participant Section as Experience/Recommendation Section
participant Browser as Browser/Viewport
participant Page as ResumePage (id="resume-top")
User->>Section: Click "Back to top"
Section->>Browser: Anchor navigation to #resume-top
Browser->>Page: Scroll/jump to element with id="resume-top"
Note right of Browser: Viewport aligns to the top title
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
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. Comment |
Summary of ChangesHello @gocanto, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the user experience on the resume page by introducing 'back-to-top' navigation links. These links are strategically placed within the 'Work Experience' and 'Recommendations' sections, allowing users to effortlessly return to the top of the page, improving overall site navigation, especially on longer pages. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request adds 'back-to-top' links to the 'Work Experience' and 'Recommendations' sections of the resume page. The implementation is straightforward, adding an anchor ID to the page title and then adding links in the respective section partials. My main feedback is regarding code duplication for the 'back-to-top' link, which is identical in two different components. I've recommended extracting this into a reusable component to improve maintainability.
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/partials/RecommendationPartial.vue (1)
3-12: Consider extracting the duplicated header pattern.The back-to-top link implementation (lines 5-11) is duplicated identically in
ExperiencePartial.vue(lines 5-11). To improve maintainability and follow DRY principles, consider creating a reusable component for section headers with back-to-top links.Example extraction:
<!-- New file: src/partials/SectionHeaderPartial.vue --> <template> <div class="flex flex-wrap items-center justify-between gap-4"> <h2 :class="headingClass"> <slot /> </h2> <a class="inline-flex items-center gap-2 rounded-full border border-slate-200/70 px-4 py-2 text-sm font-medium text-slate-600 transition-colors hover:border-fuchsia-400/70 hover:text-slate-800 dark:border-slate-700/80 dark:text-slate-300 dark:hover:text-slate-100" href="#resume-top" > <span aria-hidden="true">↑</span> Back to top </a> </div> </template> <script setup lang="ts"> defineProps<{ headingClass?: string; }>(); </script>Then use it in both partials:
<SectionHeaderPartial heading-class="h2 font-aspekta text-slate-700 dark:text-slate-300"> Work Experience </SectionHeaderPartial>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/pages/ResumePage.vue(1 hunks)src/partials/ExperiencePartial.vue(1 hunks)src/partials/RecommendationPartial.vue(1 hunks)
🔇 Additional comments (2)
src/pages/ResumePage.vue (1)
18-18: LGTM! Clean anchor implementation.The
id="resume-top"attribute on the main heading provides a proper target for the back-to-top links without affecting semantics or accessibility.src/partials/ExperiencePartial.vue (1)
3-12: Well-structured back-to-top implementation.The flex container properly positions the heading and back-to-top link. The arrow icon is correctly marked as
aria-hidden="true"since the "Back to top" text provides sufficient context.However, verify consistency with the implementation in
RecommendationPartial.vue(lines 3-12) to ensure both partials use identical styling and structure. Consider extracting this header pattern into a reusable component if the duplication extends beyond these two files.
Summary
Testing
make formatnpm test -- --runInBand(fails: vitest not found in environment)https://chatgpt.com/codex/tasks/task_e_68df8f77047483339f5a5a624d15ada1
Summary by CodeRabbit