LearnNewsExamplesServices
Frontmatter
id8455
titleRemove obsolete path substring in Release Component
stateClosed
labels
airefactoring
assigneestobiu
createdAtJan 9, 2026, 10:35 AM
updatedAtJan 9, 2026, 10:38 AM
githubUrlhttps://github.com/neomjs/neo/issues/8455
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 9, 2026, 10:38 AM

Remove obsolete path substring in Release Component

Closed v11.19.1 airefactoring
tobiu
tobiu commented on Jan 9, 2026, 10:35 AM

In apps/portal/view/news/release/Component.mjs, the getContentPath() method currently removes the first character of the path using substring(1).

This was necessary when paths started with / (e.g., /.github/...). Now that release note paths are relative (e.g., resources/content/...), this logic is obsolete and breaks the path resolution.

Task: Refactor getContentPath to append record.path directly to Neo.config.basePath.

tobiu added the ai label on Jan 9, 2026, 10:35 AM
tobiu added the refactoring label on Jan 9, 2026, 10:35 AM
tobiu assigned to @tobiu on Jan 9, 2026, 10:35 AM
tobiu referenced in commit ab24524 - "refactor: Update path handling in Release Component (#8455)" on Jan 9, 2026, 10:37 AM
tobiu
tobiu Jan 9, 2026, 10:37 AM

Input from Gemini 3 Pro:

✦ Successfully updated getContentPath in apps/portal/view/news/release/Component.mjs.

Changes:

  1. Refactored the method signature to destructure {path}.
  2. Removed the .substring(1) call to support the new relative path format.
  3. Updated the JSDoc to reflect the destructured parameter.
    /**
     * @param {Object} record
     * @param {String} record.path
     * @returns {String|null}
     */
    getContentPath({path}) {
        return path ? Neo.config.basePath + path : null
    }
tobiu closed this issue on Jan 9, 2026, 10:38 AM