Conversation
|
Oh, and I was signing with the wrong key. My bad |
|
I haven't forgotten about this, but there's a lot to go over here (and indeed, we should squash much of this). BUT I appreciate the effort, and I'll go through everything detailed soon-ish. |
CrystalSplitter
left a comment
There was a problem hiding this comment.
This is good work! I think we can work with this, actually.
There's a bunch of style issues, but I do not consider these a blocker and I can clean them up myself, as it's no hassle for me.
I've left minor comments, but overall my only question here is the large amount of commented out tests and todos.
I'm not quite ready to approve, but I think we're close.
| const url = new URL(configs.endpoint + path); | ||
| // set headers | ||
| const headers = new Headers(); | ||
| headers.set("Content-Type", "application/x-www-form-urlencoded"); |
There was a problem hiding this comment.
Huh, interesting. This is fine, but why?
|
Also can you squash/rebase your commits into three commits:
Use
and then mark the commits as |
|
Wow. Thank you so much for taking the time to review it. I sort of lost my "nord" coding this, but now I really know what to do. I'll take the time to answer each question... eventually (I think I can do it on my phone with the GitHub app, so Also, I didn't know the commits could be rebased, I thought once it was committed, you couldn't change it anymore. I'll make a more proper pull request next time. Once again, thank you! |
|
I didn't notice everything I pushed was shown here xd Should I squash now or at the very end? |
It'll probably be easier for you to squash now. I'll re-review them this coming week. |
|
Thank you!! However, I might take more time. I just came back from vacations to university and there is a jam this week I want to participate to (Brackeys' jam). If I finish everything soon, I'll probably do this, but I'm not sure, and because it's the first time I squash, I want to take the time to do it properly for the next review. Is that ok for you? |
|
I see, in that case, don't squash. There's too much risk in you deleting everything. I highly recommend in practice getting used to working with git if this is your first real open source contribution! I can just take this code and rework it. It's okay! Enjoy the jam!!! |
|
Wow, I... thank you so much And yes, this is my first contribution ever. In code and, in fact, in whatever. I had used a lot of open source and written a lot of code but never contributed. Also, for context. Do you want this feature fast or at any time? I would like to finish this and make a proper contribution. However, I don't want to slow down your stuff. I am really motivated to work on this, I just haven't had the time. I expect to finish this around December (like as a goal, planned, in my calendar). Is that ok? |
|
Taking your time is perfectly fine. There's two big risks here:
These are both two very real possibilities and I really don't want either. And so, I've been trying to direct your work to avoid these two scenarios. This means generally being willing to accept less experienced contributions, but still trying to give guidance on how to write code that integrates into a larger project. In the general software engineering world, code is a liability. The less code, the better. Simple solutions are highly praised, and overcomplexity gums everything up. So I'm trying to push you to make small, clearly correct contributions. The less code, the better. The more clearly correct, the better. This is hard work! But it's something I spend a lot of time teaching students and interns on in my day job, so I'm used to it. Smaller code is also a lot more motivating for new programmers, because their changes are more likely to land. Less work from everyone, and you get to test your skills out without waiting months or years to get everything in order. |
|
Hello @CrystalSplitter, Uhm, several things... First, I have copied a structure from other services that I still don't understand: why are you creating an object with RSSItem properties and "casting" its type to RSSItem instead of calling the RSSItem constructor? // feedbin.ts : line 175
const item = {
source: source.sid,
title: i.title,
link: i.url,
date: new Date(i.published),
fetchedDate: new Date(i.created_at),
content: i.content,
snippet: dom.documentElement.textContent.trim(),
creator: i.author,
hasRead: !unread.has(i.id),
starred: starred.has(i.id),
hidden: false,
notify: false,
serviceRef: String(i.id),
} as RSSItem;Is there a reason to not use the RSSItem constructor. Also, in that case, the produced object will not have RSSItem methods. If the function expects to get returned an RSSItem, then the devs have to remember that what this function creates is not actually an RSSItem but an RSSItem-like object, and bind its methods instead? I mean, I really don't understand that part. Second, I think you already told me but I "refound" it again, is the property RSSItem.thumb just an url? I can just pass the url to an image? I mean, it makes sense but I was overthinking it probably... Third, just to make sure. So RSSItem.serviceRef is like the id of that specific blog post in Newsblur server. I can just set to that property the story_hash send by Newsblur and then retrieve it without changes when starring or unstarring that item? Once again, thank you. I know I am a beginner and a lot of these questions are probably obvious, but I can tell you that I won't leave this project, not before Fluentflame is working perfectly with Newsblur. It is also a personal goal for me. And, I'm not using any AI for this (may be irrelevant, but if you ever wonder; I also find it disrespectful to send someone elses code to an AI that will feed from it without the author's consent). |
So this original code from Feedbin is a mess (not your fault! or mine really...). To sum: because all methods of RSSItem are Personally, I hate this. But it's there and I'm not tearing out things that work just because they are bad style.
We use You may also like If you set
serviceRef is a unique identifier on the service side, in this case Newsblur. |
Correction, |
|
Regarding the sync functions. Are they like importing stars (and unreads) from the server, or sending local stars to the server? Or both at the same time/how? |
|
And. I think I will stop using |
Yeah, that's a good idea probably. |
Services are intended to be two-way communication wherever possible. This is especially critical for unreads, and is the entire point of the service, generally. If you read an article on one client, it needs to propagate to another. This requires two way communication. You can see how this works in |
|
I am sort of starting to understand how fluentflame works for real. I will redo the sync functions, to make them look more like fever's. |
|
Hello @CrystalSplitter I have finally finished I still have questions about Another question regarding groups. Newsblur has something similar called "folders". Should I map those folders to groups? A feed could be in the root folder which could mean "no group". And that's it. I think I am almost finished. At least for that file... |
|
Honestly, this seems to be in a relatively good state. You have issues with pnpm, and there's a dozen nits I can complain about, but the core does appear to be here. Can you do a few things:
And we should be okay to merge. I can clean up a lot here, and this feature will still be hidden, but you clearly have been playing around with this a lot and testing it, so I trust it's in a reasonable state? |
|
Hello @CrystalSplitter Can I write to your matrix please? My username is @Simx72:matrix.org |
|
I have reached out there! But keep in mind I do not have synchronous communication most of the time. |
53cbcb8 to
40e2b1e
Compare
06670ab to
63d06ee
Compare
3bfb8a1 to
b8d528a
Compare
Created a service for https://www.newsblur.com/api This file connects the Newsblur service to the Fluentflame's API by exporting the constant newsblurServiceHooks. Each hook must make one or several http requests to the server by using the functions available in the NewsblurAPI namespace, which represent abstractions of each Newsblur endpoint used. Apart from newsblurServiceHooks and NewsBlurConfigs, other exported variables and types are exported. These are meant to be used in the tests: src/scripts/models/services/test_newsblur.ts
b8d528a to
cf4393e
Compare
|
Hello, @CrystalSplitter Just to let you know that I have reduced the number of commits to 1. I will do a second commit for the test file and, after that, ask you for a review. |
|
thanks! keep me in the loop, feel free to ping me also on Matrix/IRC. |
Hello, this is my pull request to add the service Newsblur to the Fluentflame project.
I have added the files
newsblur.tsandtest_newsblur.ts.For the implementation, I have copied other implementations from the folder
services/and adapted them to Newsblur.For the development, I used:
pnpmas package managerThere is some stuff that I still don't understand about Redux and Fluentflame Reader, like when to use dispatch and what should it return, or where are RSSSources and RSSItem stored.
However, I am pretty shure that the
authenticate(),updateSources(),syncItems()andmarkAllRead()are implemented correctly.I stay available for changes, concerns, etc. I'd really like to learn how it's implemented in its entirety.