GithubHelp home page GithubHelp logo

simonhalvdansson / harmonic-hn Goto Github PK

View Code? Open in Web Editor NEW
591.0 6.0 37.0 80.71 MB

Modern Android client for Hacker News

Home Page: https://play.google.com/store/apps/details?id=com.simon.harmonichackernews

License: Apache License 2.0

HTML 0.13% JavaScript 1.30% Java 98.57%

harmonic-hn's Introduction

Harmonic for Hacker News

Harmonic for Hacker News

Harmonic for Hacker News is an Android Hacker News client which is meant to be modern, fast and well thought out. You can find it on Google Play for download.

This has been my personal side project since 2020 and since starting my PhD in 2021 the time I have to dedicate to Harmonic has decreased. My personal philosophy on side projects is that the most important thing is building something that is actually shipped. Since much of my knowledge on building Android apps is ~10 years old, Harmonic does not use Kotlin or the latest Android API's and is probably not the easiest app to dig into the source code of. However, it is shipped, and it works fairly well in my opinion at least. :)

The purpose of open-sourcing Harmonic is thus mainly to enable interested users to submit pull requests fixing issues or adding features. I would like to still be able to find my way around the app's code so I am not looking for a full Kotlin rewrite but if you have something you'd like to see fixed or added I am very open to PR's. I'll still commit things myself when I have time.

Get it on Google Play

Features

  • Basic account functionality: log in, vote, comment, and submit
  • Material 3 design with some nice animations
  • Several themes including full black
  • A ton of customization options, bordering on feature creep
  • Fast!

harmonic-hn's People

Contributors

appearamidguy avatar carstenhag avatar dimtion avatar fdelmazo avatar fireph avatar flofriday avatar kyleatmakrs avatar lcfyi avatar naitgacem avatar neuroradiology avatar ramitsuri avatar simonhalvdansson avatar streambinder avatar tgayle avatar thomasd0213 avatar tukajo avatar

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

harmonic-hn's Issues

Feature: Previous Discussions lookup

Feature Suggestion: a way to quickly list the previous occasions a URL has been posted, including the number of points & comments. Maybe limited to the top 20 posts?

Icons on collapsed bottom sheet squished

On my Samsung S20+, the bottom sheet below the WebView has its icon buttons squished. However, the issue only occurs if Android's navigation bar is invisible (Gesture control is enabled). If the normal navigation bar is visible, the collapsed bottom sheet is displayed correctly.

Screenshot:

Sharing posts should only contain URL's

Right now we add the post title as well - I feel like that use case is unrealistic and it's better to just share the URL. This is a very minor change but I am away on a conference right now so it's just an issue for now.

Can't vote on posts even when logged in

Screenshot_20230721_090240_Harmonic
Screenshot_20230721_090229_Harmonic

I have included 2 screenshots above to showcase the issue where I can't vote on a post even when logged in. When I enter my information when prompted it does nothing

WebView audio keeps playing

If the user interacts with a video or audio object I think these keep going even after the user fully exits the WebView - at least this happened to me once. My interpretation is that the WebView is not properly killed of once we're done with it. In my personal TODO I wrote down that this happened for a post with a title involving "A trail tale" but I don't recall the specific post. Please post a comment if you can reliably reproduce this and.

On a related note - perhaps we're leaking memory if the WebView is not properly killed off?

Cannot parse titles that contain "<3"

The reason for this is that we treat titles as HTML partly - this is good in many situations but obviously not all. Not immediately obvious to me how this should be treated. A band-aid is of course to have a special case for "<3".

Widget support

Haven't you heard - widgets are cool again now after WWDC! Seriously, a widget has long been envisioned but never materialized. The way I imagine it this should looks similar to the main screen in terms of typography and colors with top stories sorted as in the app. However I don't know whether to include a refresh button, a "last updated" notice, a way to go to commens/the article and such. Feel free to submit a mockup or of course a proposed solution, this is a very open issue and if you do something it is very possible that I will have opinions on the design so this is not the easiest issue to work on. However the payback is huge with widgets being so hip right now ๐Ÿ˜‰

Search options

The HN Algolia API which is used for searching supports options (sorting and dates). This has given me much headaches trying to implemt and digging into code you will notice that there are hidden buttons in the comments header which was my attempt at this. The problem is that it is hard to have Dropdowns in a RecyclerViews but if you could get this working I would be very happy.

Crash on current frontpage

Stacktrace is:

FATAL EXCEPTION: main
Process: com.simon.harmonichackernews, PID: 8095
java.lang.IndexOutOfBoundsException: setSpan (50 ... 51) ends beyond length 50
	at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1326)
	at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:685)
	at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:677)
	at com.simon.harmonichackernews.l.h(SourceFile:312)
	at androidx.recyclerview.widget.RecyclerView$s.i(SourceFile:1226)
	at androidx.recyclerview.widget.m.c(SourceFile:46)
	at androidx.recyclerview.widget.m.b(SourceFile:187)
	at androidx.recyclerview.widget.m.run(SourceFile:78)
	at android.os.Handler.handleCallback(Handler.java:942)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.app.ActivityThread.main(ActivityThread.java:7884)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

Monohrome/Themed app icon

Android 13 added support for themed app icons,.
Hermonic doesn't support this. It's not that much work
I can help you out with implementation if needed

Support Android 12L new tablet navigation bar

At least on my Galaxy Tab S7, ever since Android 12L the navigation bar size can be changed by long pressing this. Google apps seem to deal with this in a nice way but Harmonic is a bit dirty when it comes to handling paddings for system elements - things are done manually in a bad way, I'm sorry. As a result, this 12L behavior is not taken into account and the navigation bar ends up covering part of the screen content.

Ideally this should be treated with a rework of how system paddings are handled, I saw some Google IO stuff about this being possible to handle in a good way but haven't looked into it.

Submission comments sorted by number of replies/votes

I use this app almost daily and it would be amazing if there was the option to view the comments of a submission sorted by the number of replies (or maybe votes)
This is useful to bubble up the most interesting discussion in that story.

Not sure what is the sorting algo right now
Screenshot_20230810-093935.png

Merging bookmarks with HN favorites

The current bookmark system is purely local but I think at least one other HN app has managed to hook into the HN favorites system for saving bookmarks to a user. This should be added (and made the default for logged in users), perhaps the terminology should also be changed in that case so that it says "Favorite" for logged in users and "Bookmark" for regular users.

Better handling for no internet connection

If the user starts the app in airplane mode of something like that, we only show the "Loading failed, retry" view. I think it would be better to say something about there being no internet connection. It is fine to only do this on the main screen but better to have it everywhere. Perhaps there could also be a button to go to settings if airplane mode is active - depends on what looks good from a design perspective.

Multi screen settings

The number of settings is too many, there should be a main screen and then the current categories should be sub-screens. Perhaps the entire thing can be remade in a more modern style (i.e. Compose or something like that) since this is such a isolated component of the app.

App cannot be built because of JCenter

Incident status here: https://status.gradle.com/incidents/7x4wqd7zv715
JCenter is currently redirecting all requests to Maven Central. Because html-textview isn't published to Maven Central, the build fails:

> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find org.sufficientlysecure:html-textview:4.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/org/sufficientlysecure/html-textview/4.0/html-textview-4.0.pom
       - https://jcenter.bintray.com/org/sufficientlysecure/html-textview/4.0/html-textview-4.0.pom
       - https://jitpack.io/org/sufficientlysecure/html-textview/4.0/html-textview-4.0.pom
     Required by:
         project :app

The lib is also not available via JitPack because of a failing build.

Usage of JCenter has been deprecated for a long time now and it's not the first incident with it, so even if everything fixes itself, it's better to stop relying on JCenter

Option to view upvotes on comments

Right now, we can only see upvotes on comments which have replies to it: On collapsing the comment thread.

An enhancement and low priority issue.

Hide submissions you've voted on?

Is it possible to hide submissions that you've already voted on?

I think the answer is "no", but I would love to find out it's already available.

Comment navigation button stuck on

I just got upgraded to v1.9.4. to find that the top-level navigation button is perma-enabled. It enabled itself and toggling it on/off has no effect. I also tried clearing both storage and cache to no effect.

Material styling for comment posting ProgressBar

When posting a comment, a dialog is showed indicating that the posting is underway. The progressbar in this dialog is not styled according to the app theme - outrageous! This should be adressed.

White theme bug

Hi,
The recently updated version (1.9.1) broke the white theme for me. Everything is washed out, as shown in the following picture.

Thank you!
SmartSelect_20230721_204557_Harmonic

Option to use device back for WebView back

Right now, when a user is browsing the WebView and presses their back button, they leave the webview and go back to the main page. There should be an option to have this step back the WebView (WebView.goBack()) in case that's possible and otherwise go down to the comments and it should be false by default.

Feature: Enablinging swipes on comment navigationbutton to change comment levels

I have seen one HN app do this and that was it but I loved it. Unfotunately can no longer find that app but your has it prety close.
The top level navigation button is cool but it does not allow to look at first response and skip answrers to it and jump to second response to the comment.
I suggest adding togle to enable sideswipes. Right jumps level down; left level up; down to next comment; up to previous.
Behaviour example: Swipe down: first comment; Swipe down: second comment; swipe right: first answer to second comment; swipe down: second answer to second comment skipping past answers to first answer to second comment; swipe left: back to second comment.

Foldable support

Supporting foldables properly would mean showing comments on the right pane in a manner similar to how tablets are currently handled. Adding this support requires quite a deep dive into the architecture of the app but would be nice to have.

Comment SwipeBack disabled after web browsing

A semi-common occurance for me is that once I've interacted with the WebView of a post for a bit and go down to the comments, the SwipeBack functionality is not working. I don't have a way to reproduce this issue so if you can figure that out please leave a comment. Either way, this should be fixed.

Already, SwipeBack functionality is enabled/disabled based on what the user is doing as we don't want SwipeBack when the user is interacting with the WebView so my guess is that the app changes it state without updating this properly.

Opening Submissions fails

When viewing a users submissions in the app you can't click on the submission directly. Opening the comments works and opening the submission from there works too.

But in the submission view it fails with the toast message "Couldn't open link to: https://[..]"

Screenshot_20230813_002323_Harmonic.png

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.