chore: Use split button for menu dropdown#307
Open
mrbazzan wants to merge 4 commits into
Open
Conversation
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR refactors the Bootstrap menu template to use a split button approach for dropdowns and modernizes the Gulp watch task to Gulp v4 syntax. Class diagram for menu dropdown template changesclassDiagram
class Child {
+ancestor: bool
+children: list
+selected: bool
+get_absolute_url()
+get_menu_title()
}
class MenuItem {
+nav-link: string
+active: bool
+dropdown-toggle: bool
+btn-group: bool
}
Child --> MenuItem
Flow diagram for Gulp v4 watch task updateflowchart TD
A[Start Gulp] --> B[Run 'watch' task]
B --> C[Watch SASS files]
C --> D[On change, run 'sass' task using gulp.series]
D --> E[Compile SASS]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey there - I've reviewed your changes and they look great!
Blocking issues:
- Detected a segment of a Flask template where autoescaping is explicitly disabled with '| safe' filter. This allows rendering of raw HTML in this segment. Ensure no user data is rendered here, otherwise this is a cross-site scripting (XSS) vulnerability. (link)
Prompt for AI Agents
Please address the comments from this code review:
## Security Issues
### Issue 1
<location> `djangocms_frontend/templates/bootstrap5/menu.html:4` </location>
<issue_to_address>
**security (python.flask.security.xss.audit.template-unescaped-with-safe):** Detected a segment of a Flask template where autoescaping is explicitly disabled with '| safe' filter. This allows rendering of raw HTML in this segment. Ensure no user data is rendered here, otherwise this is a cross-site scripting (XSS) vulnerability.
*Source: opengrep*
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #307 +/- ##
=======================================
Coverage 89.13% 89.13%
=======================================
Files 124 124
Lines 3387 3387
Branches 288 288
=======================================
Hits 3019 3019
Misses 252 252
Partials 116 116 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Summary by Sourcery
Apply a split-button pattern to Bootstrap 5 menu items with children and update the gulp watch task to use the gulp v4 series syntax
Enhancements:
Build: