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

Feature: author and co-authors to be clickable links leading to the author's page on Hashnode #72

Conversation

MestiriBaha
Copy link
Contributor

This PR Closes Issue

closes #

Description

I added links in the PostDetails component for the authors and co-authors images that will open in a new tab. However, I encountered an issue with special names, such as {{ MonaCodeLisa }}, where the presence of curly brackets caused incorrect ASCII formatting in the links (e.g., https://example.com/@%7B%7MonaCodeLisa %7D%7D). To resolve this problem and ensure proper URL formatting, I created a custom pipe. This pipe removes curly brackets and extra spaces from names, providing an extensible solution for handling special characters throughout the application

What type of PR is this? (check all applicable)

  • [yes] 🅰️ Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Mobile & Desktop Screenshots/Recordings

[Attach screenshots or recordings if applicable]
Before Adding the custom pipe :
image
After I added the custom pipe :
image

Steps to QA

Added to documentation?

  • 📜 README.md
  • 🙅 no documentation needed

[Optional] Post-deployment tasks

[Specify any post-deployment tasks that need to be performed]

[Optional] What gif best describes this PR or how it makes you feel?

[Embed gif or describe the feeling in plain text]

Copy link
Member

@cleancodecraft cleancodecraft left a comment

Choose a reason for hiding this comment

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

@MestiriBaha
very interesting, where do you see this ?

because what I see it this -

image

@MestiriBaha
Copy link
Contributor Author

MestiriBaha commented May 18, 2024

Hello , please try to check the blog post where the author is "monacodeLisa" and there is no co-authors , there where I found the problem !

@esthersoftwaredev
Copy link
Member

esthersoftwaredev commented May 18, 2024

@MestiriBaha ok I saw it -

image

this vas a very good catch thank you for finding this :)

So what we want to do in this case - is to explore the GraphQL query,
since the values are retrieved from the Hashnode's API and ->
if one time the response is monacodelisa and another time it's {{ MonaCodeLisa }} there is some inconsistency.

I tested the queries, first:

Screenshot_19

and then -

Screenshot_20

after that I verified the query that we have in the file graphql.operations.ts and can you guess what showed up

Screenshot_21

The problem is that in our query on line 139, we have:

				author {
					name
					profilePicture
				}

when it needs to be:

				author {
                                        name
					username
					profilePicture
				}

it repeats also on line 175 - just below author & name it still needs to be username

I do appreciate your work creating the pipe, but for this case we need to fix the root cause.

I am going to close this PR and I will write another issue soon - where I will mention everything from this conversation.

I will have to do this across all the app versions. If you would like - once the issue is created in this repo - I can assign it to you, after all you found it :)

@esthersoftwaredev
Copy link
Member

@MestiriBaha here is the new issue - #74 if you would like to take it just leave a comment bellow the issue.
It has higher priority, so this one should be done before #61

@MestiriBaha
Copy link
Contributor Author

@monacodelisa , Thank you so much for your feedback ! I doubted in first place that the root problem can be from the Queries however because of my "little" knowledge of GraphQL syntax , I didn't dig deeper into it , but now , I want to explore the GraphQL query syntax and fix the root of the problem , I would like to take on this issue so assign me on it please !

@esthersoftwaredev
Copy link
Member

@MestiriBaha ok so what you need to do is head over to the issue #74

and leave a comment there, because if your comment is not there, your name does not appear and I cannot assign you

image

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.

3 participants