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: link-redirect-fix #1046

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Yashwanth1906
Copy link

@Yashwanth1906 Yashwanth1906 commented Oct 20, 2024

What kind of change does this PR introduce?

  • Change to correct wrong redirecting URLs

Issue Number:

Screenshots/videos:

If relevant, did you update the documentation?

Summary

This pull request addresses an issue related to incorrect URL redirection in the JSON Schema website. Users were being redirected to incorrect or unintended pages when clicking on certain links.

Changes Made:

  1. Corrected Redirecting URLs: Updated the wrong redirecting URLs in various components to ensure they point to the correct destinations. This change enhances navigation and provides users with access to the intended content.

  2. Refactored JSX Components: Adjusted the formatting of JSX components to comply with the project's style guide. Specifically, I ensured that there were proper spaces before closing brackets in the JSX tags, addressing the errors raised by the reviewers.

  3. Code Consistency: Ensured consistency in the codebase by adhering to Prettier and ESLint rules, which included correcting formatting issues to enhance code readability and maintainability.

These changes improve user experience by ensuring that links function correctly, reducing frustration caused by misdirected navigation.

Does this PR introduce a breaking change?

  • No

@Yashwanth1906 Yashwanth1906 requested a review from a team as a code owner October 20, 2024 06:36
Copy link

github-actions bot commented Oct 20, 2024

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
website ✅ Ready (View Log) Visit Preview d1c535c

Copy link

codecov bot commented Oct 20, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 99.47%. Comparing base (7666f0d) to head (d1c535c).

Files with missing lines Patch % Lines
components/DocsHelp.tsx 80.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##              main    #1046      +/-   ##
===========================================
- Coverage   100.00%   99.47%   -0.53%     
===========================================
  Files           10       10              
  Lines          373      380       +7     
  Branches        94       97       +3     
===========================================
+ Hits           373      378       +5     
- Misses           0        2       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@benjagm
Copy link
Collaborator

benjagm commented Oct 24, 2024

What is the issue associated with this PR? #1308 does not exists.

Thanks.

@DhairyaMajmudar DhairyaMajmudar changed the title link-redirect-fix fix: link-redirect-fix Oct 24, 2024
@DhairyaMajmudar
Copy link
Member

What is the issue associated with this PR? #1308 does not exists.

Contributor mentioned the wrong issue no. before, I've edited to the real one : )

@benjagm benjagm requested review from DarhkVoyd and removed request for aialok October 26, 2024 07:24
@benjagm
Copy link
Collaborator

benjagm commented Oct 26, 2024

@DarhkVoyd Can you please help reviewing this PR?

Copy link
Member

@DarhkVoyd DarhkVoyd left a comment

Choose a reason for hiding this comment

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

Hey, thanks for the PR. Great idea to refactor the logic into a cleaner snippet. I have some suggestions before we merge this.

  1. The prop name markdownFile is outdated and is no longer clear, I think we should update it to be more descriptive and clear.
  2. In DocsHelpProps, let's keep the prop optional but narrow the prop type from string to clear descriptive String Literal Types such as tsx | _indexmd | indexmd, better for DX with LSP suggestions.
  3. I noticed you missed a few files, so can you please look in the codebase and ensure you cover all the instances with the updates consistently. For instance, edit button at http://localhost:3000/docs is still broken.

All in all good work with the proposed changes and implementation!

@Yashwanth1906
Copy link
Author

I have made all the changes requested. Waiting for your feedback @DarhkVoyd.
Thank you

Copy link
Member

@DarhkVoyd DarhkVoyd left a comment

Choose a reason for hiding this comment

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

Props are conventionally camelCase, while PascalCase is typically for classes and components.

components/DocsHelp.tsx Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest-accepted Pull requests accepted for Hacktoberfest'24
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Bug: Mis-linked page (Again)
4 participants