Closed royanger closed 8 months ago
Noticed hacker news doesn't get affected by the reset widget positions button on the side nav by the way. Something to do with the useSetDefault.tsx
hook file I think.
Noticed hacker news doesn't get affected by the reset widget positions button on the side nav by the way. Something to do with the
useSetDefault.tsx
hook file I think.
Thanks for the info. Its definitely still a WIP so I haven't fully tested yet.
As a more general note, this is a WIP and was pushed up just so Melkey and I could talk about something else. I have at least one more commit locally and will be doing one or two beyond that before this is ready for proper review. That said, let me address the point you raised.
I see the default story we're going after is "Top", but I don't see any particular mention of that implementation in their repo README. I believe we'd first need to collect the IDs of
https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty
TOP/BEXT/NEW/ASK/SHOW/JOBS are 'state', or what was either selected by default or what the user selected. In the object on lines 11 to 49 that is used as the key, while the name
field is for the buttons, the title
for the widget title and apiSrc
is used on line 60 for the fetch. I do need to test if the ?print=pretty
is relevant or not for the fetch. There is some sort of bug with the store/current selection but I haven't looked at that yet. Its on the list along with a few other things to check and test.
parse for a random (or first, doesn't matter much) ID, then request again using that ID via
https://hacker-news.firebaseio.com/v0/item/35191706.json?print=pretty
.
The widget will use the 10 most recent items from the selected category. I grab that slice on line 62.
then request again using that ID via
https://hacker-news.firebaseio.com/v0/item/35191706.json?print=pretty
.
Right now the individual story details are fetched on lines 70 TO 83, though that part of the widget is completely rewritten in my local copy.
Unless I'm missing something (which I totally could), it seems a bit broken.
There are definitely issues with it, but it is still a WIP. Definitely some bugs to sort out.
As a more general note, this is a WIP and was pushed up just so Melkey and I could talk about something else. I have at least one more commit locally and will be doing one or two beyond that before this is ready for proper review. That said, let me address the point you raised.
I see the default story we're going after is "Top", but I don't see any particular mention of that implementation in their repo README. I believe we'd first need to collect the IDs of
https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty
TOP/BEXT/NEW/ASK/SHOW/JOBS are 'state', or what was either selected by default or what the user selected. In the object on lines 11 to 49 that is used as the key, while the
name
field is for the buttons, thetitle
for the widget title andapiSrc
is used on line 60 for the fetch. I do need to test if the?print=pretty
is relevant or not for the fetch. There is some sort of bug with the store/current selection but I haven't looked at that yet. Its on the list along with a few other things to check and test.parse for a random (or first, doesn't matter much) ID, then request again using that ID via
https://hacker-news.firebaseio.com/v0/item/35191706.json?print=pretty
.The widget will use the 10 most recent items from the selected category. I grab that slice on line 62.
then request again using that ID via
https://hacker-news.firebaseio.com/v0/item/35191706.json?print=pretty
.Right now the individual story details are fetched on lines 70 TO 83, though that part of the widget is completely rewritten in my local copy.
Unless I'm missing something (which I totally could), it seems a bit broken.
There are definitely issues with it, but it is still a WIP. Definitely some bugs to sort out.
Ahh, gotcha. I only took a quick peek at the outgoing req and judged based on that, mb. Looks good so far.
There are some issues I am seeing:
When I am dragging it, it is possibly going outside the grid
When clicking on the article link - nothing happens. It just changes the url of localhost. Can't actually see/read article.
Moving any other widget (and this one included) is causing a refetch of state.
also there is a conflict in homepage.tsx
Moving any other widget (and this one included) is causing a refetch of state.
All components re-render, which is what's happening here. There is no refetch of the data. Put a console log of console.log('spotify')
inside of Player.tsx and the same thing happens.
@royanger Any update on this PR?
Right click on tasks appears to be broken. I'll have to sort that out. Otherwise I think this is ready. Feel free to review the PR, but don't merge until I look into the right click stuff.
Clicking on each story leads to a 404.
On first visit, the widget gets overflown (however after dragging it and then trying to make it overflow, it works as expected and does not allow you to make it overflow):
- Clicking on each story leads to a 404.
Somehow I reverted the links. Thanks for that catch. Fix pushed.
- On first visit, the widget gets overflown (however after dragging it and then trying to make it overflow, it works as expected and does not allow you to make it overflow):
This is not specific to this widget -- the same behaviour happens with the Twitch widget. IE, enable and toggle on all widgets with a wider browser window, close that tab, t hen revisit with a narrower window and it can be off screen. In the attached screen cap the Pomodoro clock, Quotes, Task Tracker, Twitch and Hacker News are all off screen. I'll open a separate issue for this, but this bug shouldn't stop this PR.
I'll open a separate issue for this, but this bug shouldn't stop this PR. @royanger yeah fair enough, I agree
The latest updates on your projects. Learn more about Vercel for Git ↗︎