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

Carousel building with Kotlin DSL - Step 1 #967

Merged
merged 10 commits into from May 13, 2020

Conversation

eboudrant
Copy link
Contributor

@eboudrant eboudrant commented May 12, 2020

This is a refresh from @elihart's pull request #850 about issue issue #847.

While we certainly need a more robust api so we could use the DSL for custom carousel (and Epoxy model) group I propose we do it step by step.

Where the first step is we merge this change :

  • Create a ModelCollector with required change in code-gen
  • Add an example of builder in the sample app EpoxyCarouselNoSnapBuilder.kt
  • Update the sample app to use the carousel DSL
carouselNoSnap { 
  id(...)
  models(mutableListOf<CarouselItemCustomViewModel_>().apply {
    for (...) {
      add(
        CarouselItemCustomViewModel_()
          .id(...)
        )
      }
  })
}
carouselNoSnapBuilder {
  id(...)
  for (...) {
    carouselItemCustomView {
      id(...)
    }
  }
}

@eboudrant eboudrant changed the title Carousel dsl Carousel building with Kotlin DSL - Step 1 May 12, 2020
Copy link
Contributor

@elihart elihart left a comment

Choose a reason for hiding this comment

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

Great :)

@elihart elihart merged commit 7c4ac9c into airbnb:master May 13, 2020
@eboudrant eboudrant deleted the carousel_dsl branch May 13, 2020 16:59
@elihart elihart mentioned this pull request May 15, 2020
@ameyab10
Copy link

@eboudrant Thanks for the PR :)

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.

None yet

3 participants