Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: move code diff to separate tab#3286

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
calebdw wants to merge1 commit intorectorphp:main
base:main
Choose a base branch
Loading
fromcalebdw:calebdw/push-mqmqtsomqntt

Conversation

@calebdw
Copy link
Contributor

Hello!

I've had several issues with the existing diff system:

  • it's almost impossible edit code that's behind the diff if I need to update something
  • diffs with long lines require a lot of back and forth horizontal scrolling to see everything
  • if there's more than one diff section then only the last one has a scroll bar

So I decided to try and change that! This PR moves the diff into a separateDiff tab which allows you to: quickly switch back and forth between the code and the diff, it reduces horizontal scrolling, and every diff section has its own scroll bar if needed.

Before

image

After

imageimageimage

Thanks!

SanderMuller reacted with rocket emoji
@samsonasik
Copy link
Member

is the diff default selected after submit or uri has hash target demo? If yes, then i'm ok with this.

@calebdw
Copy link
ContributorAuthor

Yes, it's automatically selected on page load

@TomasVotruba
Copy link
Member

Hey,

thanks for proposal. The idea behind demo is solely using it for simple code snippets to show bugs, typically 5-10 lines of code. It should not be used as "IDE" or coding editor.

Saying that it's a feature, not a bug :)

One way to try this out would be optional switcher, but that could lead to pretty confusing DX.

I'm open to simpler UI that would solve your problem, and navigated to short demo files at the same time.

@calebdw
Copy link
ContributorAuthor

It should not be used as "IDE" or coding editor.

I understand that, but there have been cases where I tried to apply the rules, but something was messed up and I needed to edit behind the diff and rerun. There's also been times where the example is a bit longer (horizontally) and it can be difficult/tedious to view the diff

One way to try this out would be optional switcher, but that could lead to pretty confusing DX.

I agree, I would rather be consistent in the presentation

I'm open to simpler UI that would solve your problem, and navigated to short demo files at the same time.

Could you provide some ideas? I'm not too sure what you're looking for. Here's what it looks like for the example code---I think it's pretty clean:

imageimage

Another option could be to show the diff under the code, something like (rough draft):

image

Thoughts?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@calebdw@samsonasik@TomasVotruba

[8]ページ先頭

©2009-2025 Movatter.jp