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

feat($theme-default): add initial open group index option #2408

Merged
merged 2 commits into from
Aug 3, 2020
Merged

feat($theme-default): add initial open group index option #2408

merged 2 commits into from
Aug 3, 2020

Conversation

dennisreimann
Copy link
Contributor

Summary

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

The PR fulfills these requirements:

You have tested in the following browsers: (Providing a detailed version will be better.)

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated
  • Related tests have been updated

Adds an optional property for sidebar groups, so that one can initially display a group other than the first as open. Also allows to initially display all groups as closed, by setting initialOpenGroupIndex to -1.

@dennisreimann
Copy link
Contributor Author

Is this a change that's wanted? If so, what can I provide to get it towards integration?

Copy link
Member

@ulivz ulivz left a comment

Choose a reason for hiding this comment

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

Could you help update the docs?

Adds an optional property for sidebar groups, so that one can initially display a group other than the first as open. Also allows to initially display all groups as closed, by setting `initialOpenGroupIndex` to `-1`.
@dennisreimann
Copy link
Contributor Author

@ulivz Of course. I've added a bit more info and rebased the branch. Let me know if there is more to do.

@dennisreimann
Copy link
Contributor Author

@ulivz ok like this?

@dennisreimann
Copy link
Contributor Author

Don‘t want to be pushy with this, but we could use this and I don‘t want it to drown. Let me know if further improvements are needed.

@dennisreimann
Copy link
Contributor Author

@bencodezen @billyyyyy3320 @kefranabg any chance to get this merged?

Copy link
Member

@bencodezen bencodezen left a comment

Choose a reason for hiding this comment

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

Looks great. Thanks for the work on this @dennisreimann!

@bencodezen bencodezen merged commit 465ae40 into vuejs:master Aug 3, 2020
@dennisreimann
Copy link
Contributor Author

Awesome, thanks for merging 🚀

@Thief-K
Copy link

Thief-K commented Aug 4, 2020

When i am looking for some solution to change the open index from the source code, and it just commited yesterday! What a coincidence!

@dennisreimann dennisreimann deleted the initial-open-group-index branch August 7, 2020 10:59
@Thief-K
Copy link

Thief-K commented Aug 8, 2020

How about using global config such as "themeConfig.defaultOpen" to control the collapse status of sidebar items, because the "initialOpenGroupIndex" does not work in "Sidebar.vue" file

larionov pushed a commit to larionov/vuepress that referenced this pull request Aug 19, 2020
* feat($theme-default): add initial open group index option

Adds an optional property for sidebar groups, so that one can initially display a group other than the first as open. Also allows to initially display all groups as closed, by setting `initialOpenGroupIndex` to `-1`.

* docs: add details on `initialOpenGroupIndex`
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.

4 participants