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

fix: Open Blogs Link in a New Tab for Better UX #903

Merged
merged 8 commits into from
May 19, 2024

Conversation

Vimall03
Copy link
Contributor

@Vimall03 Vimall03 commented May 16, 2024

Pull Request Details

Description

Opens Blogs Link in a New Tab for Better UX & Added Blogs Link in Footer under Connect Section

Fixes

Fixes #893

Type of PR

  • Bug fix
  • Feature enhancement
  • Documentation update
  • Refactoring
  • Other (specify): _______________

Summary

This pull request adds functionality to open the Blogs link in a new tab for improved user experience. Additionally, it includes the addition of the Blogs link in the footer under the Connect section.

Additional Notes

Checklist

  • I have read and followed the Pull Requests and Issues guidelines.
  • The code has been properly linted and formatted using npm run lint:fix and npm run format:fix.
  • I have tested the changes thoroughly before submitting this pull request.
  • I have provided relevant issue numbers, snapshots, and videos after making the changes.
  • I have not borrowed code without disclosing it, if applicable.
  • This pull request is not a Work In Progress (WIP), and only completed and tested changes are included.
  • I have tested these changes locally.
  • My code follows the project's style guidelines.
  • I have updated the documentation accordingly.
  • This PR has a corresponding issue in the issue tracker.

Summary by CodeRabbit

  • New Features

    • "Blogs" link now opens in a new tab.
    • Conditional rendering for "Admin" link based on user role and current path.
  • Refactor

    • Simplified className attributes in navigation elements.
    • Improved logic for rendering navigation links based on their titles.

Copy link

netlify bot commented May 16, 2024

👷 Deploy request for v2-digitomize pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 4af2e5f

Copy link

netlify bot commented May 16, 2024

Deploy Preview for digitomize ready!

Name Link
🔨 Latest commit 4af2e5f
🔍 Latest deploy log https://app.netlify.com/sites/digitomize/deploys/664a5baa65c5f90008a2e477
😎 Deploy Preview https://deploy-preview-903--digitomize.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 30 (🟢 up 4 from production)
Accessibility: 80 (no change from production)
Best Practices: 92 (no change from production)
SEO: 79 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

coderabbitai bot commented May 16, 2024

Walkthrough

The NewNavbar.jsx component has been updated to enhance the user experience. Key changes include refactoring class names, adjusting conditional rendering for specific navigation links, and modifying the "Blogs" link to open in a new tab. These modifications aim to improve the functionality and user-friendliness of the navigation bar.

Changes

File Change Summary
client/src/components/globals/Navbar/NewNavbar.jsx - Refactored className attribute to a single line.
- Modified navLinks.map() for "Blogs" link to open in a new tab.
- Adjusted conditional rendering for "Admin" link based on user role and pathname.
- Updated rendering logic for navigation links based on their titles.

Assessment against linked issues

Objective Addressed Explanation
Open the "Blogs" link in a new tab for better UX (#893)
Adjust conditional rendering logic for navigation links based on their titles and user role

In the code of nav, we made it shine,
With links that open, just in time.
Blogs now fly to a new tab's view,
Admin links check who is true.
Our navbar's now a sleeker line,
For a user experience, so divine. 🌟


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.

@Vimall03 Vimall03 changed the title Open Blogs Link in a New Tab for Better UX & Added Blogs Link in Footer under Connect Section Open Blogs Link in a New Tab for Better UX May 16, 2024
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.

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between b4e49c1 and 255aee8.
Files selected for processing (2)
  • client/src/components/NewNavbar.jsx (2 hunks)
  • client/src/components/globals/Footer.jsx (1 hunks)
Additional comments not posted (4)
client/src/components/NewNavbar.jsx (3)

79-80: Refactored className attribute for cleaner code.


94-106: Updated "Blogs" link to open in a new tab for better UX.


120-127: Adjusted conditional rendering logic for the "Admin" link based on user role and pathname.

client/src/components/globals/Footer.jsx (1)

126-134: Added "Blogs" link to the footer under the "Connect" section.

@pranshugupta54
Copy link
Member

It doesn't seem to work for navbar

@Vimall03
Copy link
Contributor Author

okay, i ll look into it

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.

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 255aee8 and d963e0e.
Files selected for processing (1)
  • client/src/components/NewNavbar.jsx (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • client/src/components/NewNavbar.jsx

@Vimall03 Vimall03 changed the title Open Blogs Link in a New Tab for Better UX fix: Open Blogs Link in a New Tab for Better UX May 17, 2024
@Vimall03
Copy link
Contributor Author

@pranshugupta54 kindly check it out now.

@pranshugupta54
Copy link
Member

https://deploy-preview-903--digitomize.netlify.app/

Why is it still opening in same?

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.

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between d963e0e and d0dc97b.
Files selected for processing (1)
  • client/src/components/globals/Navbar/NewNavbar.jsx (3 hunks)
Additional comments not posted (1)
client/src/components/globals/Navbar/NewNavbar.jsx (1)

154-180: Ensure consistency in link handling for "Blogs".

The implementation for opening the "Blogs" link in a new tab using target="_blank" and rel="noopener noreferrer" is correct and follows best practices for external links. This change should enhance user experience by not disrupting the current navigation state.

@Vimall03
Copy link
Contributor Author

@pranshugupta54 I have changed the global navbar. it should be working right now.

@pranshugupta54
Copy link
Member

It opens a new page but goes to home page. (https://deploy-preview-903--digitomize.netlify.app)
Please test locally first

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.

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between d0dc97b and 9b46429.
Files selected for processing (1)
  • client/src/components/globals/Navbar/NewNavbar.jsx (3 hunks)
Files skipped from review as they are similar to previous changes (1)
  • client/src/components/globals/Navbar/NewNavbar.jsx

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.

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 9b46429 and 4af2e5f.
Files selected for processing (1)
  • client/src/components/NewNavbar.jsx (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • client/src/components/NewNavbar.jsx

@Vimall03
Copy link
Contributor Author

@pranshugupta54 Done.

@pranshugupta54 pranshugupta54 merged commit f728e61 into digitomize:main May 19, 2024
7 checks passed
@pranshugupta54
Copy link
Member

🚀 Congratulations on the successful PR merge! 🌟
Thank you for your valuable contribution! 🎉
Let's continue to make waves in open source. Share your achievement on social media and tag Digitomize to help spread the word.

Thank you for your dedication!

@all-contributors please add @Vimall03 for code

@holopin-bot @Vimall03 c-ch

Copy link

holopin-bot bot commented May 19, 2024

Congratulations @Vimall03, you just earned a holobyte! Here it is: https://holopin.io/holobyte/clwdzojws09970cl4bigvcapd

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

Copy link
Contributor

@pranshugupta54

I couldn't determine any contributions to add, did you specify any contributions?
Please make sure to use valid contribution names.

I've put up a pull request to add @Vimall03! 🎉

@Vimall03
Copy link
Contributor Author

Hey @pranshugupta54
As per the latest announcement of the program manager (GSSoC) can you please add the required labels to this PR

image

Extremely sorry for for the inconvenience. Thankyou!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Open Blogs Link in a New Tab for Better UX
2 participants