AnguHashBlog / angular-primeng

🅰 Angular Blog Integration Template including PrimeNG: Seamlessly connects to Hashnode's APIs, effortlessly fetching and integrating your blog data. Compatible with any Hashnode blog.
https://angularprimeng.anguhashblog.com/
MIT License
10 stars 5 forks source link

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

Closed MestiriBaha closed 4 months ago

MestiriBaha commented 4 months ago

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)

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?

[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]

MestiriBaha commented 4 months ago

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 !

monacodelisa commented 4 months ago

@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 :)

monacodelisa commented 4 months ago

@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 commented 4 months ago

@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 !

monacodelisa commented 4 months ago

@MestiriBaha ok so what you need to do is head over to the issue https://github.com/AnguHashBlog/angular-primeng/issues/74

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

image