Skip to content
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

Formatting the schema.prisma file scrolls the entire window down #1590

Open
divmgl opened this issue Nov 10, 2023 · 5 comments
Open

Formatting the schema.prisma file scrolls the entire window down #1590

divmgl opened this issue Nov 10, 2023 · 5 comments
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. topic: formatting

Comments

@divmgl
Copy link

divmgl commented Nov 10, 2023

Bug description

Formatting the schema.prisma file scrolls the entire window down.

How to reproduce

  1. Create a schema.prisma file that is larger than a screen's height.
  2. Format the document.
  3. Observe the screen getting scrolled down.

Expected behavior

The document is formatted without scrolling.

Prisma information

Prisma version 5.4.2

Environment & setup

  • OS: macOS
  • Editor: VSCode
  • Editor version: Latest
  • Extension version: Latest
@janpio
Copy link
Member

janpio commented Nov 10, 2023

I can not reproduce this, for me it formats the document and just visually updates the current "view" of the schema file I have, whereever I am scrolled to.

How do you format the document?
Is your VS Code configured somehow different than normal?

@divmgl
Copy link
Author

divmgl commented Dec 28, 2023

Sorry, I'm still running into this. VSCode is configured with format on save. I'm just using the Prisma extension. We have a really long schema file. We do have

"editor.codeActionsOnSave": {
  "source.fixAll": "explicit"
},

turned on, so maybe that's needed to make this happen? It is extremely annoying but it's not a blocker at all.

I haven't had to time to create a reproduction case but I hope this helps.

@divmgl
Copy link
Author

divmgl commented Dec 28, 2023

Oh, and it only scrolls down when it needs to format the document on save. Like, if I make a change and press Cmd+S it scrolls down.

@janpio janpio added bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. topic: formatting labels Jan 9, 2024
@mriosb
Copy link

mriosb commented Feb 13, 2024

I have the exact same issue. My schema file is 2800 lines long. When I format on save, it jumps down 100 lines.

@janpio
Copy link
Member

janpio commented Feb 14, 2024

So not the "entire window down" as described in the title, but just 100 lines @mriosb?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. topic: formatting
Projects
None yet
Development

No branches or pull requests

3 participants