Skip to content

[4/7] React migration: Feed and Item components with the five feed routes - #747

Open
devanshi-gpta wants to merge 1 commit into
devin/1788560000-react-03-chromefrom
devin/1788560000-react-04-feeds
Open

devanshi-gpta wants to merge 1 commit into
devin/1788560000-react-03-chromefrom
devin/1788560000-react-04-feeds

Conversation

@devanshi-gpta

Copy link
Copy Markdown

Summary

Ports src/app/feeds/ and wires up routing: / redirects to /news/1, and news|newest|show|ask|jobs share one Feed component parameterised by feed type, matching app.routes.ts.

  • Feed replaces the RxJS subscription with a useEffect fetch keyed on feed type and useParams().page, aborting the in-flight request on change so a fast page switch can't render stale stories.
  • Item keeps the Angular template's link semantics exactly, including [attr.target]="openLinkInNewTab ? '_blank' : null"target={settings.openLinkInNewTab ? '_blank' : undefined}, and the job-type branch that omits points and comments.
  • Feed.scss's bare a { font-weight: bold } is narrowed to .job-header a, .nav a. Under Angular it applied only inside the feed template; imported globally it would have bolded every story title rendered by Item.
  • Vitest/RTL tests cover pagination link state, the error path, and item link behavior.

Proposed fixes

  • Add Feed.tsx / Item.tsx with stylesheets and tests.
  • Add the redirect and five feed routes to App.

Link to Devin session: https://app.devin.ai/sessions/a3a0ff57bab64e25860349a003a282ef
Open in Devin Desktop: https://app.devin.ai/desktop/session/a3a0ff57bab64e25860349a003a282ef?variant=devin
Requested by: @devanshi-gpta

Co-Authored-By: Devanshi Gupta <devanshi.gupta@cognition.ai>
@devin-ai-integration

Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant