Giter Site home page Giter Site logo

zacsweers / catchup Goto Github PK

View Code? Open in Web Editor NEW
1.9K 47.0 199.0 17.36 MB

An app for catching up on things.

License: Apache License 2.0

Java 1.67% Kotlin 97.44% Shell 0.90%
dagger rxjava android reddit hackernews medium dribbble designernews producthunt kotlin

catchup's Introduction

CatchUp

An app for catching up on things.

https://www.zacsweers.dev/catching-up-on-catchup-introduction/

Motivations

There's a lot of services I like reading up on throughout the day. Most of these services have dedicated apps for consuming them, but often times I just want to skim the front page and only deep dive occasionally. Enter CatchUp: a high level presentation of the "front page" of several services in short form, and intelligent deeplinking into dedicated apps if you want to go further.

CatchUp is not an all-purpose client for each of these services, just the concierge for at-a-glance details and router for getting on your way. It does not support login for any service, it does not support customization/filtering of their feed. CatchUp is dumb, and you should use one of the many great dedicated apps for this if you want more integration features.

CatchUp is also very much a testing ground for things I personally dive into, from architecture, libraries, patterns, API quirks, and more. It's been a very fun project to spike test new things.

Features

  • Multiple services
  • Hacker News
  • Reddit
  • Medium
  • Product Hunt
  • Slashdot
  • Designer News
  • Dribbble
  • GitHub
  • Infinite scrolling on supported services
  • Pleasant, simple, consistent UI for across services
  • Night mode
  • Smart deeplinking into dedicated apps

Technologies

  • Kotlin
  • Kotlin Coroutines
  • Debugging tooling as a first class citizen in the debug build
  • Leak Canary, Scalpel, debug drawer, Flipper, bug reporting, the works
  • AndroidX/Jetpack
  • Dagger 2 + Anvil
  • One of the more interesting parts of CatchUp is that its service architecture is a Dagger-powered plugin system
  • SqlDelight
  • Firebase
  • Coil
  • Apollo GraphQL
  • Standard Square buffet of Okio/OkHttp 3/Retrofit 2/Moshi
  • Inspector
  • KSP

There's a lot of neat/interesting little tidbits in the CatchUp source code that I plan to write a mini blog series about. Each service has its own nuances that make them unique to work with in code.

Testing

While this is a personal pet project, extensive tests can be found here.

Influences

This app owes a lot of its inspiration, implementation details, and general inner workings to the work of others. Particularly:

Development

If you'd like to build CatchUp locally, you should be able to just clone and build with no issues. The project requires whatever JDK version is currently defined libs.versions.toml.

CatchUp tends to keep up with Android Studio canaries, so you may have to use a canary version. Check the AGP version in libs.versions.toml.

If you want to build with working services, some require API keys. See the wiki for more details on which services require keys.

Bug fixes are always welcome. Tests are too if you're into that kinda thing, but I'm not actively trying to make this project a shining icon of TDD. For new features or otherwise significant work, please discuss in an issue first.

License

Copyright (C) 2017 Zac Sweers

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

catchup's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

catchup's Issues

Remaining local storage TODOs

