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(daffio): create packages sidebar #2725

Merged
merged 7 commits into from
Jan 24, 2024
Merged

feat(daffio): create packages sidebar #2725

merged 7 commits into from
Jan 24, 2024

Conversation

xelaint
Copy link
Member

@xelaint xelaint commented Jan 17, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

No specific sidebar for packages.

Part of: #2682

What is the new behavior?

There is a packages sidebar now that should be rendered within the /packages/.. pages.

TODO:

  • Updating the visibility of sidebar headers and footer depending on breakpoints.
  • Switching out sidebar content depending on which activator is pressed/clicked on. There is always a top level sidebar content, which contains the same content as the header. There can be sidebars within a page and that content needs to display the correct information. Currently, the side fixed sidebar in each package page is showing the header content info instead of the package content info.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@xelaint xelaint added docs This issue is related to documentation package: daff.io @daffodil/daff.io status: wip This PR is WIP. It should be marked as a draft. labels Jan 17, 2024
@xelaint xelaint added this to the Daffodil v1.0 milestone Jan 17, 2024
@griest024
Copy link
Member

@xelaint lmk what you think about the updated behavior

@xelaint
Copy link
Member Author

xelaint commented Jan 19, 2024

Screen Shot 2024-01-19 at 4 25 07 PM Screen Shot 2024-01-19 at 4 25 16 PM

@griest024 The sidebar header and footer is visible on the /api page (first ss), but not on the guides/.. pages.

I feel like splitting up the sidebars into three separate named views is part of issue?

@griest024
Copy link
Member

@elainoo what should the header and footer be in the /guides/... routes? I assumed you didn't want them since there was nothing defined in the named views for these routes.

@griest024
Copy link
Member

@xelaint I added the header and footer, LMK if this is what you want

@xelaint
Copy link
Member Author

xelaint commented Jan 23, 2024

Screen Shot 2024-01-23 at 10 48 34 AM

@griest024 Close, but the package sidebar header and footer should be hidden while the package sidebar is still in side-fixed mode.

@griest024
Copy link
Member

@xelaint changed. Note that the "get started" footer shows for the packages list sidebar when opened as the "content" sidebar, IDK if this is what you want.

There's also a failing test that I need to look at later but the implementation is ready for you to look at.

@xelaint xelaint marked this pull request as ready for review January 24, 2024 02:02
@xelaint xelaint requested review from a team as code owners January 24, 2024 02:02
@xelaint
Copy link
Member Author

xelaint commented Jan 24, 2024

@griest024 I think this PR is good to go for now, but questions for future implementation:

  1. What happens when I need a different content sidebar for i.e. daff.io/docs/design. Are we going to set different content kinds for each inner sidebar? How will the sidebar content render correctly depending on which page we're on?

@griest024
Copy link
Member

@xelaint would daff.io/docs/design have its own route config definition? If so, it can just define the changed sidebar components in its data.namedViews. More deeply nested configs will overwrite parents' configs. The overall collection of named views will be merged together so only keys (sidebarcontent, sidebarheader, etc.) that are specified by the child will overwrite parent fields.

@griest024 griest024 merged commit e96e4cf into develop Jan 24, 2024
9 checks passed
@gray-bot gray-bot mentioned this pull request Jan 23, 2024
@xelaint xelaint deleted the packages-sidebar branch March 13, 2024 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This issue is related to documentation package: daff.io @daffodil/daff.io status: wip This PR is WIP. It should be marked as a draft.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants