plibither8 / refined-hacker-news

✨ Hacker News, but refined — Interface tweaks and features to make the HN experience better
MIT License
808 stars 34 forks source link

Feature request: HNES ui #54

Open lookfirst opened 5 years ago

lookfirst commented 5 years ago

First off, excellent work on this extension!

I come from being a user of HNES. Due to the fact that the HNES author is far less active (I have several open PRs there) and the codebase is quite old with a lot of bugs, I'd like to jump ship.

That said, I've grown quite used to the HNES UI over time. Here is an example screenshot, actually with both extensions loaded (surprised and impressed it works at all). As you can see, the font is larger and there is some nice readability improvements over the 'wall of text'.

image

I guess my question/hope is... would you be willing to accept some PR's to drive the UI closer to HNES? With your very nice plugin system, it can be done as options. One other thing, can we consider adding support for extensions written in Typescript (or building the whole project in typescript)?

lookfirst commented 5 years ago

Screenshot of comments. I've tuned HNES a bit.

image

plibither8 commented 5 years ago

Hi! First off, thanks for your kind words, and for creating this issue. :smile:

When first came up with the idea for this extension and when I started developing it, I wanted to make sure that I do not modify with the base style of HN - which of course I want to stick to throughout this extension's future.

Nevertheless, I get where you're coming from and I do believe that there are many users out there that actively use/have actively used HNES and have grown used to it's UI, which admitedly in many ways is more refined, so to say xD.

I'd like to know whether the UI changes that you would like to bring in your PRs are purely or majorly CSS changes - that is, can they be applied via the Custom CSS field in the extension's popup?

lookfirst commented 5 years ago

That is a very good question, I don't know!

I'm curious what your reason is for not modifying the base style? I can understand not wanting that as an absolute, but from plugins, it seems like it might be ok since they can be disabled by default.

Maybe another idea would be to enable it so that 3rd parties can offer plugins that work with your tool. Thus, I can have my own repo here on github and your tool can be configured to use it. That would also allow me to use typescript without bothering your build process with it.

plibither8 commented 5 years ago

My reasons are mainly coming from the fact that a lot of HN users are used to and prefer the minimal, barebones style of the site. Almost all the extensions before RHN that brought in feature additions modified the style in some way or the other so as to make it not look like the original HN. What I wanted was an extension that was mainly focussed on functionality and very less on style modifications. Finally, and the main reason, is that style modifications are completely based on the preferences, choices and opinions of the developer - a new style might appeal to the dev but not so much to the users. What I wanted was an unopinionated development process, and so I didn't want style preferences to hinder it.

In a few previous feature request discussions, I have brought up the possibility of having features that are disabled by default. Currently, the code doesn't support having features disabled by default, as there are none, but I'm working on to make it. This feature could possibly be one of those :slightly_smiling_face:.

As for Typescript, I admittedly don't have much experience working with it: just one project - so I don't think I am in a place to port this extension to Typescript. Maybe you can help here too? It'd be amazing!

Thanks again :)

lookfirst commented 5 years ago

@plibither8 Excellent response. I agree with everything that you have said. Apologies for not responding quickly, but I've been traveling around Laos as well as working on a Flutter based app, so my time has been limited. When I have some time, I'll see what I can do to work on this, I'm definitely motivated. =)

As for Typescript... definitely switch and never look back at JS. A statically typed language makes things so much better. I can see how it would improve your codebase quite a bit. For example, the details object that you export at the bottom of each feature is an interface. But you have no idea if it has been filled out correctly without looking at it or running the code. What happens if you want to rename 'loginRequired' -> 'signinRequired'? You have no idea which files have been changed or not.

This is where types and a compiler helps immeasurably. TS makes you reason about your code for everything. This is annoying at first because you have to think more in advance, but in the end you will really appreciate it. That rename becomes a 2 second refactor in IDEA and it is safely done, unlike a find/replace.

Cheers. =)

plibither8 commented 5 years ago

Apologies for not replying earlier, didn't get a chance to get back to this issue up until now :sweat_smile:.

This extension was initially inspired Sindre Sorhus's extension Refined GitHub, which too later ported their extension codebase to TS from JS. So I can certainly understand the need to. I'm as motivated to make the shift to TS, I hope you can help me in that here.

Thanks for exemplifying how TS can better the code of the extension - looking forward to it!

plibither8 commented 5 years ago

Hey @lookfirst! Any updates?

lookfirst commented 5 years ago

@plibither8 Sorry man! Deep in Flutter/Dart land at the moment. Building a cross platform phone app. Hoping to have some 'free' time in a few weeks. I will say, you should check out Dart... I'm new to it myself. It is a very nice mix of the best stuff from Java/JavaScript/TypeScript/Go. I feel very productive in it. I just looked and it even seems like people are crazy enough to do extensions in it. https://www.reddit.com/r/dartlang/comments/7el8em/is_writing_chrome_extensions_using_dart_posible/

plibither8 commented 5 years ago

No worries at all, I was casually checking in! :)

I just checked out Dart and its official website - this really does seem interesting. I'll definitely consider this for the next technology I want to learn. Thanks for sharing!