Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add announcement.json ability for learn page #54935

Merged
merged 3 commits into from
Nov 15, 2023

Conversation

juanmanzojr
Copy link
Contributor

Makes the banners for the /courses page generate from announcements.json. Courses.jsx now makes use of the MarketingAnnouncementBanner component in order to use the new specialAnnouncement prop which represents the banner retrieved from announcements.json.

Correct Banner is retrieved and MarketingAnnouncementBanner component is being used.

Screenshot 2023-11-14 at 4 02 21 PM

Links

Testing story

Local

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@juanmanzojr juanmanzojr changed the title Courses page uses MarketingAnnouncementBanner Add announcement.json ability for learn page Nov 15, 2023
@juanmanzojr juanmanzojr marked this pull request as ready for review November 15, 2023 17:53
@juanmanzojr juanmanzojr requested a review from a team November 15, 2023 17:53
Copy link
Contributor

@TurnerRiley TurnerRiley left a comment

Choose a reason for hiding this comment

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

Nice job with this refactor! Just had a quick question

@@ -34,6 +34,7 @@ def index
@is_english = request.language == 'en'
@is_signed_out = current_user.nil?
@force_race_interstitial = params[:forceRaceInterstitial]
@courses_announcement = Announcements.get_localized_announcement_for_page("/courses")
Copy link
Contributor

Choose a reason for hiding this comment

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

Just for my understanding, where is this specific banner getting assigned to the /courses page so this returns the correct one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the get_localized_announcement_for_page method makes use of the announcements.json which is where the correct banner is assigned for /courses page

@juanmanzojr juanmanzojr merged commit 66fb770 into staging Nov 15, 2023
2 checks passed
@juanmanzojr juanmanzojr deleted the add-announcement-ability-learn-page branch November 15, 2023 20:49
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.

None yet

2 participants