-
Notifications
You must be signed in to change notification settings - Fork 12
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
EREGCSC-2346 -- Internal Docs in Reader Sidebar #1107
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
14ac19a
feat: right sidebar login banner
PhilR8 eab0819
test: update doctype label snapshot test assertion to use appropriate…
PhilR8 e3d19fe
feat: conditionally show public DocTypelabel
PhilR8 4d371e0
Enable debug mode
cgodwin1 8803873
Fix 500 error when repo categories are present
cgodwin1 3284c5d
Remove debug = true
cgodwin1 1d53bc5
Merge branch '2345-bugfix-test' into 2346-internal-docs-sidebar
PhilR8 7bcfc34
feat: api method and container component setup
PhilR8 21863d4
feat: further table setting; get categories
PhilR8 4392311
fix: inherit from correct mixin for section and subpart queries
PhilR8 cf8724d
feat: get selected section and fetch on hash change
PhilR8 ef3b3c5
feat: add mitt eventbus to replace deprecated vue 2.x root methods
PhilR8 4949b93
feat: clear eventbus listeners before destroy/unmount
PhilR8 f4da307
feat: fetch and watch logic
PhilR8 1842664
feat: display crude item list
PhilR8 1fd6d88
feat: transform and load props in correct formats
PhilR8 7229b16
feat: getFileTypeButton moved to utils
PhilR8 a01ce7a
feat: logic cleanup
PhilR8 cff4d03
feat: tweaks to bettery style doc lists
PhilR8 1987a80
feat: iron out styling
PhilR8 a72a06f
chore: refactor existing categories method
PhilR8 0b246c7
chore: remove comments
PhilR8 149840a
Merge branch 'main' into 2346-internal-docs-sidebar
PhilR8 5a61b9c
emit and listen to clear sections event
PhilR8 3384444
chore: formatting
PhilR8 cfaa4e8
feat: add more space to bottom of right sidebar
PhilR8 8f6cc8b
fix: tweak show if empty logic and category description logic
PhilR8 82b5a4e
test: update API test suite
PhilR8 6ad4d0b
feat: tweak login call to action
PhilR8 e411370
test: add unit tests for formatResourceCategories utility method
PhilR8 d907a4f
chore: improve jsdoc documentation
PhilR8 34b67bb
test: add e2e test coverage
PhilR8 cf5c43d
test: update contains assertion to take env into account
PhilR8 bccfd19
test: remove potentially flaky assertions
PhilR8 23c3aa2
feat: remove unneeded styles that introduced side effect
PhilR8 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
solution/backend/regulations/templates/regulations/partials/login_sidebar_banner.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<div class="div__login-sidebar"> | ||
{% if user.is_authenticated %} | ||
Resources you can access include policy documents internal to CMCS. | ||
{% else %} | ||
CMCS staff participating in the Policy Repository pilot can | ||
<a id="loginSidebar" href="{% url 'login' %}?next={{ request.path }}" | ||
>sign in</a | ||
> | ||
to see internal resources. | ||
{% endif %} | ||
</div> |
44 changes: 35 additions & 9 deletions
44
solution/backend/regulations/templates/regulations/partials/sidebar_right.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,49 @@ | ||
{% load string_formatters %} | ||
|
||
{{ categories|json_script:"categories" }} | ||
{{ node_list|json_script:"node_list" }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Safely output a Python object as JSON, wrapped in a <script> tag, ready for use with JavaScript. https://docs.djangoproject.com/en/5.0/ref/templates/builtins/#std-templatefilter-json_script |
||
|
||
<section id="right-sidebar" data-cache-key="sidebar" data-cache-value="{{label_id}}"> | ||
{% include "regulations/partials/view-button.html" %} | ||
<print-btn btn_type="labeled-icon"></print-btn> | ||
<hr /> | ||
|
||
{% if node_list %} | ||
<supplemental-content | ||
api-url="{{ API_BASE }}" | ||
title="{{ title }}" | ||
part="{{ reg_part }}" | ||
resources-url="{% url 'resources' %}" | ||
:resource-display=true | ||
:sections="{{ node_list.sections }}" | ||
:subparts="{{ node_list.subparts }}" | ||
> | ||
<template #login-banner> | ||
{% include "regulations/partials/login_sidebar_banner.html" %} | ||
</template> | ||
{% if user.is_authenticated %} | ||
<template #public-label> | ||
<div class="label__container"> | ||
<doc-type-label icon-type="external" doc-type="Public" /> | ||
</div> | ||
</template> | ||
{% endif %} | ||
</supplemental-content> | ||
{% if user.is_authenticated %} | ||
<div class="authed__container"> | ||
<hr /> | ||
<div class="label__container label__container--internal"> | ||
<doc-type-label icon-type="internal" doc-type="Internal" /> | ||
</div> | ||
|
||
<supplemental-content | ||
api-url="{{ API_BASE }}" | ||
title="{{ title }}" | ||
part="{{ reg_part }}" | ||
resources-url="{% url 'resources' %}" | ||
:resource-display=true | ||
:sections="{{ node_list.sections }}" | ||
:subparts="{{ node_list.subparts }}" | ||
></supplemental-content> | ||
<internal-docs-container | ||
api-url="{{ API_BASE }}" | ||
title="{{ title }}" | ||
part="{{ reg_part }}" | ||
></internal-docs-container> | ||
</div> | ||
<div class="login__spacer"></div> | ||
{% endif %} | ||
{% endif %} | ||
|
||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inherit from correct mixin to allow querying by section