feat: add Header, Footer, Settings shell components and port SCSS theme system#247
feat: add Header, Footer, Settings shell components and port SCSS theme system#247devin-ai-integration[bot] wants to merge 1 commit into
Conversation
- Create Header.tsx with nav links (/news, /newest, /show, /ask, /jobs), logo, and settings toggle button using useSettings() hook and NavLink - Create Footer.tsx with static attribution content - Create Settings.tsx with theme radio buttons (default/night/amoledblack), open-links-in-new-tab checkbox, font size and list spacing number inputs - Port SCSS files from src/app/shared/scss/ to src/styles/ including _themes.scss, _theme_variables.scss, and _media.scss - Port component-level SCSS for Header, Footer, and Settings - Add global app.scss with wrapper/body-cover styles and theme imports - Update App.tsx with BrowserRouter, theme wrapper div, and shell layout Co-Authored-By: Eashan Sinha <eashan.sinha@cognition.ai>
Original prompt from Eashan
|
🤖 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:
|
Summary
Step 2 of the Angular-to-React migration. This PR adds the application shell — Header, Footer, and Settings components — and ports the SCSS theme system from the Angular source.
Components created:
Header.tsx— Ported fromsrc/app/core/header/. Navigation links to/news/1,/newest/1,/show/1,/ask/1,/jobs/1usingreact-router-domNavLink. Includes logo, settings toggle button, and conditionally rendersSettingswhenshowSettingsis true viauseSettings()hook.Footer.tsx— Ported fromsrc/app/core/footer/. Static footer with GitHub attribution link.Settings.tsx— Ported fromsrc/app/core/settings/. Theme radio buttons (default/night/amoledblack), open-links-in-new-tab checkbox, font size number input, and list spacing number input. All wired touseSettings()hook.Styles ported:
src/styles/_media.scss— Media query breakpoint variablessrc/styles/_theme_variables.scss— Color variables for day, night, and AMOLED black themessrc/styles/_themes.scss— Theme mixin generating.default,.night,.amoledblackCSS class scopessrc/styles/app.scss— Global wrapper and body-cover styles with theme importsApp.tsx updated:
BrowserRouterwithRoutes(placeholder route for feeds)settings.theme<Header />→<Routes />→<Footer />Review & Testing Checklist for Human
/news/1,/newest/1,/show/1,/ask/1,/jobs/1)Notes
@importdeprecation warnings are expected — the Angular source uses@importand a migration to@use/@forwardcan be done in a future stepdarken()function deprecation warning in the AMOLED theme is inherited from the original Angular SCSSLink to Devin session: https://app.devin.ai/sessions/f3b795b2d1434067a78fd5b58d3d572f
Requested by: @eashansinha
Devin Review