Skip to content

Conversation

@phlpsong
Copy link
Contributor

@phlpsong phlpsong commented Mar 20, 2024

Description

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

discard_changes_alert.mov

@austincondiff
Copy link
Collaborator

Instead of creating a new Alert, we should simply disable the Discard Changes menu item.

@phlpsong phlpsong changed the title fix: show alert when no discard files Show an alert if not file changes when Discard All Changes Mar 20, 2024
@austincondiff
Copy link
Collaborator

austincondiff commented Mar 20, 2024

I take that back, I didn't realize this is what Xcode does

@phlpsong
Copy link
Contributor Author

Instead of creating a new Alert, we should simply disable the Discard Changes menu item.

Yes, this is my first thought. But after comparing with Xcode and try the Stash Changes in our app, I think this behavior is more consistent with them.

@austincondiff
Copy link
Collaborator

In my defense, Empty Trash is disabled when the trash is empty...
image

@phlpsong
Copy link
Contributor Author

Yes, in most cases we simply disable the button 😁

Copy link
Contributor

@matthijseikelenboom matthijseikelenboom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll approve it because it has been made now anyway, but this is nitpicking for the sake of nitpicking.

If disabling a button is just as effective and results in less code (therefore less complexity), that's fine.

"But Xcode ..." doesn't fly for me in these cases

@austincondiff austincondiff merged commit aecf3d4 into CodeEditApp:main Mar 20, 2024
@thecoolwinter thecoolwinter added the bug Something isn't working label Jul 19, 2024
@thecoolwinter thecoolwinter changed the title Show an alert if not file changes when Discard All Changes Show An Alert If No Changes Available When Using Discard All Changes Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants