website icon indicating copy to clipboard operation
website copied to clipboard

πŸ› Bug: JSON blog preview image in Blog page is streched

Open mihail-8480 opened this issue 5 months ago β€’ 11 comments

Describe the bug

This can be fixed by adding this style on the <img> element:

object-fit: contain;

or this Tailwind class:

object-contain

Steps To Reproduce

  1. Go to https://json-schema.org/
  2. Scroll down to "The JSON Schema Blog"
  3. Observe the blog image

Expected Behavior

The image not being stretched

Screenshots

Current Version

Image

After adding object-fit: contain

Image

Device Information [optional]

- OS: Arch Linux
- Browser: `google-chrome` (Stable Channel)
- version: `136.0.7103.113-1`

Are you working on this issue?

No

Do you think this work might require an [Architectural Decision Record (ADR)]? (significant or noteworthy)

No

mihail-8480 avatar Jul 03 '25 19:07 mihail-8480

Welcome to the JSON Schema Community. We are so excited you are here! Thanks a lot for reporting your first issue!! πŸŽ‰πŸŽ‰ Please make sure to take a look at our contributors guide if you plan on opening a pull request. For more details, check out the README.md file.

github-actions[bot] avatar Jul 03 '25 19:07 github-actions[bot]

Thanks for raising it. Feel free to submit a pr.

benjagm avatar Jul 04 '25 09:07 benjagm

@benjagm I think he is not working on the issue as specified in the issue. If you want I can take it up, I have already made a PR which will close the issue.

animeshsahoo1 avatar Jul 04 '25 09:07 animeshsahoo1

Hi, sorry for coming in late. This should be resolved as part of the main page refactoring that's currently in progress as part of the ongoing GSoC project.

idanidan29 avatar Aug 08 '25 18:08 idanidan29

@idanidan29 can you take a look at my PR I have fixed a issue related to cover images in blog page instead of home page it's made after you have made the changes related to ui, let me know if it can be merged.

animeshsahoo1 avatar Aug 08 '25 18:08 animeshsahoo1

@animeshsahoo1 yes, thanks for raising that PR it looks good and does address the issue. however, as part of the homepage refactoring, these parts will be moved into new ShadCN components that will override the current behavior. Because of that, I think it might be more beneficial to continue working on the homepage after the refactor is complete, as moving forward now could lead to duplicated work or potential merge conflicts

idanidan29 avatar Aug 08 '25 18:08 idanidan29

@idanidan29 i understand the home page part but the work on blog page part should be ok right?

animeshsahoo1 avatar Aug 08 '25 18:08 animeshsahoo1

@animeshsahoo1 You're right this does resolve an issue that was causing blog images to overflow and stretch. I initially missed that since the issue was referring to the main page. I think it might be better to update the issue and clarify that it's related to the blog page instead. Would you be able to make that change? That would align well with the PR, especially since this will still be relevant after the homepage refactor

idanidan29 avatar Aug 08 '25 18:08 idanidan29

@idanidan29 I don't have access to change the issue title did you mean my PR?

animeshsahoo1 avatar Aug 08 '25 19:08 animeshsahoo1

I meant the issue that’s okay, I got it. Now we just need to wait for the PR to be merged

idanidan29 avatar Aug 08 '25 19:08 idanidan29

Thanks got it, also I have opened an issue of responsiveness on authors information in blog pages could you take a look at that issue as well.

animeshsahoo1 avatar Aug 08 '25 19:08 animeshsahoo1