From ebfc7cecc09b8d1231c7f29692ece05660c3b83d Mon Sep 17 00:00:00 2001 From: martin-mfg <2026226+martin-mfg@users.noreply.github.com> Date: Fri, 28 Nov 2025 13:15:05 +0100 Subject: [PATCH] add markdown button, sticky step 2 card, auto-scroll only if necessary, change some labels --- frontend/frontend/src/pages/App/Header.js | 2 +- frontend/frontend/src/pages/Home/Home.js | 14 +++++--- .../src/pages/Home/stages/Customize.js | 2 +- .../frontend/src/pages/Home/stages/Display.js | 35 +++++++++++++------ 4 files changed, 37 insertions(+), 16 deletions(-) diff --git a/frontend/frontend/src/pages/App/Header.js b/frontend/frontend/src/pages/App/Header.js index c5c2c74c..5fb954eb 100644 --- a/frontend/frontend/src/pages/App/Header.js +++ b/frontend/frontend/src/pages/App/Header.js @@ -159,7 +159,7 @@ const Header = ({ mode, stage, setStage }) => { 'Login', 'Select Card', 'Modify Parameters', - 'Customize Theme', + 'Select Theme', 'Display Card', ]} currItem={stage} diff --git a/frontend/frontend/src/pages/Home/Home.js b/frontend/frontend/src/pages/Home/Home.js index 4e629162..6bd85156 100644 --- a/frontend/frontend/src/pages/Home/Home.js +++ b/frontend/frontend/src/pages/Home/Home.js @@ -197,7 +197,13 @@ const HomeScreen = ({ stage, setStage }) => { const contentSectionRef = useRef(null); useEffect(() => { - contentSectionRef.current?.scrollIntoView(); + // scroll to top of content section if we're scrolled down + if (contentSectionRef.current) { + const rect = contentSectionRef.current.getBoundingClientRect(); + if (rect.top < 0) { + contentSectionRef.current.scrollIntoView(); + } + } }, [stage]); useEffect(() => { @@ -285,9 +291,9 @@ const HomeScreen = ({ stage, setStage }) => { [ '', 'You will be able to customize your card in future steps.', - 'Change the date range, include private commits, and more!', - 'Choose from one of our predefined themes (more coming soon!)', - 'Display your card on GitHub, Twitter, or Linkedin', + '', + '', + 'Display the finished card on GitHub, Twitter/X, Linkedin, or anywhere else!', ][stage] )} diff --git a/frontend/frontend/src/pages/Home/stages/Customize.js b/frontend/frontend/src/pages/Home/stages/Customize.js index 1fd11be6..6e210c11 100644 --- a/frontend/frontend/src/pages/Home/stages/Customize.js +++ b/frontend/frontend/src/pages/Home/stages/Customize.js @@ -160,7 +160,7 @@ const CustomizeStage = ({ )}