-
Notifications
You must be signed in to change notification settings - Fork 0
feat(layout): redesign and refactor landing dashboard #396
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
Open
paolomolo
wants to merge
59
commits into
develop
Choose a base branch
from
feature/improved-landing-dashboard
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
1cda0d7
feat(dashboard): add left rail with connect wallet and swap widget
paolomolo a75f5af
fix(dashboard): fix visual layout of swap widget in left rail
paolomolo 734f014
feat(dashboard): implement twitter-like sticky scrolling for sidebars
paolomolo 869431c
feat(layout): add multiple layout variants with easy switcher
paolomolo e0216e6
feat(layout): improve navigation and simplify layout system
paolomolo e156a43
refactor(layout): implement glass morphism and unified tab styling
paolomolo 0c34f7f
fix(ui): improve post layout and swap widget behavior
paolomolo c1c9a85
feat(mini-apps): redesign DeFi as mini-apps with landing page
paolomolo 5f9e72f
refactor(layout): move Connect Wallet card to left rail
paolomolo 050d78a
refactor(dashboard): remove hero banner from homepage
paolomolo 9711333
style: reduce border radius for cards and posts
paolomolo 035c395
refactor: move footer section to left rail
paolomolo 70a192b
refactor: use FeedList component in FeedWidget with compact styling
paolomolo dc9281a
refactor: scale down dashboard trend token list and improve layout
paolomolo 366e6e3
refactor: improve dashboard layout and filter positioning
paolomolo e316574
feat: improve trends dashboard UI and icons
paolomolo b145d16
feat: improve trends dashboard and chart styling
paolomolo 7e5f31f
feat(dashboard): convert table header to div with backdrop blur
paolomolo 5ea5f40
fix(dashboard): convert header back to table header for proper alignment
paolomolo 9151aba
fix(dashboard): remove gradient from Trends title and maintain letter…
paolomolo f88dbbb
feat(ui): make dashboard full width and add holders/price change columns
paolomolo f8f94cf
fix(ui): show crown on highest market cap token globally
paolomolo 5a62e9a
feat(ui): make mini apps page full width with feed on right rail
paolomolo f75f508
feat(ui): make right rail width scale on larger screens
paolomolo e3ead89
feat(ui): wrap mini app pages in cards with feed on right rail
paolomolo fec5424
refactor(routes): change /defi routes to /apps
paolomolo 43d009a
feat(routes): add comprehensive /defi to /apps redirects
paolomolo 27882f6
Merge remote-tracking branch 'origin/develop' into feature/improved-l…
paolomolo bef006c
refactor(ui): remove wrapper card from mini-apps landing page
paolomolo b88fa4d
feat(ui): add browser window-style headers to mini-app pages
paolomolo f5123a9
feat(mini-apps): implement plugin system for community extensibility
paolomolo bb3d98a
feat: improve mini app layouts with responsive design and remove fixe…
paolomolo 9341496
fix: fix bridge component loading issue
paolomolo 73e534b
feat: implement iframe-like isolation for mini-apps
paolomolo 728684f
feat: add fixed bottom liquid glass navigation bar
paolomolo e81ad9d
feat: improve wallet button in bottom navigation
paolomolo 8a9c3a9
refactor: remove temporary layout switcher from Pool component
paolomolo 1c7ae76
feat: show left rail on wide screens for mini-apps and hide logo header
paolomolo eba3eb4
fix: reduce gap between tab menu and wallet card in left rail
paolomolo f00b492
fix(ui): match create post item styling with feed items
paolomolo 1dafefa
style(ui): make emoji, gif, and post buttons match feed item button s…
paolomolo 644ef10
fix(mini-apps): ensure apps are shown on first navigation to mini app…
paolomolo a0fed46
style(ui): add border and padding to create post input field
paolomolo ea76e7d
fix(wallet): remove connect button hover background
paolomolo d5ccba3
fix(ui): make address pill green
paolomolo eecf20f
fix(ui): update colors to use neon-teal for addresses and chain names
paolomolo 0350727
fix(chain-names): improve chain name loading performance and add debu…
paolomolo 8cfeae6
style(trends): improve mobile layout and styling
paolomolo 47b0ba5
fix(trends): fix scrolling and layout issues for dashboard trends and…
paolomolo bfa2c19
feat(mini-apps): add Suspense boundary for lazy-loaded mini-app compo…
paolomolo 6e57161
perf(frontend): optimize polling intervals and add window focus refresh
paolomolo 038d4fa
perf(feed): optimize network requests on initial load
paolomolo 067f35d
perf(feed): disable refetchOnWindowFocus for social feed queries
paolomolo a3c7cdf
perf(feed): disable refetchOnWindowFocus for remaining queries
paolomolo 78e76d5
perf(feed): remove expensive descendantCount query
paolomolo 6674ac9
perf(feed): lazy-load tip summaries and reduce pagination aggressiveness
paolomolo 1a8e407
perf(feed): prevent auto-pagination on initial load
paolomolo a6d217b
fix(feed): allow automatic loading of latest posts after trending
paolomolo b44d537
fix(feed): limit automatic transition to single fetch
paolomolo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,233 @@ | ||
| # Mini-Apps Plugin System | ||
|
|
||
| The Superhero platform includes a powerful plugin system that allows community developers to easily create and register their own mini-apps without forking the main repository. | ||
|
|
||
| ## Overview | ||
|
|
||
| Mini-apps are self-contained applications that integrate seamlessly into the Superhero platform. They appear in the `/apps` directory and are automatically listed on the Mini-Apps landing page. | ||
|
|
||
| ## Quick Start | ||
|
|
||
| ### 1. Create Your Mini-App Component | ||
|
|
||
| Create a React component for your mini-app: | ||
|
|
||
| ```tsx | ||
| // src/features/my-app/MyApp.tsx | ||
| import React from 'react'; | ||
|
|
||
| export default function MyApp() { | ||
| return ( | ||
| <div className="w-full pb-4 md:pb-6"> | ||
| {/* Your app content */} | ||
| <h1>My Custom Mini-App</h1> | ||
| </div> | ||
| ); | ||
| } | ||
| ``` | ||
|
|
||
| ### 2. Register Your Mini-App | ||
|
|
||
| Create a plugin file and register your app: | ||
|
|
||
| ```tsx | ||
| // src/features/my-app/plugin.ts | ||
| import { lazy } from 'react'; | ||
| import { registerMiniApp } from '@/features/mini-apps'; | ||
|
|
||
| registerMiniApp({ | ||
| metadata: { | ||
| id: 'my-app', | ||
| name: 'My App', | ||
| description: 'A cool mini-app built by the community', | ||
| icon: '🚀', | ||
| path: '/apps/my-app', | ||
| category: 'utility', | ||
| gradient: 'from-purple-500 to-pink-500', | ||
| author: 'Your Name', | ||
| authorUrl: 'https://github.com/yourusername', | ||
| version: '1.0.0', | ||
| tags: ['utility', 'community'], | ||
| }, | ||
| route: { | ||
| path: '/apps/my-app', | ||
| component: lazy(() => import('./MyApp')), | ||
| }, | ||
| }); | ||
| ``` | ||
|
|
||
| ### 3. Import Your Plugin | ||
|
|
||
| Add your plugin import to the plugins file: | ||
|
|
||
| ```tsx | ||
| // src/features/mini-apps/plugins.ts | ||
| import { registerBuiltInMiniApps } from './built-in'; | ||
| import './my-app/plugin'; // Add this line | ||
| ``` | ||
|
|
||
| ## Plugin Structure | ||
|
|
||
| ### Metadata | ||
|
|
||
| The `metadata` object defines how your mini-app appears in the UI: | ||
|
|
||
| - **id**: Unique identifier (required) | ||
| - **name**: Display name (required) | ||
| - **description**: Short description shown on the landing page (required) | ||
| - **icon**: Emoji string or React component (required) | ||
| - **path**: Route path (required, should start with `/apps/`) | ||
| - **category**: One of `'trading' | 'bridge' | 'explore' | 'community' | 'utility'` (required) | ||
| - **gradient**: Tailwind gradient classes for icon background (required) | ||
| - **author**: Your name (optional) | ||
| - **authorUrl**: Your GitHub/profile URL (optional) | ||
| - **version**: Version string (optional) | ||
| - **tags**: Array of tags for filtering (optional) | ||
| - **requiresAuth**: Whether the app requires authentication (optional) | ||
|
|
||
| ### Route Configuration | ||
|
|
||
| The `route` object defines how your app is routed: | ||
|
|
||
| - **path**: Route path pattern (required) | ||
| - **component**: Lazy-loaded React component (required) | ||
| - **layout**: Custom layout wrapper (optional, defaults to `SocialLayout`) | ||
| - **options**: Additional route options (optional) | ||
|
|
||
| ## Examples | ||
|
|
||
| ### Simple Utility App | ||
|
|
||
| ```tsx | ||
| import { lazy } from 'react'; | ||
| import { registerMiniApp } from '@/features/mini-apps'; | ||
|
|
||
| registerMiniApp({ | ||
| metadata: { | ||
| id: 'calculator', | ||
| name: 'Calculator', | ||
| description: 'A simple calculator tool', | ||
| icon: '🔢', | ||
| path: '/apps/calculator', | ||
| category: 'utility', | ||
| gradient: 'from-blue-500 to-cyan-500', | ||
| author: 'John Doe', | ||
| }, | ||
| route: { | ||
| path: '/apps/calculator', | ||
| component: lazy(() => import('./Calculator')), | ||
| }, | ||
| }); | ||
| ``` | ||
|
|
||
| ### App with Custom Layout | ||
|
|
||
| ```tsx | ||
| import { lazy } from 'react'; | ||
| import { registerMiniApp } from '@/features/mini-apps'; | ||
| import CustomLayout from './CustomLayout'; | ||
|
|
||
| registerMiniApp({ | ||
| metadata: { | ||
| id: 'custom-app', | ||
| name: 'Custom App', | ||
| description: 'An app with custom layout', | ||
| icon: '⭐', | ||
| path: '/apps/custom', | ||
| category: 'community', | ||
| gradient: 'from-purple-500 to-pink-500', | ||
| }, | ||
| route: { | ||
| path: '/apps/custom', | ||
| component: lazy(() => import('./CustomApp')), | ||
| layout: CustomLayout, | ||
| }, | ||
| }); | ||
| ``` | ||
|
|
||
| ### App with Initialization | ||
|
|
||
| ```tsx | ||
| import { lazy } from 'react'; | ||
| import { registerMiniApp } from '@/features/mini-apps'; | ||
|
|
||
| registerMiniApp({ | ||
| metadata: { | ||
| id: 'analytics', | ||
| name: 'Analytics', | ||
| description: 'Token analytics dashboard', | ||
| icon: '📊', | ||
| path: '/apps/analytics', | ||
| category: 'explore', | ||
| gradient: 'from-green-500 to-teal-500', | ||
| }, | ||
| route: { | ||
| path: '/apps/analytics', | ||
| component: lazy(() => import('./Analytics')), | ||
| }, | ||
| initialize: () => { | ||
| // Initialize analytics tracking, etc. | ||
| console.log('Analytics app initialized'); | ||
| }, | ||
| cleanup: () => { | ||
| // Cleanup when app is unregistered | ||
| console.log('Analytics app cleaned up'); | ||
| }, | ||
| }); | ||
| ``` | ||
|
|
||
| ## Best Practices | ||
|
|
||
| 1. **Use lazy loading**: Always use `lazy()` for your component imports to enable code splitting | ||
| 2. **Follow naming conventions**: Use kebab-case for IDs and paths | ||
| 3. **Provide good descriptions**: Help users understand what your app does | ||
| 4. **Use appropriate categories**: Choose the category that best fits your app | ||
| 5. **Add tags**: Tags help users discover your app | ||
| 6. **Test your routes**: Make sure your route paths don't conflict with existing routes | ||
| 7. **Handle errors gracefully**: Use error boundaries and proper error handling | ||
|
|
||
| ## Integration Points | ||
|
|
||
| ### Using Platform Features | ||
|
|
||
| Your mini-app can access platform features through hooks and context: | ||
|
|
||
| ```tsx | ||
| import { useAeSdk } from '@/hooks'; | ||
| import { useToast } from '@/components/ToastProvider'; | ||
|
|
||
| export default function MyApp() { | ||
| const { activeAccount, sdk } = useAeSdk(); | ||
| const toast = useToast(); | ||
|
|
||
| // Use platform features | ||
| } | ||
| ``` | ||
|
|
||
| ### Styling | ||
|
|
||
| Use Tailwind CSS classes and follow the platform's design system: | ||
|
|
||
| ```tsx | ||
| <div className="overflow-hidden rounded-xl border border-white/10 bg-white/[0.02] backdrop-blur-xl p-6"> | ||
| {/* Your content */} | ||
| </div> | ||
| ``` | ||
|
|
||
| ## Community Guidelines | ||
|
|
||
| 1. **Be respectful**: Don't create apps that harm users or violate terms of service | ||
| 2. **Open source**: Consider open-sourcing your mini-app for the community | ||
| 3. **Documentation**: Provide clear documentation for your app | ||
| 4. **Testing**: Test your app thoroughly before registering | ||
| 5. **Updates**: Keep your app updated and maintain compatibility | ||
|
|
||
| ## Questions? | ||
|
|
||
| Join our developer community: | ||
| - GitHub: https://github.com/superhero-com/superhero | ||
| - Discord: [Link to Discord] | ||
| - Documentation: [Link to docs] | ||
|
|
||
|
|
||
|
|
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
Oops, something went wrong.
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.
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.
Body style set before body exists in DOM
The inline script in
<head>attempts to setdocument.body.style.backgroundColor(lines 23 and 27), butdocument.bodydoesn't exist yet because the body tag hasn't been parsed. This silently fails (caught by try-catch). Additionally, the<body>tag at line 35 hardcodesbackground-color: #0a0a0f(dark theme color), which means light theme users may briefly see a dark background before the load handler clears it at line 76. The body background styling logic is ineffective.Additional Locations (1)
index.html#L34-L35