TODOs on this are to ultimately

  • get rid of having two CatchUpItems
  • possibly merge StorageBackedNewsController into the base news controller XOR pull out its loading functionality into something more pluggable and composable (i.e. have a "news loader" and possibly wrap it in a "storage-first loader". I think we probably want to do this in general to push service handling into the DI graph and merge the loading functionality of the dribbble and rest of items' loading.
  • It's not clear where things that already have their own baked in caching like Firebase and Apollo fit into this, or if they should just force freshness and let this handle it all for consistency.
  • Migrate remaining controllers that don't have their own caching to this. Reddit, Medium, Slashdot.
  • Should indices be used in Room?

Bug reporting in debug

I've got a lens setup, just need to route it somewhere. Would be neat to use GraphQL to submit issues here.

  • Create a .graphql file for the issue creation
  • Create an Imgur service for hosting images
  • Format message nicely to markdown
  • Add tags dropdown? (possibly want to query these?)
  • Should only be an option when a github token with write abilities is present

Imgur support

Should extract image-based services to something generic and reuse for dribbble and imgur

Figure out proguard exceptions

I don't care about obfuscating, but optimization is nice. Thing is, proguard barfs on some random classes currently and I don't know why

Unexpected error while evaluating instruction:
  Class       = [android/support/v4/media/VolumeProviderCompat]
  Method      = [getVolumeProvider()Ljava/lang/Object;]
  Instruction = [39] istore_3 v3
  Exception   = [java.lang.IllegalArgumentException] (Value "android/support/v4/media/VolumeProviderCompat$1!" is not an integer value [proguard.evaluation.value.TypedReferenceValue])
Unexpected error while performing partial evaluation:
  Class       = [android/support/v4/media/VolumeProviderCompat]
  Method      = [getVolumeProvider()Ljava/lang/Object;]
  Exception   = [java.lang.IllegalArgumentException] (Value "android/support/v4/media/VolumeProviderCompat$1!" is not an integer value [proguard.evaluation.value.TypedReferenceValue])
Warning: Exception while processing task java.io.IOException: java.lang.IllegalArgumentException: Value "android/support/v4/media/VolumeProviderCompat$1!" is not an integer value [proguard.evaluation.value.TypedReferenceValue]

Improving perf in list load

Some prior art in #18 #39

Currently there are some jitters in lists. Ideas for improving this:

  • Switch items to ConstraintLayout
    • I for the life of me can't get them to work every time I've tried. They look fine in the editor, then explode at runtime.
  • Switch to Litho
    • Probably most performant, but also pretty different
  • Arch components paging (#39)
    • Could be done in tandem with the rest here
  • Use spannablestrings for attribution and header texts to reduce view count
    • This could possibly make ConstraintLayout easier

Licenses

Dependencies, but also sources for the vector assets

Warm up URLs heuristics

Could anything be done here?

  • first couple items of a service ("most interesting")
  • on press (but before letting go)

Make available scrolling distance in about header more dynamic

Reported by @hzsweers

Description

Currently it is a fixed value based on available height, but we should factor in how quickly the content will get clipped to fade more aggressively if need be to avoid it.

App

Version: 0.0.1-2-ge5e64e2-dev
Version code: 797

Device details

Make: Google
Model: Pixel
Resolution: 1794x1080
Density: 420dpi (420)
Release: 8.0.0
API: 26

Screenshot

Logs

No logs provided

About screen todos

  • Linkify and set the description text
  • Figure out remaining fling issues in collapsing anim (currently offsets don't always fire x_x)
  • Add a header to the licenses section
  • Gather repo IDs for things to show in license section, add mixins for the rest
  • Create .graphql query for nodes and hook up fetching. Cache until next app update
  • Crazy idea - Show a viewpager instead with two tabs. 1 - licenses, 2 - commit list of changes predating the current build timestamp/sha.

App shortcuts to specific sections

Because why not! Deeplink practice and learning shortcuts

Should default to the first 4, also have a setting to set them. Requires exposing available services keys in settings

Smmry redesign

  • full screen
  • reflow text transition of the title into toolbar
  • loading indicator turns into circular reveal of summary content

Smmry Controller instance state handling

Basically - it mostly "just works" right now other than that if it's already loaded, it will show the loader for a split second again before immediately hiding

Figure out github query paging

I'm missing something about how endCursor is supposed to be included in fetching more results, currently complains when I try.

Test issue upload

Reported by @hzsweers

Description

Yay

App

Version: 0.0.1-2-ge5e64e2-dev
Version code: 797

Device details

Make: Google
Model: Pixel
Resolution: 1794x1080
Density: 420dpi (420)
Release: 8.0.0
API: 26

Screenshot

Logs

CatchUpApplication$onCr D Updating daynight
ServiceController$loadD D Data load - hn - took: 234ms
ServiceController$loadD D Data load - reddit - took: 220ms
CatchUpApplication$onCr D Firebase fetch succeeded
    CatchUpApplication D OnTrimMemory

Client-side API

Similar to Muzei or DashClock. The idea would be that others could make extensions that provide data that could be shown in a section of the feed.

Changelog (part 2)

I want to make the changelog actually show details from each release. The idea here would be to take the item itself and then raise/expand on click to reveal the (markdown-rendered) list of changes beneath it.

Apps that do this effect well include Plaid and Flamingo.

https://stackoverflow.com/a/38623873/3323598

Use a DSL for services?

I'd like to try writing a DSL, and rearchitecting the way services are handled to something composition-based seems like a good opportunity

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.