-
Notifications
You must be signed in to change notification settings - Fork 190
feat: add discontinued message #1200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdded a discontinuation notice banner and adjusted navbar layout; reworked leaderboard page header to include FeaturedQuest and integrated search/filter controls; updated module import paths and minor UI/formatting tweaks across social media actions and rankings table. No exported APIs removed; FeaturedQuest gained a Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (5)
components/UI/navbar.tsx (5)
94-102: Guard against stale connector IDs and minor renameIf the stored connector ID isn’t found,
connectorbecomesundefinedand you still cast it toConnector, risking a runtime error. Clean up the key and bail. Also, minor typo inconnectordId.Apply this diff:
- const connectordId = localStorage.getItem("SQ-connectedWallet"); - const connector = availableConnectors.find( - (item) => item.id === connectordId - ); - await connectAsync({ connector: connector as Connector }); + const connectorId = localStorage.getItem("SQ-connectedWallet"); + const connector = availableConnectors.find((c) => c.id === connectorId); + if (!connector) { + localStorage.removeItem("SQ-connectedWallet"); // stale ID + return; + } + await connectAsync({ connector: connector as Connector });
181-187: Banner a11y: announce politely and hide emoji from SR; confirm z-index above modalsAdd
role="status"andaria-live="polite"so screen readers announce once; hide the emoji from SR. Also verify your modal z-indexes render abovez-30.Apply this diff:
- <div className="fixed w-full z-30 bg-red-600 text-white text-center py-2 px-4"> - <Typography type={TEXT_TYPE.BODY_DEFAULT} className="text-white"> - ⚠️ Starknet Quest has been discontinued. Thank you for your support! - </Typography> - </div> + <div + ref={bannerRef} + className="fixed w-full z-30 bg-red-600 text-white text-center py-2 px-4" + role="status" + aria-live="polite" + > + <Typography type={TEXT_TYPE.BODY_DEFAULT} className="text-white"> + <span aria-hidden="true">⚠️ </span> + Starknet Quest has been discontinued. Thank you for your support! + </Typography> + </div>
188-188: Avoid hard-coded 48px offset; compute from banner heightIf the banner wraps or styles change, 48px will misalign the navbar. Compute offset from the actual banner height.
Apply this diff:
- <div className={`fixed w-full z-20`} id="nav" style={{ top: "48px" }}> + <div className="fixed w-full z-20" id="nav" style={{ top: `${bannerHeight}px` }}>Add the following (outside this hunk):
// imports // import React, { useState, useEffect, useLayoutEffect, useRef, FunctionComponent } from "react"; const bannerRef = useRef<HTMLDivElement | null>(null); const [bannerHeight, setBannerHeight] = useState(48); useLayoutEffect(() => { const update = () => setBannerHeight(bannerRef.current?.offsetHeight ?? 48); update(); window.addEventListener("resize", update); return () => window.removeEventListener("resize", update); }, []);
198-200: Alt text nitPrefer “Starknet Quest” instead of “Starknet Quest Logo” to keep alt concise and non-redundant.
Apply this diff:
- alt="Starknet Quest Logo" + alt="Starknet Quest"
255-266: Mobile menu UX: close on scrim click; stop propagation in panelEnable closing when tapping the backdrop and prevent accidental close when interacting with the panel.
Apply these diffs:
- <div + <div + onClick={nav ? () => setNav(false) : undefined} className={ nav ? "mt-32 lg:hidden fixed left-0 top-0 w-full h-screen bg-black/10 z-10" //extra margin so page doesnt cover first navbar buttons : "" } >- <div + <div + onClick={(e) => e.stopPropagation()} className={`mt-28 fixed left-0 top-0 w-full sm:w-[60%] lg:w-[45%] h-screen bg-background px-5 ease-in justify-between flex-col overflow-auto ${ //extra margin so page doesnt overlap the navbar nav ? styles.mobileNavbarShown : styles.mobileNavbarHidden }`} >
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
components/UI/navbar.tsx(5 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/UI/navbar.tsx (1)
constants/typography.ts (1)
TEXT_TYPE(1-14)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Jest
🔇 Additional comments (3)
components/UI/navbar.tsx (3)
207-213: Menu updates LGTMLinks/labels look consistent.
279-286: Mobile “Quests” link LGTM
52-61: Type import check: SQInfoDataEnsure
SQInfoDatais imported or globally declared; otherwise TS will error here and at the Modal prop.If missing, add an explicit import from your types module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
app/leaderboard/page.tsx (1)
369-392: Consider adding error boundaries for the new banner structure.The new banner with FeaturedQuest component should handle potential errors gracefully, especially if the featured quest data is unavailable.
Consider wrapping the FeaturedQuest component in an error boundary or adding conditional rendering to handle cases where
featuredQuestmight be null or undefined:- <FeaturedQuest - heading="Are you ready for this quest?" - key={featuredQuest?.id} - title={featuredQuest?.title_card} - onClick={() => router.push(`/quest/${featuredQuest?.id}`)} - imgSrc={featuredQuest?.img_card} - issuer={{ - name: featuredQuest?.issuer ?? "", - logoFavicon: featuredQuest?.logo ?? "", - }} - reward={featuredQuest?.rewards_title} - desc={featuredQuest?.desc} - expiry={featuredQuest?.expiry_timestamp} - questId={featuredQuest?.id} - /> + {featuredQuest && ( + <FeaturedQuest + heading="Are you ready for this quest?" + key={featuredQuest.id} + title={featuredQuest.title_card} + onClick={() => router.push(`/quest/${featuredQuest.id}`)} + imgSrc={featuredQuest.img_card} + issuer={{ + name: featuredQuest.issuer ?? "", + logoFavicon: featuredQuest.logo ?? "", + }} + reward={featuredQuest.rewards_title} + desc={featuredQuest.desc} + expiry={featuredQuest.expiry_timestamp} + questId={featuredQuest.id} + /> + )}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
app/leaderboard/page.tsx(11 hunks)components/UI/actions/socialmediaActions.tsx(3 hunks)components/leaderboard/RankingsTable.tsx(3 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
components/leaderboard/RankingsTable.tsx (2)
constants/typography.ts (1)
TEXT_TYPE(1-14)utils/feltService.ts (1)
decimalToHex(12-16)
app/leaderboard/page.tsx (4)
utils/stringService.ts (1)
getDomainWithoutStark(61-69)constants/typography.ts (1)
TEXT_TYPE(1-14)constants/common.ts (1)
TOP_50_TAB_STRING(39-39)utils/feltService.ts (1)
decimalToHex(12-16)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Jest
🔇 Additional comments (18)
components/UI/actions/socialmediaActions.tsx (3)
10-10: LGTM! Type definition uses consistent string literal format.The change from single quotes to double quotes for string literal types is a valid formatting adjustment that maintains the same functionality.
28-28: LGTM! Whitespace formatting changes.The added blank lines improve code readability by better separating the variable declaration from the forEach loop and the loop from the setState call.
Also applies to: 39-39
4-4: Confirm deep import — prefer package-root exportspackage.json shows starknetid.js ^4.0.1 and the repo currently deep-imports "starknetid.js/dist/utils" in: components/UI/actions/socialmediaActions.tsx, app/leaderboard/page.tsx, components/leaderboard/RankingsTable.tsx.
The library documents exposing utils via the package root — useimport { utils } from "starknetid.js"and callutils.isStarkRootDomain(...)instead of importing from/dist(deep imports are brittle). (docs.starknet.id)Action: replace the deep imports with the package-root export OR verify that the installed release actually exposes "dist/utils" and pin/adjust the dependency if necessary.
components/leaderboard/RankingsTable.tsx (2)
144-150: LGTM! Typography components reformatted for better readability.The multiline JSX formatting for Typography components improves code readability without affecting functionality. The text content and styling logic remain unchanged.
Also applies to: 153-163, 175-180, 182-186
20-20: Approve — import path update looks correct but local verification requiredStarknet ID SDK exposes utils.isStarkDomain and package.json depends on starknetid.js@^4.0.1; ripgrep in the sandbox skipped files so I couldn't fully confirm absence of the old "starknetid.js/packages/core" imports — run locally: rg -n "starknetid.js/packages/core" -S && rg -n "isStarkDomain" -S or inspect node_modules/starknetid.js/dist/utils to confirm the export. (docs.starknet.id)
app/leaderboard/page.tsx (13)
17-17: LGTM! Type-only import for Address type.Using
type Addressin the import statement is a TypeScript best practice that clarifies this is a type import and can help with tree-shaking.
45-45: Import path consistency maintained.The
isStarkDomainimport path change tostarknetid.js/dist/utilsis consistent with other files in this PR.
99-99: LGTM! Proper cleanup of timeout.Good practice to clear the timeout on unmount to prevent memory leaks.
105-106: LGTM! Consistent formatting of async operations.The refactored async call with proper indentation improves readability.
Also applies to: 109-109
125-128: LGTM! Improved spread operator usage.The state update using spread syntax is cleaner and follows React best practices for immutable updates.
144-144: Simplified address resolution logic looks good.The consolidated expression
address || userAddressis cleaner than the previous conditional logic.
210-212: LGTM! Clean domain checking logic.The ternary operator properly handles both Stark domain and regular address formats.
263-263: Address resolution logic is consistent.The fallback pattern
currentSearchedAddress || (userAddress ? userAddress : address || "")ensures proper address resolution across different states.Also applies to: 293-293, 318-319
394-427: LGTM! Well-structured leaderboard header layout.The new layout with distinct sections for the heading, chip list, and search bar provides better organization and user experience. The flex values (0.4, 1, 0.4) create a balanced layout.
434-444: LGTM! Conditional Avatar rendering based on address state.The Avatar component correctly displays based on whether there's a searched address or user address, with proper hex conversion using
decimalToHex.
451-451: Good UX improvement with contextual text.The text changes from "He is" to "You are" based on whether viewing a searched address provides better user feedback.
369-392: No action needed —questIdprop verified on FeaturedQuest.FeaturedQuestProps defines
questId?: numberand the component conditionally renders ; passingfeaturedQuest?.idis valid.
75-78: Verify LeaderboardToppersData type and state initializerState uses useState({ best_users: [], total_users: 0 }); confirm LeaderboardToppersData (type or interface) is defined/imported and that this object matches its required fields — update the initializer or import the correct type if not.
Location: app/leaderboard/page.tsx (lines 75–78).
I couldn't locate the type due to ripgrep error "unrecognized file type: tsx" — please run locally: rg -n "(type|interface)\s+LeaderboardToppersData" -S or verify manually.
* feat: cash token (#1136) * Fix: Add Lending Protocols category cards * Feat: color background of the APR, TVL and Daily reward filters/Hover * fix: color background of the APR, TVL and Daily reward * fix: remove pdding for daily rewards * Fix: delete title and description * fix: Redesigned the “reward quests” card to align with the updated Figma design * fix: padding and hover issue fix * fix: return default sorting and remove added comments messaged * Fix: Redirect to the specific pool Improve redirection to ensure users land directly on the specific pool when clicking a row in the DeFi table. * merge testnet * Fix: Improve the static sphere by animating it * Created the filter and card structure with it's properties. * Implemented and designed the card * Integrated the card and filter components to the defi page. * fix accessibility * Refactor code structure for improved readability and maintainability * Remove unused DefiCategoryCard component and related exports * feat(web): add new gray color variant in tailwindcss configuration * feat(web): create a new component, which handles external links * feat(web): add animation utility for cards * chore(web): add new image * feat(web): create component for ecosystem cards * refactor: changes according to Coderabbitai * fix: Adjust gradientLine position and width for better alignment * Implementation of discover cards * fix: Add empty string to icon and banner properties for Reward Quests * Fix: Replace 'Ongoing' and 'Finished' text with icons according to Figma design * Fix: Prevent layout shift caused by spinning SVG on /discover/defi page * Fix: [add padding of the table header and table footer] * fix build * cleaning the code * Feature: Added Tooltips to the app Icons * Feature: Added Tooltips to the app Icons * Fix: [add padding of the table header and table footer.] * fix: Remove AccentBox from StepElement and update background styles in steps.module.css * changing case * fix footer padding * refactor * cleaning the code * Fix: [Add a color background to the table header and the table footer. #1030] * Fix: [Add a color background to the table header and the table footer. #1030] * Fix: [Add a color background to the table header and the table footer. #1030] * fix design * fix spacing * changed the gradient color of step cards * update * update * Delete package-lock.json * Feat: Added Perpetuals & Derivatives cards * Feat: Added Perpetuals & Derivatives cards * added green box shadow for step 2 card * feat: added the yield Oppotunities to the table head * fix: fixed the border radius bug * Modify the "Unique Users" card. * fix: removed unused props * cleaning the code * fix * chore: add image endurfi * feat: add data to display liquid-staking * Fix: Add AMM & DEX cards to DeFi category on Starknet Quest * adjust the path name * Fix: add and correct Payments cards (Kulipa & Pulsar Money) for DeFi page (#1099) * Fix: add and correct Payments cards (Kulipa & Pulsar Money) for DeFi page (#1099) * cleaning * cleaning * fix path * fix: Add all token icons * fix build errors * fix responsive * removign package-lock * Revert "fix build errors" This reverts commit bb10be6. * fix changes requested * still fixing * fixing issues * fixing spaces and loading issues * still fixing * fixing update * fix suggestions * fixing suggestions * fixing suggestions * Image uploading through admin dashboard * Fix: Align Boost and Reward Quest cards horizontally on large screens * Fix: prevent scroll shift by maintaining table height during loading * chore: add pramb image * feat: add data to display pramb insurance * refactor: change single quotes to double quotes * color of Quest Analytics changed * Fix: update graph card styles and layout for issue #1084 * Fix: Centered 'New explorer, start your quest!' section on dashboard * Revert package.json and .env.example to match upstream , modify styling to match figma * UI: Refactored quest analytics page with consistent styling and gradient shadows * remove lock * cleaning the code * removing spaces * feat: add wallet and bridge integrations Add 21 wallet and bridge service configurations including Starkgate, Argent, Braavos, Metamask SNAPS, and cross-chain bridges like Orbiter and Layerswap. * chore: implemented changes on image naming * chore: add new image * feat: add image to Stats component * Fix: Fix UI bug that caused unexpected horizontal shift on page scroll * cleaning * chore: add new image in webp format * refactor: add centered image * refactor: add priority to image * Fix: Update wallet name from Argent to Ready in connection menu * Fix: Update test expectations to match new Ready wallet name * Fix: Resolve build issues by downgrading to compatible starknet versions * #1175 banner details form * feat: change font of title, subtitle & description * Fix width * feat: add hover styles to cards * feat: add discontinued message (#1200) * feat: add message * fix: build error --------- Co-authored-by: Nico <nicomarchand29@gmail.com> Co-authored-by: Ifechi <ifechi.dev@gmail.com> Co-authored-by: portableDD <emmanueltemitopedorcas20@gmail.com> Co-authored-by: GideonBature <infoaboutgideon@gmail.com> Co-authored-by: BlessingEmejulu <blessingnneamaka57@gmail.com> Co-authored-by: Nico <60229704+Marchand-Nicolas@users.noreply.github.com> Co-authored-by: Benjtalkshow <chinedubenj@gmail.com> Co-authored-by: Verifieddanny <dannyclassic56@gmail.com> Co-authored-by: viktohblake <damanygt@gmail.com> Co-authored-by: Luis Carrión <louiss862@gmail.com> Co-authored-by: BravarDev <brayanvafer@gmail.com> Co-authored-by: dicethedev <dicethedev@gmail.com> Co-authored-by: Emmanuel <emmanuelogheneovo17@gmail.com> Co-authored-by: Nash ezekiel <nashezekiel001@gmail.com> Co-authored-by: Emmanex01 <nwanosiketochukwu99@gmail.com> Co-authored-by: Emmanuel Tochukwu <108570606+Emmanex01@users.noreply.github.com> Co-authored-by: soyaya <davidlovedavid1015@gmail.com> Co-authored-by: Sneha Gupta <96808735+Snehagupta1907@users.noreply.github.com> Co-authored-by: Dannynsikak <nsikakdanny11@gmail.com> Co-authored-by: Isaac Daniel <tissan300@gmail.com> Co-authored-by: kimcascante <kiimcm9@gmail.com> Co-authored-by: pheobeayo <pheobeayo@gmail.com> Co-authored-by: saimeunt <saimeunt@gmail.com> Co-authored-by: perpetual-cosmos <prataptarunsingh241@gmail.com> Co-authored-by: sajal <sajalbnl123@gmail.com> Co-authored-by: Amarjeet <amarjeet015@gmail.com> Co-authored-by: Clement Raymond <chinexzy37@gmail.com> Co-authored-by: Isaac Onyemaechi <amaechiisaac450@gmail.com> Co-authored-by: JamesVictor-o <victorjames40v@gmail.com> Co-authored-by: Stephanie Egbuonu <100955511+stephanniegb@users.noreply.github.com> Co-authored-by: akintewe <85641756+akintewe@users.noreply.github.com> Co-authored-by: ADR!AN <111903096+adrianvrj@users.noreply.github.com> Co-authored-by: system625 <tundexsmith624@gmail.com> Co-authored-by: Iris <iris.devillars@gmail.com>
Summary by CodeRabbit
New Features
Style
Bug Fixes / UX