chore(angular-react): Migrate HomeComponent to React#2
Open
devin-ai-integration[bot] wants to merge 4 commits intomainfrom
Open
chore(angular-react): Migrate HomeComponent to React#2devin-ai-integration[bot] wants to merge 4 commits intomainfrom
devin-ai-integration[bot] wants to merge 4 commits intomainfrom
Conversation
Co-Authored-By: Lukas Burger <lukaskburger@gmail.com>
Co-Authored-By: Lukas Burger <lukaskburger@gmail.com>
Co-Authored-By: Lukas Burger <lukaskburger@gmail.com>
Co-Authored-By: Lukas Burger <lukaskburger@gmail.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a React functional component (
HomeComponent.tsx) alongside the existing AngularHomeComponentas the first step in an Angular-to-React migration. This is a 1:1 port — no Angular files were modified or removed.What was ported:
listConfig,currentPage,isFollowingFeed) viauseStatengOnInitcombineLatestsubscription →useEffectwatching equivalent props*ifAuthenticated,*rxLet,@for,[ngClass], and[hidden]directiveshandlePageChange) preserving feed query paramWhat is deferred (marked with TODOs):
ArticleListComponent— rendered as a placeholder<div>with data attributes documenting expected propsArticlesService,ArticlePreviewComponent— need separate migrationReview & Testing Checklist for Human
package.json— this.tsxfile won't compile with the current Angular build. Confirm this is acceptable as a migration-in-progress artifact, or decide if React should be added as a dependency now.React.FCused without explicitimport React— verify this won't cause TS errors with the project's tsconfig (React 17+ JSX transform handles JSX butReact.FCmay still need the import).handlePageChangeis defined but only referenced as a string indata-on-page-change="handlePageChange"— it's not wired to a real component yet. Verify this won't cause unused-variable lint errors if stricter checks are added later.useEffectlogic against the AngularngOnInitto confirm the feed/tag/page routing logic is faithfully preserved (especially the redirect-to-login guard for unauthenticated users onfeed=following).Notes
bun.lockdiff is from runningbun installduring setup, not from the migration itself.style={{ cursor: "pointer" }}is used on nav links and tag pills. The Angular CSS (.nav-link,.tag-pill) already setscursor: pointer— these inline styles are redundant if the same CSS is loaded in the React context.onNavigateToLoginin theuseEffectdependency array could cause unnecessary re-renders if the parent doesn't memoize the callback. Worth noting for when this component is actually wired up.Link to Devin session: https://app.devin.ai/sessions/a5e3ba9084504d18a7211d58ff39aea7
Requested by: @lburgers