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

Fix #26440: Edit Content Routing on Content search were broken #26593

Conversation

zJaaal
Copy link
Contributor

@zJaaal zJaaal commented Nov 1, 2023

🤖 Generated by Copilot at f45f08c

Summary

♻️🔧🔥

This pull request refactors and simplifies the JSP files that handle the contentlet management. It eliminates code duplication by including the JavaScript functions from view_contentlets_js_inc.jsp in view_contentlets.jsp, and streamlines the addNewContentlet function to use only the content type inode as a parameter. It also removes an unused variable from view_contentlets.jsp.

Oh we're the jolly coders of the view_contentlets.jsp
We've refactored and simplified our code with skill and pep
We've cut out the velocityVarName and the extra args
And now we're ready to push our changes with a hearty heave-ho

Walkthrough

  • Move view_contentlets_js_inc.jsp file content to view_contentlets.jsp file to avoid unnecessary includes (link)
  • Simplify addNewContentlet function signature to accept only content type inode and get content type variable name from hidden inputs (link)
  • Remove unused variable velocityVarName from view_contentlets.jsp file and its assignments (link, link, link)
  • Remove redundant content type variable name argument from addNewContentlet function calls in view_contentlets.jsp file (link, link)

Screenshots

Screen.Recording.2023-11-01.at.3.09.52.PM.mov

Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@fmontes fmontes merged commit ba60e73 into master Nov 7, 2023
25 of 28 checks passed
@fmontes fmontes deleted the 26440-edit-content-navigation-is-broken-for-new-content-in-content-search branch November 7, 2023 17:32
@fmontes
Copy link
Member

fmontes commented Nov 7, 2023

Pipeline is failing, but since this code is not related to Java is ok to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Edit Content: Navigation is broken for new Content in Content Search
6 participants