Skip to content

fix: make Preview Output sticky to prevent scroll (#348) #349

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Rohitk131
Copy link

Fixes #348

πŸ› Problem

When scrolling down while editing the JSON data, the "Preview Output" panel also scrolls out of view, causing a bad user experience.

βœ… Solution

Made the preview panel sticky using position: sticky to ensure it stays side-by-side and always visible, regardless of JSON scroll depth.

Screenshots or Video

![Preview Sticky Fix] (https://drive.google.com/file/d/1ErWiv0Q2TWDR1Tk1gRNT0XFsYiD3Whry/view?usp=sharing)

πŸ§ͺ Tested On

  • Chrome
  • Firefox
  • Responsive (Mobile / Tablet view)

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to main from fork:Rohitk131/i348/fix-preview-scroll

@Rohitk131 Rohitk131 requested a review from a team as a code owner April 8, 2025 11:50
Copy link

netlify bot commented Apr 8, 2025

❌ Deploy Preview for ap-template-playground failed.

Name Link
πŸ”¨ Latest commit 495ccdf
πŸ” Latest deploy log https://app.netlify.com/sites/ap-template-playground/deploys/67f50d71b8d94e0008e0d8f0

@Rohitk131
Copy link
Author

Hi @DianaLease and team,

This PR addresses Issue #348, which pointed out a usability concern in the Template Playground β€” the "Preview Output" panel would scroll out of view when navigating through large JSON data, making side-by-side editing inconvenient.

🐞 Problem
Users had to frequently scroll up and down to cross-reference their input with the output, which negatively impacted the workflow and user experience.

βœ… Solution
The fix applies position: sticky to the Preview Output panel, allowing it to remain visible as users scroll through the editor. This creates a smoother and more productive editing experience, especially for longer inputs.

I’ve tested the changes across different screen sizes and browsers to ensure responsiveness and consistency.

Looking forward to your feedback β€” happy to iterate if needed! Thanks for your time and all the great work on the project. πŸ™Œ

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.

Preview Panel Scrolls with Page Instead of Staying Fixed
1 participant