docs icon indicating copy to clipboard operation
docs copied to clipboard

updated headingStyle for mobile screens in quickStartFilter

Open imdeveshshukla opened this issue 2 months ago • 11 comments

What has changed?

Adjusted the heading style for the “✨ AI Suggested Sample Apps” section in QuickstartFilter.js to improve mobile responsiveness. The headingStyle object now dynamically adjusts marginLeft and fontSize based on the screen width (using window.innerWidth < 480).

This ensures that the header text is properly spaced and sized on smaller devices without affecting the desktop layout.

This PR Resolves #2987

Type of change

  • [x] Bug fix (non-breaking change which fixes an issue).

How Has This Been Tested?

  • [x] run npm run build and npm run serve to check if the changes are working as expected

Before: Header appeared slightly left-cramped and oversized on mobile. image

After: Header spacing and font size adjust automatically for better readability. image

Checklist:

  • [x] My code follows the style guidelines of this project.
  • [x] I have performed a self-review of my own code.

imdeveshshukla avatar Oct 22 '25 21:10 imdeveshshukla

https://github.com/user-attachments/assets/d1380670-42ab-49da-9760-9026278724b9

@Achanandhi-M

imdeveshshukla avatar Oct 23 '25 19:10 imdeveshshukla

Hi @Achanandhi-M, I’ve already fixed the Copilot suggestions and addressed the lint issues. Hopefully, everything should be resolved now. 😊

imdeveshshukla avatar Oct 24 '25 12:10 imdeveshshukla

@Achanandhi-M I used a small custom hook useMediaQuery (which internally uses useEffect) to detect screen width changes dynamically. The reason for using this approach is that it allows the component to reactively update styles at runtime while keeping the existing inline style structure (headingStyle) if you prefer, I can switch to another approach such as using Tailwind’s responsive utilities or simple CSS media queries to handle responsiveness in a cleaner way. Please let me know what you’d recommend.

I’ve also updated the commit message, so the previous linting error should now be resolved. Please let me know if there’s anything else that needs adjustment.

imdeveshshukla avatar Oct 27 '25 18:10 imdeveshshukla

@Achanandhi-M I used a small custom hook useMediaQuery (which internally uses useEffect) to detect screen width changes dynamically. The reason for using this approach is that it allows the component to reactively update styles at runtime while keeping the existing inline style structure (headingStyle) if you prefer, I can switch to another approach such as using Tailwind’s responsive utilities or simple CSS media queries to handle responsiveness in a cleaner way. Please let me know what you’d recommend.

I’ve also updated the commit message, so the previous linting error should now be resolved. Please let me know if there’s anything else that needs adjustment.

@imdeveshshukla A simple media query works fine, and also fix the linter issues

Achanandhi-M avatar Oct 28 '25 08:10 Achanandhi-M

Hey @Achanandhi-M, I’ve updated the PR. Could you please help me with the linting issue, especially the Vale lint one?

imdeveshshukla avatar Oct 29 '25 06:10 imdeveshshukla

Hey @Achanandhi-M, I’ve updated the PR. Could you please help me with the linting issue, especially the Vale lint one?

Vale docs linter is not an actual problem please try to fix the DCO

Achanandhi-M avatar Oct 29 '25 07:10 Achanandhi-M

Hey @Achanandhi-M, I’ve updated the PR. Could you please help me with the linting issue, especially the Vale lint one?

Vale docs linter is not an actual problem please try to fix the DCO

I’ve fixed the DCO issue, please check now.

imdeveshshukla avatar Oct 29 '25 07:10 imdeveshshukla

Hey @Achanandhi-M, please let me know if there is anything else I should update or fix in the PR

imdeveshshukla avatar Oct 30 '25 07:10 imdeveshshukla

@Achanandhi-M Yes, both are different. The class name is used to handle the media queries since we can’t include media queries directly in the inline style attribute in JSX.

imdeveshshukla avatar Oct 30 '25 08:10 imdeveshshukla

Hey @Achanandhi-M , please let me know if there is anything else needed in this pr

imdeveshshukla avatar Oct 31 '25 19:10 imdeveshshukla

@Achanandhi-M Thanks for the review! I’ll revert the font-size change. But without changing it, the heading doesn’t fit well on mobile and wraps awkwardly. How would you prefer this to be handled for small screens?

With Smaller Font Size: image

With Current font-size
image

One more thing i noticed that in bottom next and previous button are also not responsive Should I fix that in the same PR? image

imdeveshshukla avatar Nov 14 '25 17:11 imdeveshshukla