Skip to content

Add new Android event builder logic#65

Merged
rfc2822 merged 3 commits intomainfrom
64-split-legacyandroideventbuilder2-logic-into-separate-builders
Sep 18, 2025
Merged

Add new Android event builder logic#65
rfc2822 merged 3 commits intomainfrom
64-split-legacyandroideventbuilder2-logic-into-separate-builders

Conversation

@rfc2822
Copy link
Member

@rfc2822 rfc2822 commented Sep 17, 2025

This PR introduces the new builder logic for fields and uses the TITLE field as an example.

In the future, we will probably need a boolean return value for AndroidEventFieldBuilder.build() that indicates whether the resulting Entity is valid or not, for instance when there's no DTSTARTfalse.

Roboelectric is used for builder tests because we're only mapping values.

  • Introduce AndroidEventFieldBuilder interface
  • Create TitleBuilder for handling event titles
  • Refactor LegacyAndroidEventBuilder2 to use both new and legacy builders

@rfc2822 rfc2822 added the refactoring Quality improvement of existing functions label Sep 17, 2025
- Introduce `AndroidEventFieldBuilder` interface
- Create `TitleBuilder` for handling event titles
- Refactor `LegacyAndroidEventBuilder2` to use both new and legacy builders
@rfc2822 rfc2822 force-pushed the 64-split-legacyandroideventbuilder2-logic-into-separate-builders branch from ead289d to 03eefec Compare September 17, 2025 07:48
@rfc2822 rfc2822 changed the title Split legacy Android event builder logic into separate builders Add new Android event builder logic Sep 17, 2025
@rfc2822 rfc2822 requested a review from Copilot September 17, 2025 07:51
@rfc2822 rfc2822 self-assigned this Sep 17, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new builder pattern for Android event field mapping, using the TITLE field as the initial example. It creates an interface-based architecture that allows for modular handling of individual event fields while maintaining compatibility with existing legacy code.

  • Introduces AndroidEventFieldBuilder interface for modular field mapping
  • Creates TitleBuilder as the first implementation for handling event titles
  • Refactors LegacyAndroidEventBuilder2 to use the new builder pattern alongside legacy code

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
AndroidEventFieldBuilder.kt Defines the interface for event field builders
TitleBuilder.kt Implements title field mapping with null/blank handling
TitleBuilderTest.kt Comprehensive tests for title builder functionality
LegacyAndroidEventBuilder2.kt Integration of new builder pattern with legacy code

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@rfc2822 rfc2822 linked an issue Sep 17, 2025 that may be closed by this pull request
@rfc2822 rfc2822 marked this pull request as ready for review September 17, 2025 07:54
@rfc2822 rfc2822 requested a review from sunkup September 17, 2025 10:33
Copy link
Member

@sunkup sunkup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me :)

@rfc2822 rfc2822 merged commit 5569e1a into main Sep 18, 2025
9 checks passed
@rfc2822 rfc2822 deleted the 64-split-legacyandroideventbuilder2-logic-into-separate-builders branch September 18, 2025 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring Quality improvement of existing functions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add new builder logic to LegacyAndroidEventBuilder2

2 participants