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

Remember the last active tab and show it by default #16

Closed
sindresorhus opened this issue Apr 3, 2019 · 3 comments · Fixed by #26
Closed

Remember the last active tab and show it by default #16

sindresorhus opened this issue Apr 3, 2019 · 3 comments · Fixed by #26
Labels
enhancement New feature or request 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted Extra attention is needed

Comments

@sindresorhus
Copy link
Owner

sindresorhus commented Apr 3, 2019

Issuehunt badges

From the HIG:

Restore the last viewed preference pane. If the user switches preference panes, your app should remember this change and show the same pane immediately the next time the user opens your preferences window.

We don't currently do that. I think we should do it when users call .show() without an argument, and mention in the docs that that should be the preferred way to show the preferences window, and refer to the HIG docs. This would be another benefit of having #14 and we could enforce it there.

divinedominion earned $80.00 by resolving this issue!

@sindresorhus sindresorhus added enhancement New feature or request help wanted Extra attention is needed labels Apr 3, 2019
@DivineDominion
Copy link
Collaborator

DivineDominion commented Apr 5, 2019

I always disliked this in my apps, but it's the default behavior if I remember correctly: if you call NSWindowController.showWindow, it restores the pane before closing. In fact, it seems the window stays hidden all the time during the app's lifecycle and is not disposed when closed.

So not selecting a tab when users pass nil should do the trick, i.e disable how this works:
https://github.com/sindresorhus/Preferences/blob/master/Sources/Preferences/PreferencesTabViewController.swift#L62

@IssueHuntBot
Copy link

@IssueHunt has funded $80.00 to this issue.


@IssueHuntBot
Copy link

@sindresorhus has rewarded $56.00 to @DivineDominion. See it on IssueHunt

  • 💰 Total deposit: $80.00
  • 🎉 Repository reward(20%): $16.00
  • 🔧 Service fee(10%): $8.00

@issuehunt-oss issuehunt-oss bot added the 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt label May 10, 2019
dezinezync pushed a commit to dezinezync/Preferences that referenced this issue Dec 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants