Skip to content

Siva- Creating front-end for activity/description#4434

Merged
one-community merged 20 commits intodevelopmentfrom
siva/activity-agenda-dynamic-routing
Apr 12, 2026
Merged

Siva- Creating front-end for activity/description#4434
one-community merged 20 commits intodevelopmentfrom
siva/activity-agenda-dynamic-routing

Conversation

@pavanputti
Copy link
Copy Markdown
Contributor

@pavanputti pavanputti commented Nov 21, 2025

Description

Screenshot 2026-01-31 at 11 18 16 PM

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:

  • Delete file A for removing unused components …
  • Update file B for including new pattern …
  • Create file C for introducing new components …

How to test:

  1. Check out the current branch.
  2. Run npm install and npm run start:local (or npm start) to run this PR locally.
  3. Clear site data/cache.
  4. Log in as an admin user.
  5. Go to Community Portal → Activity (or open http://localhost:5173/communityportal/activity/ with an event ID from GET /api/events).
  6. Confirm the Activity Agenda / summary page loads and shows event title, date, type, location, status, attendance, description, and schedule (and that loading/error states do not show “Something went wrong”).

Screenshots or videos of changes:

Screenshot 2026-01-31 at 11 16 51 PM

- 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
- 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
@pavanputti pavanputti added DO NOT MERGE Don't merge PR do not review Do not review or look at code without full context labels Nov 21, 2025
@netlify
Copy link
Copy Markdown

netlify bot commented Nov 21, 2025

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit e661f69
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/69dabedab9842a0008e5d5bb
😎 Deploy Preview https://deploy-preview-4434--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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
@pavanputti pavanputti added Medium Priority and removed DO NOT MERGE Don't merge PR do not review Do not review or look at code without full context labels Feb 1, 2026
Resolves ReferenceError 'getPageClassName is not defined' when loading or showing no-data state.
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Feb 1, 2026

@pavanputti pavanputti changed the title Siva/activity agenda dynamic routing Siva/Creating front-end for activity/description Feb 1, 2026
@pavanputti pavanputti changed the title Siva/Creating front-end for activity/description Siva- Creating front-end for activity/description Feb 1, 2026
@one-community one-community added High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible and removed Medium Priority labels Mar 8, 2026
Copy link
Copy Markdown

@HemanthNidamanuru HemanthNidamanuru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Image Image

Copy link
Copy Markdown

@Anusha-Gali Anusha-Gali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Image Image Image

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.
Copy link
Copy Markdown

@rohanrastogi311 rohanrastogi311 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Siva,

Well done with this implementation.

Image

Anusha-Gali
Anusha-Gali previously approved these changes Mar 17, 2026
Copy link
Copy Markdown

@Anusha-Gali Anusha-Gali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Siva,

Thanks for fixing the issue. The UI is as per requirement.

Image Image

…agenda-dynamic-routing

# Conflicts:
#	src/routes.jsx
@pavanputti pavanputti dismissed stale reviews from Anusha-Gali and rohanrastogi311 via e661f69 April 11, 2026 21:36
@sonarqubecloud
Copy link
Copy Markdown

@one-community
Copy link
Copy Markdown
Member

Thank you all, merging!

@one-community one-community merged commit 06d5261 into development Apr 12, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants