Skip to content

Conversation

@Archi44444
Copy link
Contributor

This pull request refactors the modal functionality on new&popular.html to use a centralized contentData array for all content metadata, rather than hardcoded description objects or scattered static strings.

Changes made:
Introduced a single contentData array containing all relevant info (title, description, image URL, genres, cast, director, rating, release date, duration) for each content card.
Refactored the openModal function to dynamically populate modal elements based on the clicked title using this array, making the modal more scalable and maintainable.
Removed the old static object mapping titles to descriptions, reducing code duplication.
Ensured proper filling of all modal fields: title, description, hero image, genre tags, and all rows of metadata.
All other interactivity (modal close, notify/remind button toggles, carousel drag, reveal animations) remain unaffected and fully functional.

Why:
Scalability: New titles/content can now be added to the modal by simply updating the contentData array, with no JS or HTML structure changes required.
Maintainability: Centralizing all metadata reduces mistakes, improves reviewability, and separates data from markup/presentation logic.
Best practices: This approach prepares the project for future features and additional content without repetitively editing multiple files or functions.

No impact on existing feature tabs, navigation, or styles—this pull request is self-contained to the modal improvement for the New & Popular page.

…eractivity

- Replaced static descriptions object with a centralized contentData array holding all modal info.
- Updated openModal to populate modal fields dynamically from contentData.
- This change makes the New & Popular modal scalable, maintainable, and future-proof.
@vercel
Copy link

vercel bot commented Oct 22, 2025

@Archi44444 is attempting to deploy a commit to the sampaddass16-9222's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant