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

Set default view/Show first subcategory #83

Closed
ArvidNy opened this issue Aug 5, 2019 · 2 comments · Fixed by #86
Closed

Set default view/Show first subcategory #83

ArvidNy opened this issue Aug 5, 2019 · 2 comments · Fixed by #86

Comments

@ArvidNy
Copy link
Contributor

ArvidNy commented Aug 5, 2019

I'm trying to add subcategories to the first tab, but I haven't been able to show the first subcategory directly. Is this possible with the current code? Since the main category is empty, it doesn't make sense for us to show that - I think that would only confuse our users.

empty tab

@martinfrancois
Copy link
Contributor

martinfrancois commented Aug 17, 2019

Hi @ArvidNy
That's a good point! We didn't really think of this, but this use case makes sense.
Currently this is not possible unfortunately and I agree with you, that's confusing to the user.

Maybe it would make sense to add a method like setCategoryShown(category) which changes the currently shown category to the one passed in as a parameter. Then, after showing the preferences you can call setCategoryShown(category1), which would make it look for the user as if it was the default.
I think this would be the best approach, but we have to pay attention if this happens fast enough that the user doesn't see the other category first and them the switch. If the switch would be noticeable to the user, I could imagine it would make more sense to have a method like defaultCategory() which can be used for chaining like persistWindowState()

Feel free to submit a PR, I think this would make a great addition!

@ArvidNy
Copy link
Contributor Author

ArvidNy commented Aug 17, 2019

Sure, a method like setCategoryShown(category), would be a great addition too! However, I gave it a try after I created this issue and found another approach where I could make an empty category always open the first subcategory. I'll create a PR for that branch, but I'm not sure if I will find the time to create one for a setCategoryShown method too.

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 a pull request may close this issue.

2 participants