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 embedded projects section to code.org/music #58352

Merged
merged 3 commits into from
May 6, 2024

Conversation

kelbyhawn
Copy link
Contributor

@kelbyhawn kelbyhawn commented May 1, 2024

Adds the embedded student projects section to https://code.org/music

  • Depends on an iframe coming from the student learning team (see related PR below)
  • Fully responsive and works with LTR and RTL languages
    • I can adjust the styles of the iframe if needed once we see the final version

Related PR:

Jira ticket: ACQ-1839


localhost code org_3000_music

Responsive

Responsive.mov

RTL

RTL

@@ -225,7 +225,7 @@ div.divider {
// Add a thick box shadow to an element
// See code.org/teach for an example
.box-shadow-primary {
box-shadow: 8px 8px 0 var(--brand_primary_light);
box-shadow: 8px 8px 0 rgba(171, 223, 229, 0.50);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lightened this up a bit to match the Figma.

@@ -3,9 +3,6 @@ title: Music Lab
theme: responsive_full_width
---

- button_url = CDO.studio_url("/s/music-intro-2024")
- button_string = hoc_s("music_lab.button.try_music_lab")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bethanyaconnor I ended up removing these because they don't work across views 😅

list_item = [hoc_s("music_lab.student_projects.list_create"), hoc_s("music_lab.student_projects.list_artist"), hoc_s("music_lab.student_projects.list_share")]

.grid-container.gap-2
%iframe.rounded-corners.box-shadow-primary{width: "100%", height: 300, src: CDO.studio_url("/musiclab/embed?channels=#{request.params['channels']}&library=#{request.params['library']}", CDO.default_scheme)}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@breville here's where this is embedded — it's not showing up for me locally (see screenshots) so let me know if I need to replace anything!

Copy link
Member

Choose a reason for hiding this comment

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

hi Kelby, the channel IDs are environment-specific, so if you are testing locally, it means you need to create a new music project locally first. Given that this page will be unlinked for a while, I think we can go ahead and test this out on production when it makes it to there.

Copy link
Member

@breville breville May 3, 2024

Choose a reason for hiding this comment

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

optional: you could probably also extract the src string into a Ruby variable like you have for list_item.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok cool! 🙌

And what's the reasoning for extracting the src string? Does it have a functional benefit or just makes the code cleaner?

@kelbyhawn kelbyhawn requested review from a team and breville May 1, 2024 19:35
- icon_check = "fa-solid fa-check-circle"

:ruby
list_item = [hoc_s("music_lab.student_projects.list_create"), hoc_s("music_lab.student_projects.list_artist"), hoc_s("music_lab.student_projects.list_share")]
Copy link
Member

Choose a reason for hiding this comment

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

nit: list_items?

@kelbyhawn kelbyhawn merged commit 34849ed into staging May 6, 2024
2 checks passed
@kelbyhawn kelbyhawn deleted the music-lab-page-add-projects-embed branch May 6, 2024 15:39
@@ -18,8 +15,8 @@ theme: responsive_full_width
=hoc_s("music_lab.banner.heading")
%p.body-one.white
=hoc_s("music_lab.banner.desc")
%a.link-button.white{href: button_url}
=button_string
%a.link-button.white{href: CDO.studio_url("/s/music-intro-2024")}
Copy link
Member

Choose a reason for hiding this comment

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

@kelbyhawn Just remembered that I think these script start URLs should have a /reset at the end of them. Presumably this resets progress for a signed-out user in a shared computer setting.

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

3 participants