Bug #3070
live India EV News Widget into the Partner CRM Dashboard.
Added by Shreya Agarwal about 2 months ago. Updated about 2 months ago.
Description
Integrate an automated, live India EV News Widget into the Partner CRM Dashboard.
Updated by Saransh Bakoliya about 2 months ago
Local Data Source Creation (Phase 1):
Established
public/data/ev-news.json
for static client-side consumption without requiring backend DB or API modifications.
Strongly Typed Service Layer (Phase 1):
Implemented
src/services/evNewsService.ts
containing the EVNewsItem interface and async getEVNews() fetch function.
Isolated & Non-Destructive Phase 1:
Verified that data source and service layer additions caused zero side effects on existing routing, authentication, permissions, or calculations.
EV News Dashboard Widget (Phase 2):
Developed
src/components/dashboard/EVNewsWidget.tsx
aligned with Material-UI (@mui/material) design tokens and framer-motion entrance animations.
Headline Display & Secure Outbound Links (Phase 2):
Designed news card items displaying headline titles, source tags, formatted dates (e.g., Sep 7, 2026), and secure external tab links (target="_blank" rel="noopener noreferrer").
Component Resilience & Error Boundaries (Phase 2):
Built state handling for loading skeletons (Loading EV news...), empty states (No EV news available.), and soft error alerts (Unable to load EV news.) to isolate failures from the main dashboard.
Partner-Exclusive Dashboard Integration (Phase 3):
Updated
src/pages/Dashboard.tsx
to import EVNewsWidget and conditionally render it in the primary dashboard grid flow.
Reused Pre-existing RBAC Logic (Phase 3):
Integrated using the existing isPartner context variable ({isPartner && <EVNewsWidget />}), guaranteeing that non-Partner roles (Company Admin, Tenant Admin, Reseller, Customer, etc.) do not render the widget.
Automated RSS Fetcher Script (Phase 4):
Created
scripts/update-ev-news.js
to automatically pull, parse XML, filter, deduplicate, and sort live news.
Commercial Licensing & Compliance Evaluation (Phase 4):
Conducted RSS copyright audit; enabled public syndication index feeds (Google News EV & EV Charging India) while marking restricted feeds (ET Auto, Autocar India, Financial Express) as disabled to comply with terms.
Fail-Safe Data Retention (Phase 4):
Added fallback protection in the updater script so that if network or RSS feeds fail, existing ev-news.json data is retained rather than overwritten with an empty array.
Automated GitHub Actions CI/CD Workflow (Phase 4):
Configured
.github/workflows/update-ev-news.yml
on a 6-hour cron schedule (0 */6 * * *) and workflow_dispatch to push JSON updates back to the repository.
Local Testing & Build Validation:
Validated all additions with npm run update-news, TypeScript type checks (npx tsc --noEmit), and git diff audits—confirming 100% clean compilation with zero type errors.
Updated by Shreya Agarwal about 2 months ago
Today, built and integrated a brand new Live EV News & Industry Updates feature at the very bottom of the Partner CRM Dashboard (/partnerships/partnership-dashboard). I created an RSS aggregation service (evNewsService.ts) that fetches live news feeds from top Indian automotive and business portals—including The Economic Times, Moneycontrol, Autocar India, LiveMint, and EVReporter—automatically standardizing publisher tags and sorting articles newest-first by publication timestamp. On the main dashboard, a sleek widget renders 5 single-line clickable taglines with publisher badges and relative time labels. Clicking any headline or the "View All News" action opens a responsive 80% screen-width side drawer , allowing partners to read full article summaries, view hero images, and access direct article links without leaving the CRM. Furthermore, I integrated an interactive refresh control with an inline progress loader and dynamic feedback alerts—displaying a green success notification ("Latest EV news feeds updated successfully!") when new articles arrive, and a blue info notification ("You already have the latest EV news updates!") when articles are already current
also continue learning
Updated by Saransh Bakoliya about 2 months ago
Worked on integrating the EV News feature into the Partner Dashboard.
Evaluated multiple approaches for fetching EV news automatically without manual updates.
Reviewed and moved away from the GitHub Actions + local JSON news-update approach.
Evaluated GDELT API as a frontend-only news source and reviewed its limitations.
Researched alternative news APIs suitable for India-focused EV news.
Selected NewsData.io as the preferred API for the EV News integration.
Prepared the integration approach to fetch India-specific EV and electric mobility news.
Configured the frontend to use the NewsData API key through environment variables instead of hardcoding credentials.
Investigated the “Unable to load EV news” issue shown on the Partner Dashboard and identified API configuration/response validation as the next debugging point.
Verified the existing EV News UI and Partner-only visibility flow, keeping the dashboard structure and existing UI behavior unchanged.
Updated by Shreya Agarwal about 2 months ago
Today, successfully refined the automated live India EV News feature on the Partner CRM Dashboard (/partnerships/partnership-dashboard), ensuring it strictly renders for UserRole.PARTNER logins while remaining hidden for all non-partner roles. implemented dynamic branding styles where the outer widget box displays a subtle light grey border (#e2e8f0) by default and smoothly transitions to a Solid Primary Blue border on mouse hover, matching existing project card patterns. In EvNewsDrawer.tsx, the reader navigation controls (< Previous Story and Next Story >) were updated to use dynamic primary theme colors with smooth hover highlights. A generic, 100% dynamic HTML entity decoder (decodeHtmlEntities / cleanText) was integrated across both EvNewsService and frontend components to cleanly render publisher names and titles (e.g., Vajiram & Ravi) without any hardcoded strings. The widget features a 7-second continuous horizontal carousel with mouse hover pause, a 5-minute silent background live polling interval, and a corner refresh button with dynamic success/info alert banners. The data pipeline operates as a 100% pure React client-side architecture fetching 24-48h India EV Google News RSS feeds, using OpenGraph image extraction and 15-minute localStorage caching (crm_ev_news_cache_v8).
Updated by Shreya Agarwal about 2 months ago
TESTING OF automated live India EV News feature on the Partner CRM Dashboard (/partnerships/partnership-dashboard)
Also focused on continuous learning and revising React.js concept Also reviewed the existing project structure and application flow to strengthen my understanding of the implementation.
Updated by Yashaditya Singh about 2 months ago
Successfully finalized the EV News Widget and Drawer UI overhaul, delivering a premium, MSN-style experience while keeping the original data logic intact. We resolved image distortion and incorrect thumbnail rendering by implementing a smart filter that blocks junk assets like favicons and tracking pixels, automatically upgrading valid images to high-definition. To prevent stretching, we integrated a dual-layer acrylic blur backdrop that fills containers seamlessly while keeping the foreground image crisp. Finally, we polished the drawer navigation by restoring the Previous Story button and streamlining the Read Full Article call-to-action.