Siva- Creating front-end for activity/description#4434
Siva- Creating front-end for activity/description#4434one-community merged 20 commits intodevelopmentfrom
Conversation
- Changed route from /communityportal/ActivityAgenda to /communityportal/activity/:activityid - Enables dynamic routing based on activity ID - Fixes 'Page Not Found' issue when accessing activity details
…rameter" This reverts commit 3231509.
- Changed route from /communityportal/ActivityAgenda to /communityportal/activity/:activityid - Enables dynamic routing based on activity ID - Fixes 'Page Not Found' issue when accessing activity details - Route now accepts activityid as URL parameter
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
- Added useParams import from react-router-dom - Extract activityid parameter from URL route - Added validation and error handling for missing activityId - Component now receives activityId from URL parameter - Prepared component for dynamic data fetching in next commit
- Added EVENT_BY_ID endpoint to URL.js for fetching single event - Implemented useState hooks for eventData, loading, and error states - Added useEffect to fetch event data when component mounts or activityid changes - Implemented fallback logic: tries EVENT_BY_ID endpoint first, falls back to fetching all events and filtering by ID - Added data transformation to map event model fields to component structure - Implemented loading, error, and no-data states with user-friendly messages - Added proper error handling and validation for API responses
- Enhanced data transformation with better date/time formatting helpers - Added event metadata display (date, type, location, status, attendance) - Improved schedule display with better formatting and resource location - Added image error handling with fallback to default image - Enhanced UI structure with organized sections for metadata, description, and schedule - Improved styling with conditional dark mode support for metadata sections - Better handling of missing or incomplete event data - Added formatted date display with full date string - Enhanced schedule items with background styling and better layout
- Enhanced error handling with specific messages for different error types (404, network, server, permission errors) - Added validation for activity ID (empty string check) - Improved date/time formatting with NaN validation to prevent invalid date displays - Enhanced schedule building with null/undefined resource filtering - Added type checking for numeric values (maxAttendees, currentAttendees) - Improved fallback API call error handling with network error detection - Better event data validation (object type check) - Enhanced error messages for better user experience - Fixed date display logic to handle null dates properly - Added array validation for schedule and resources data
…er functions to reduce fetchEventData complexity from 31 to ≤15 - Extract render functions to reduce ActivityAgenda complexity from 17 to ≤15
…urcesUsage import and ActivityAgenda route from both branches
- Fix dark mode by using CSS module classes (activityAgendaPage, activityAgendaDarkMode) for wrapper so theme variables apply - Move metadata, description, and schedule inline styles into ActivityAgenda.module.css - Add activityMetadata, metaRow, sectionHeading, descriptionBlock, scheduleItem classes with dark mode variants - Ensure section headings use var(--heading-color); schedule items use theme-aware backgrounds - Code cleanup: remove getPageClassName helper in favor of pageClassName; satisfy ESLint line length
Resolves ReferenceError 'getPageClassName is not defined' when loading or showing no-data state.
…agenda-dynamic-routing
|
HemanthNidamanuru
left a comment
There was a problem hiding this comment.
Hi,
I tested this PR locally and the Activity Agenda page loads correctly. The event title, date, type, location, status, attendance, description, and schedule are all displayed as expected, and I did not see any error messages.
I noticed some misalignment in the elements on the page. Is the alignment also part of this PR?
There was a problem hiding this comment.
Hi Siva,
I have reviewed your PR locally and although it works as per requirement for the very first project id in both the modes, in all the other projects the image size is very large and is messing up the alignment of the text fields.
Hi @Anusha-Gali ,
Thanks for pointing this out. I’ll fix the image sizing for the other project IDs so it doesn’t affect the text alignment. I’ll update it in PR #4434: #4434
. Thanks!
- Constrain image column (max-width 380px) and image (max-height 320px, object-fit cover) - Add flex gap and align-items for consistent layout across events - Prevent large cover images from breaking text alignment in light/dark mode - Responsive: image max-height 280px on mobile, content full width
…ate literals - routes.jsx: Remove unused PRDashboardOverview, PRDashboardPromotionEligibility, PRDashboardTopReviewedPRs, PRDashboardDetails imports; remove commented PurchaseEquipment code - URL.js: Refactor TOP_CONVERTED and LEAST_CONVERTED to avoid nested template literals
…URL.js conflict Keep SonarQube-refactored TOP_CONVERTED/LEAST_CONVERTED (no nested template literals).
PRDashboardOverview, PRDashboardPromotionEligibility, PRDashboardTopReviewedPRs, and PRDashboardDetails components do not exist; use existing PRDashboard for /pr-dashboard/overview, promotion-eligibility, top-reviewed-prs, and details routes.
…agenda-dynamic-routing # Conflicts: # src/routes.jsx
e661f69
|
|
Thank you all, merging! |






Description
Related PRS (if any):
This frontend PR is related to the development backend PR. To test this frontend PR, you need to checkout the development backend PR.
…
Main changes explained:
…
How to test:
Screenshots or videos of changes: