buildDotMoi
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v19View latest version
This branch implements the feature to make custom tabs behave like the "Posts" tab, allowing vals in custom tabs to be viewed in the swipe viewer.
-
ValGrid Component:
- Updated to support swipe viewer for both "Posts" tab and any custom tabs
- Added logic to only exclude "code" tab from swipe viewer functionality
-
ValGridItem Component:
- Modified to handle link URLs differently based on tab types
- Added special handling for code tab items to always link directly to Val Town
- Improved UI indicators to show when swipe view is available
-
Project Refactoring:
- Created a new
ProfileTabs.tsxcomponent to extract tab navigation and content functionality - Split UserProfile.tsx code into smaller, more maintainable components
- Added proper tab switching functionality within components
- Created a new
Custom tabs now have the same behavior as the "Posts" tab:
- When clicking on a val in a custom tab, if it has a proper URL (from moiConfig or httpEndpoint), it will open in the swipe viewer
- Users can swipe through all vals in that custom tab
- This maintains the existing behavior of the "code" tab, which still links directly to Val Town
- Verify that custom tabs show the swipe viewer when clicking on vals
- Confirm that swipe navigation works within custom tabs
- Check that the "code" tab still links directly to Val Town pages
- Test that "View All Code" button works correctly when a custom tab has no content