PR #70

17 votes · 16 up · 1 down

View on GitHub
17
Total Votes
+16
Upvotes
-1
Downvotes
+16-1

Comments(12)

hpinsleyComment#70When the world's in disarray, this banner has something to say!.

@bigintersmind Fixed that typo in the code. Thanks for pointing that out.

hpinsleyComment#70When the world's in disarray, this banner has something to say!.

@matthewmayer Done! Updated screen capture.

hpinsleyComment#70When the world's in disarray, this banner has something to say!.

Would it be possible to change the style to ASCII so it matches the current theme? It sticks out a lot at the moment

image

I'll give it a shot!

matthewmayerComment#70When the world's in disarray, this banner has something to say!.

Would it be possible to change the style to ASCII so it matches the current theme? It sticks out a lot at the moment

image
bigintersmindComment#70When the world's in disarray, this banner has something to say!.

Is "Controll" an intended misspelling (to include "troll" perhaps), or a typo?

hpinsleyComment#70feat: Add a world chaos headline banner component.

@skridlevsky Should be fixed now, I hope. The video shows the output expected. Thanks for the help!

skridlevskyComment#70feat: Add a world chaos headline banner component.

@hpinsley It works locally because localhost is exempt from CORS restrictions in most browsers — the Same-Origin Policy doesn't block requests from localhost the same way it does from a deployed domain.

In production on Vercel, the client-side fetch to rss.nytimes.com gets blocked because NYT doesn't include Access-Control-Allow-Origin in their response headers.

Fix: move the RSS fetch to a Next.js API route (e.g. /api/rss) so it runs server-side, then have the component fetch from that instead. Server-side requests aren't subject to CORS.

hpinsleyComment#70feat: Add a world chaos headline banner component.

@skridlevsky That's strange. I picked this feed as I thought it was allowing all CORS origins. It seems to work for me when running locally:

image

Am I missing something?

skridlevskyComment#70feat: Add a world chaos headline banner component.

@hpinsley, cool concept! The preview shows just the placeholder though - RSS fetch is hitting CORS since it's client-side:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://rss.nytimes.com/services/xml/rss/nyt/World.xml. (Reason: CORS header 'Access-Control-Allow-Origin' missing).

Moving it to an API route would fix it.

openchaos-bot[bot]Comment#70feat: Add a world chaos headline banner component.

🤖 OpenChaos Bot

Summary: This PR introduces a new "WorldChaos" component that displays a rotating headline from an RSS feed (defaulting to the NYT World feed). It also adds the 'rss-parser' dependency to consume RSS feeds.

Files changed: 4 (package.json, package-lock.json, src/app/page.tsx, src/components/WorldChaos.tsx)

Impact: Medium - Adds a new feature to the homepage, introduces a new dependency, and fetches external data.


openchaos-bot

hpinsleyComment#70feat: Add a world chaos headline banner component.

@matthewmayer Haha yeah. Felt the breadth and scope of the headlines would lend itself to the ambiance and spirit of the site. ;-)

matthewmayerComment#70feat: Add a world chaos headline banner component.

I was intrigued to see how you were explicitly going to find news about world chaos, only to find this is literally just the NY Times World News feed. Accurate.

All Activity(31)

hpinsleyComment#70When the world's in disarray, this banner has something to say!.

@bigintersmind Fixed that typo in the code. Thanks for pointing that out.

hpinsleyComment#70When the world's in disarray, this banner has something to say!.

@matthewmayer Done! Updated screen capture.

hpinsleyComment#70When the world's in disarray, this banner has something to say!.

Would it be possible to change the style to ASCII so it matches the current theme? It sticks out a lot at the moment

image

I'll give it a shot!

matthewmayerComment#70When the world's in disarray, this banner has something to say!.

Would it be possible to change the style to ASCII so it matches the current theme? It sticks out a lot at the moment

image
bigintersmindComment#70When the world's in disarray, this banner has something to say!.

Is "Controll" an intended misspelling (to include "troll" perhaps), or a typo?

hpinsleyComment#70feat: Add a world chaos headline banner component.

@skridlevsky Should be fixed now, I hope. The video shows the output expected. Thanks for the help!

skridlevskyComment#70feat: Add a world chaos headline banner component.

@hpinsley It works locally because localhost is exempt from CORS restrictions in most browsers — the Same-Origin Policy doesn't block requests from localhost the same way it does from a deployed domain.

In production on Vercel, the client-side fetch to rss.nytimes.com gets blocked because NYT doesn't include Access-Control-Allow-Origin in their response headers.

Fix: move the RSS fetch to a Next.js API route (e.g. /api/rss) so it runs server-side, then have the component fetch from that instead. Server-side requests aren't subject to CORS.

hpinsleyComment#70feat: Add a world chaos headline banner component.

@skridlevsky That's strange. I picked this feed as I thought it was allowing all CORS origins. It seems to work for me when running locally:

image

Am I missing something?

skridlevskyComment#70feat: Add a world chaos headline banner component.

@hpinsley, cool concept! The preview shows just the placeholder though - RSS fetch is hitting CORS since it's client-side:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://rss.nytimes.com/services/xml/rss/nyt/World.xml. (Reason: CORS header 'Access-Control-Allow-Origin' missing).

Moving it to an API route would fix it.

openchaos-bot[bot]Comment#70feat: Add a world chaos headline banner component.

🤖 OpenChaos Bot

Summary: This PR introduces a new "WorldChaos" component that displays a rotating headline from an RSS feed (defaulting to the NYT World feed). It also adds the 'rss-parser' dependency to consume RSS feeds.

Files changed: 4 (package.json, package-lock.json, src/app/page.tsx, src/components/WorldChaos.tsx)

Impact: Medium - Adds a new feature to the homepage, introduces a new dependency, and fetches external data.


openchaos-bot

hpinsleyComment#70feat: Add a world chaos headline banner component.

@matthewmayer Haha yeah. Felt the breadth and scope of the headlines would lend itself to the ambiance and spirit of the site. ;-)

matthewmayerComment#70feat: Add a world chaos headline banner component.

I was intrigued to see how you were explicitly going to find news about world chaos, only to find this is literally just the NY Times World News feed. Accurate.