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

fix: Remove Haptic Feedback on Launch (#916) #976

Merged
merged 3 commits into from
Jan 15, 2023

Conversation

Cubik65536
Copy link
Contributor

@Cubik65536 Cubik65536 commented Jan 15, 2023

Description

  • Remove the viewWillAppear in CodeEditSplitViewController that resizes the sidebar when launches. This function is not needed and the resize will trigger the splitView, which triggers the haptic feedback.

Related Issue

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • I documented my code
  • Review requested

@austincondiff
Copy link
Collaborator

austincondiff commented Jan 15, 2023

We need to set the sidebar width to what the user had it set to on init so user preferences are remembered across app restarts.

Maybe we could do a check to see if this setting is equal to the snap with and not resize if it is.

Edit: It appears that we are not currently persisting the users preferred width but I think that is why this code was written, so that we can add the preferred width here when that logic is put in place.

@Cubik65536
Copy link
Contributor Author

We need to set the sidebar width to what the user had it set to on init so user preferences are remembered across app restarts.

From what I've seen, for now, it seems that it's set to the same value anyway, so that's why I did the changes in this way.

@austincondiff
Copy link
Collaborator

That is fine, we just need to keep this in mind in #917.

@Cubik65536
Copy link
Contributor Author

Edit: It appears that we are not currently persisting the users preferred width but I think that is why this code was written so that we can add the preferred width here when that logic is put in place.

This logic was not there before the snap and haptic were added, so I thought this change would work, but I see how this is needed in the future.

Maybe we could do a check to see if this setting is equal to the snap with and not resize if it is.

So the idea would be: if the user's preferred width is the snap width, then we skip the init.

@Cubik65536
Copy link
Contributor Author

Cubik65536 commented Jan 15, 2023

I probably can’t do it right now, so my recommendation is to merge this for now and keep tracking this in other issues.


I can add a // TODO for this if you want

@austincondiff
Copy link
Collaborator

So the idea would be: if the user's preferred width is the snap width, then we skip the init.

That is the thought, yes. @Code-DJ may need to do this as he is working on this now.

Maybe just comment out the function call with a todo comment mentioning this.

@Cubik65536
Copy link
Contributor Author

So the idea would be: if the user's preferred width is the snap width, then we skip the init.

That is the thought, yes. @Code-DJ may need to do this as he is working on this now.

Maybe just comment out the function call with a todo comment mentioning this.

I've added a TODO comment mentioning this.

@austincondiff
Copy link
Collaborator

Perfect!

Copy link
Collaborator

@austincondiff austincondiff left a comment

Choose a reason for hiding this comment

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

Thanks for tracking this down!

@lukepistrol lukepistrol merged commit a9a321a into CodeEditApp:main Jan 15, 2023
@Cubik65536 Cubik65536 deleted the remove-launch-haptic branch January 15, 2023 17:47
@Cubik65536 Cubik65536 mentioned this pull request Jan 18, 2023
14 tasks
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.

3 participants