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

Refactor documentation sidebar internals #299

Merged
merged 9 commits into from
May 7, 2022

Conversation

caendesilva
Copy link
Member

@caendesilva caendesilva commented May 7, 2022

Refactor the documentation page sidebar generator to be more stable and manageable.

Previously, the sidebar was generated in an action and resulted in an array that was hard to manage.

Now, the sidebar generation is done in a service class, and creates two models. First, a sidebar model that extends the illuminate collection and contains all the sidebar items, which in turn are models as well.

Using collections instead of an array allows for higher level management such as filtering and ordering. Having each item as an object also allows for a more predictable state.

It will fix #282, and since priorities can now be set in front matter, it will also fix #169.

@caendesilva caendesilva marked this pull request as ready for review May 7, 2022 11:00
@caendesilva caendesilva merged commit 758190a into master May 7, 2022
@caendesilva caendesilva deleted the refactor-documentation-sidebar-internals branch May 7, 2022 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants