-
-
Notifications
You must be signed in to change notification settings - Fork 227
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: improve styling in pro-help page #1376
base: main
Are you sure you want to change the base?
Conversation
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.
The website uses markdown in lots of places already. You shouldn't need to include a new dependency, just use what's already being used on other pages. If you don't find it I'm sure someone can chime in and point you at the right component.
Sure. Please help. |
@Thund3rHawk, have you had a chance to explore the StyledMarkdown component that we’ve integrated across our website? |
Hello @DarhkVoyd, thank you for pointing this out! I haven’t had the chance to explore the StyledMarkdown component yet, but I’m looking forward to diving into it. Could you let me know the best place to ask questions if I get stuck along the way? |
… in pro-help page
@jdesrosiers done. Please check. |
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.
@Thund3rHawk your PR is failing CI checks pls. fix them by running the command yarn format:fix
in console.
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
@DhairyaMajmudar done. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1376 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 10 10
Lines 373 373
Branches 94 94
=========================================
Hits 373 373 ☔ View full report in Codecov by Sentry. |
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.
Hello @jdesrosiers, I’ve noticed an issue with the input item, which seems to occur because we are rendering JSON inside a Markdown component. Could you suggest a solution to resolve this issue? Alternatively, I’m considering creating a JSON-to-Markdown converter. Please advise on which approach would be more effective. |
That doesn't make sense. It shouldn't make any difference where the data came from. It could be JSON, YAML, or even plain text. By the time the component gets it, it's just a string. So, a new component doesn't make sense to me.
From what I can see, it looks like the But, I'm not very familiar with the website's architecture so, @DarhkVoyd or @DhairyaMajmudar can probably give better guidance in this case. |
I think it should be a new issue. I'll work on that. |
Hi @jdesrosiers @Thund3rHawk, I explored the root cause of the issue and its not related to In the contractors.json file the bio data of Jason consists of special characters This can be resolved if we replace that special character to |
Here's how it looks after doing the changes, making the text consistent with other contractors text Opened a PR in community repo to resolve this: json-schema-org/community#869 |
It sounds like your solution is backwards. The problem isn't that my bio is being interpreted as markdown. The problem is that the other bios aren't being interpreted as markdown. The bio field should always be interpreted as markdown, not HTML. |
Would it be better if the bio came inside a markdown format instead of JSON? I feel it might be a more efficient solution. |
That sentence doesn't make sense to me. What does it mean for the bio to come inside a markdown format? Markdown is just a string that uses markdown syntax. The bio is a string that uses markdown syntax. What are you suggesting should be different? |
Hello @jdesrosiers @DhairyaMajmudar, Please check now the bio renders correctly as expected. |
Sorry I posted this comment on the issue instead of the PR on accident. It explains the problem and the solution. Using the The solution is in the comment that I linked to above. That will ensure that the markdown gets styled consistently across all bios and the rest of the site. That does mean that the line spacing of the bios will be different than before this change. @DarhkVoyd, @DhairyaMajmudar, do we care that the styling is a little different than it was before? If so, what's the best way to adjust the line height just for this page? |
Thank you @jdesrosiers for suggesting the fix, after applying the
We can achieve this by passing a default false prop in What are your views for this? |
I think you're assuming that block mode would only be used on this page. That's not correct. The entire site renders markdown in block mode. I'm pretty certain that this page is the only place were the markdown we use is simple enough that markdown-to-jsx decided to render it in inline mode instead of block mode. Everywhere else uses block mode. So, setting So, my solution would be to set @DhairyaMajmudar, I think your solution is ok but I don't think it's the best approach. Your solution is best to make sure we don't accidentally break something now. My solution is best to ensure we don't see this same bug in the future on other pages. Your approach is safer now, but the risk is negligible and has no real consequence, so I'd rather take that risk and protect ourselves from encountering this bug again. The question remains, are we ok with the style changes introduced by using markdown? Does the rest of the page need additional adjustments to match the markdown styling (and the rest of the site)? |
I got your point Jason and it's pretty valid to ensure block mode on all of the website pages where markdown is rendered.
Yeah there are some changes required to match the overall page with the other pages of the website, like...
|
@DhairyaMajmudar Sounds good to me!
I think at a minimum we'll want to update the font color and line spacing to match the markdown. @Thund3rHawk If you implement the fix we've been discussing and at least those minimal style updates, I promise I won't ask for anything else 😆. |
@jdesrosiers Absolutely! I’d be happy to implement the fix you are discussed. If you could help implement the fix along with the font color and line spacing updates, I’d be truly grateful. |
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.
Thanks to everyone who helped with this!
What kind of change does this PR introduce?
Adjust the styling of the pro-help page to address the inconsistent image sizes, wrap the bio inside a markdown component for increasing word limitations and resolve the spacing issues between the cards.
Issue Number:
Screenshots/videos:
If relevant, did you update the documentation?
No
Summary
This pr resolves the issue #1368