Fix/1351 improve 404 page#1361
Conversation
15c6667 to
8c4bf30
Compare
|
I opened a Draft PR to develop for #1351. I used Bootstrap flex alignment paired with an inline style of minHeight: "80vh" to center the content and force the high footer down to the bottom of the screen. I also added the useLocation hook to dynamically display the broken URL path, and replaced the single home link with a button group for Home, Feeds, and Dashboard that could give users clear exit options/ redirections .I formatted the code using Prettier (npm run formatter) to matche the repository guidelines and it shows it passed the automated CI formatting checks. All frontend tests pass cleanly on npm test , except for a pre-existing flaky date test in NewsWidget. |
I'm a little confused. This PR was not a draft, so I converted it to one. I hope this is fine for you.
Oh, if you found a flaky test, could you please open an issue for that? :) Your screenshot looks good, I like the decisions you made. Polish the PR a bit (add description, remove console.log, etc.) and I think it is ready for review! If your done, just mark it as "ready to review" and I'll take a look. |
8c4bf30 to
73dc143
Compare
73dc143 to
51a1ead
Compare
|
I made the changes ! Can you check please and let me know if they are okay now ! @regulartim |
Description
Improved the NotFoundPage layout and user experience by resolving three core structural and navigation
limitations:
Fixed Footer Alignment:
Implemented an 80vh min-height property to securely lock the footer to the bottom of the viewport, eliminating high floating on short viewports.
Added Failed Path Display:
Implemented React Router's useLocation hook to dynamically render the exact broken URL path (location.pathname) so users have clear context on what failed.
Enhanced Navigation Recovery:
Replaced the single homepage link dead-end with a clean Reactstrap ButtonGroup, giving users direct paths to Home, Feeds, and the Dashboard.
Related Issues
Closes #1351
The component was also refactored to remove all debug logs and console.log statements, ensuring the final code remains completely clean.
Updated 404 page
Type of change
Checklist
Please complete this checklist carefully. It helps guide your contribution and lets maintainers verify that all requirements are met.
Formalities
<feature name>. Closes #999develop.develop.Docs and tests
Ruff) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.GUI changes
Ignore this section if you did not make any changes to the GUI.