[icos] Add Community Hub module (cp_community_hub)#25
Open
ahd44 wants to merge 31 commits into
Open
Conversation
jonathanthiry
approved these changes
May 25, 2026
| theme: | ||
| css/cp-community-hub.css: {} | ||
| js: | ||
| js/cp-community-hub-view.js: {} |
Contributor
There was a problem hiding this comment.
You probably should add core/drupal, core/once, and core/drupal.ajax as dependencies.
Comment on lines
+60
to
+69
| const clone = filterWrapper.cloneNode(true); | ||
| for (let checkbox of clone.querySelectorAll('input[type="checkbox"]')) { | ||
| checkbox.setAttribute('form', viewsFormId); | ||
| checkbox.classList.add('btn-check'); | ||
| checkbox.setAttribute('autocomplete', 'off'); | ||
| const label = clone.querySelector('label[for="' + checkbox.id + '"]'); | ||
| if (label) { | ||
| label.classList.add('btn', 'btn-outline-primary'); | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
It looks like you keep the same ID for the inputs, could it be an issue to have duplicates on the page?
Contributor
There was a problem hiding this comment.
I know this file should only be included on the community hub page right now, but if that would change some of these selectors are generic (e.g. h1.title) and could break other things. You could consider scoping them to the page.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds the module
cp_community_hubwhich adds the data structures for Community Resources (content type), an associated view block, styles, and Javascript. Also adjusts the navigation menu to reduce spacing when screen is narrow, allowing for the addition of the Community Hub to the nav bar.Setup instructions included in
README.md