feat(principal): map CalDAV room metadata properties#8263
Open
Rikdekker wants to merge 1 commit intonextcloud:mainfrom
Open
feat(principal): map CalDAV room metadata properties#8263Rikdekker wants to merge 1 commit intonextcloud:mainfrom
Rikdekker wants to merge 1 commit intonextcloud:mainfrom
Conversation
This was referenced May 5, 2026
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Extend the principal model to extract room-seating-capacity, room-type, room-features, room-building-address, and room-building-room-number from CalDAV principal responses. These properties are defined in the CalDAV standard and already served by Nextcloud room backends, but not yet used by the Calendar frontend. Mapping them into the principal model makes them available for any future UI improvement (e.g. a browsable room finder) without changing how principals are fetched. Backward compatible: properties default to null when not provided by the backend. Also derives roomBuildingName from the building address (first segment) and constructs a roomAddress string suitable for the event LOCATION field. Signed-off-by: Rik Dekker <rik@rikdekker.nl>
e87c932 to
a66d94f
Compare
Contributor
|
Hi @Rikdekker Thank you for the PR. I will review it as soon as I can. |
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
Extend the principal model in
src/models/principal.jsto extract room-specific properties from CalDAV principal responses. These properties are defined in the CalDAV standard and already served by Nextcloud room backends, but are not yet used by the Calendar frontend.Mapping them into the principal model makes them available for any future UI improvement (such as the room finder in the follow-up PR) without changing how principals are fetched.
What
Adds 7 new properties to the principal object (defaults
nullfor non-room principals):roomSeatingCapacityroomSeatingCapacityroomTyperoomTyperoomFeaturesroomFeaturesroomBuildingAddressroomBuildingAddressroomBuildingNameroomBuildingAddress(first segment before comma)roomNumberroomBuildingRoomNumberroomAddressThe string sanitization (leading comma strip, trim) handles edge cases like CSV-imported room data with empty building-name fields, e.g.
, Science Park 140, 1098 XG, Amsterdam→Science Park 140, 1098 XG, Amsterdam.Why
This change is part of splitting #7996 into focused, reviewable PRs as suggested by @nimishavijay. The principal mapping has no UI impact and is fully backward compatible (defaults
null), so it can be reviewed and merged independently of the visual room finder that depends on it.Scope
src/models/principal.jsnullTests
tests/javascript/unit/models/principal.test.js— 10 tests pass, including a new test verifying thatroomBuildingAddressis correctly stripped of leading commas/whitespace.Related
Test plan
nullfor room propertiesroomBuildingName,roomAddress, etc.roomBuildingAddressis sanitizednpm run test:unitpasses