Giter Club home page Giter Club logo

artist's Issues

Readme doesn't give a concrete example use case

When reading Artist's readme it is hard to answer the question "what kind of problems will this solve for me?" Maybe mention a concrete example use case? For example: "this can be used for adding automatic analytics to every view".

Close this issue if you disagree.

Fix Travis CI build failure due to Fossa

Travis CI logs:

TROUBLESHOOTING: A FOSSA API key is needed to run this command.
Running `fossa analyze` performs a dependency analysis and uploads the result
to FOSSA. To run an analysis without uploading results, run:
    fossa analyze --output
You can provide your API key by setting the $FOSSA_API_KEY environment
variable. For example, try running:
    FOSSA_API_KEY=<YOUR_API_KEY_HERE> $command
You can create an API key for your FOSSA account at:
    
    app.fossa.com/account/settings/integrations/api_tokens

Rx Kotlin Nulls

  • When generating code in Artist from the KotlinApiHelper we get the following
public open override fun clicks(): Observable<Unit> {
    if (clicks == null) {
    	....
         rxview_longCl().map()
    		.doOnNext(UiChecks.checkClickableRequirementsAction(this))
    		.doOnNext(ViewAnalytics.logTapFor(this, getContext())).subscribe(clicks)
    	}
    }
   ....
  }

The Kotlin compiler assumes that the clicks in the subscribe method is null even though we set it a few lines prior. A possible fix for this is adding a let call before the rx chain. This way we will prevent the compiler from prompting

smart cast to 'PublishRelay<Unit>' is impossible, because 'clicks' is a mutable property that could have been changed by this time

How we're planning on solving it

public open override fun clicks(): Observable<Unit> {
    if (clicks == null) {
    	....
        clicks?.let {
         rxview_longCl().map()
    		.doOnNext(UiChecks.checkClickableRequirementsAction(this))
    		.doOnNext(ViewAnalytics.logTapFor(this, getContext())).subscribe(it)
    	 }
       }
    }
    ....
  }

Add support for generating Kotlin views

A layer of indirection will be added to Artist such that the core logic remains the same, but JavaPoet/KotlinPoet usages will be generified. The built-in traits will be switched to KotlinTraits.

Recipes page for potential use cases

Add a Wiki page with a list of use cases such as:

  • Adding support for automated tap & impression analytics
  • Backport bugfixes for unsupported functionality
  • Make theming fixes that everyone will inherit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.