Repository navigation
Document URL parts and rich-text changes in lib-portal (XP 8.1) - #90
Merged
Merged
Conversation
Adds urlBase, pageUrlParts, imageUrlParts, attachmentUrlParts and processHtmlParts with their types, the 404 URLs for pages and media that do not resolve, image styles named by application, macros resolved when processing, and the XP 8.2 deprecations of pageUrl and baseUrl project, branch and content parameters. Links to imageUrl and attachmentUrl now use their anchors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L8TCeZWgJjKTDhmntR9JtB
This was referenced Oct 3, 2026
The change lands in XP 8.1.0: badge the new functions and types 8.1.0, and fold the upgrade notes into the XP 8.1 section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L8TCeZWgJjKTDhmntR9JtB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L8TCeZWgJjKTDhmntR9JtB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L8TCeZWgJjKTDhmntR9JtB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L8TCeZWgJjKTDhmntR9JtB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L8TCeZWgJjKTDhmntR9JtB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L8TCeZWgJjKTDhmntR9JtB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L8TCeZWgJjKTDhmntR9JtB
This was referenced Oct 5, 2026
rymsha
marked this pull request as ready for review
October 5, 2026 12:28
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The attachment error contract is contradictory, and two parameter descriptions need correction.
Review effort: Balanced
Findings: 3
Open (3)
What changed in this PR
Documents XP 8.1 URL-part APIs, rich-text processing changes, and migration guidance.
Changes:
- Adds five lib-portal functions and their result types.
- Documents URL assembly, unresolved resources, macros, and responsive images.
- Adds XP 8.1 deprecation and adoption guidance.
| File | Description |
|---|---|
docs/libraries/lib-portal.adoc |
Expands the lib-portal reference. |
docs/upgrade.adoc |
Adds XP 8.1 migration guidance. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…s an array Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L8TCeZWgJjKTDhmntR9JtB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L8TCeZWgJjKTDhmntR9JtB
anatol-sialitski
approved these changes
Oct 5, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L8TCeZWgJjKTDhmntR9JtB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L8TCeZWgJjKTDhmntR9JtB
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.

Companion to enonic/xp#12420 (XP 8.1; master port enonic/xp#12395), its follow-ups enonic/xp#12435 and enonic/xp#12437, and enonic/app-guillotine#1542 and enonic/app-guillotine#1558, for XP 8.1.0. Guillotine's docs link here for what each URL component holds, so the anchors
#portalscope,#pageurlparts,#imageurlparts,#attachmenturlpartsand#processhtmlpartsare what it references.Changes
docs/libraries/lib-portal.adocportalScope()and passed asscope; how to assemble each URL.pageUrl(),imageUrl(),attachmentUrl()andprocessHtml()give a URL answered with 404 and log a warning;processHtmlParts()entries have no parts.attachmentUrlParts,imageUrlParts,pageUrlParts,processHtmlParts,portalScope, with parameter tables and TypeScript examples taken from the xp examples.PortalScope,PageUrlParts,ImageUrlParts,AttachmentUrlParts,ProcessedHtml,ProcessedHtmlContentLink,ProcessedHtmlAttachmentLink,ProcessedHtmlImage,ProcessedHtmlImageStyle,ProcessedHtmlImageSource,ProcessedHtmlMacro.baseUrl: the base URL of the current site request, with optional params;id,path,projectandbranchdeprecated in favour ofportalScope(). The example no longer uses them.pageUrl:projectandbranchdeprecated in favour ofpageUrlParts()with a scope fromportalScope().processHtml: styles named<application>:<name>or by name alone; macros resolved when processing, an unknown macro left as written;srcsetonly for images the image API scales,sizesonly along with it;imageSrcWidthfor the width of thesrc, also inprocessHtmlParts.imageUrl/attachmentUrl/pageUrlreturns: point to the 404 behaviour.imageUrlnames the image types it accepts.docs/upgrade.adoc, in the XP 8.1 section: the lib-portal deprecations (before/after) under lib-portal, the JavaMacroService.postProcessInstructionSerialize()deprecation under Java APIs, a new Behaviour changes subsection (404 URLs,srcset/sizes, their place aftersrc, rounded image heights, macros), and three entries under Worth adopting, includingimageSrcWidth. The intro now says no breaking changes for JavaScript code, since the Java macro instruction no longer executes. The 8.1 lib-portal links toimageUrl()/attachmentUrl()now use their actual anchors (#imageUrl,#attachmentUrl); they did not resolve before.Verification
Rendered both pages with Asciidoctor (
@asciidoctor/cli4): no new warnings, and every in-page cross-reference oflib-portal.adocresolves.🤖 Generated with Claude Code
https://claude.ai/code/session_01L8TCeZWgJjKTDhmntR9JtB
Generated by Claude Code