-
Notifications
You must be signed in to change notification settings - Fork 480
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
Music Play View - part 2 #58293
Music Play View - part 2 #58293
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall! 😍
Couple non blocking comments.
Not approving only because PR is in Draft state
|
||
input[type='range'] { | ||
overflow: hidden; | ||
width: 100%; | ||
height: 4px; | ||
accent-color: $light_gray_200; | ||
accent-color: yellow; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please note: worth checking how it looks like in different browsers, since this won't affect all of the browsers. (when using $light_gray_200 it's just not that visible so to say, but still there's a difference between different browsers)
https://css-tricks.com/styling-cross-browser-compatible-range-inputs-css/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much! I've been noticing the differences so I appreciate the resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, I've duplicated the links in the initial comment. Updated it. added https://www.cssportal.com/style-input-range/ which allows to generate cross-browser styles for input type range more easily
return nil unless @level.uses_lab2? | ||
|
||
# If the user is on the play view '/projects/channel_id', set `response_content`.` | ||
if params[:share] == true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is okay to do this for lab2
labs or should I only do for music lab projects for now? @sanchitmalhotra126
gap: 0.5rem; | ||
gap: 1rem; | ||
|
||
input[type=range] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reference: https://css-tricks.com/styling-cross-browser-compatible-range-inputs-css/
Style range inputs so that styling is consistent across Firefox, Edge, Safari, and Chrome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool stuff!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slick, need this for AI Chat too!
return nil unless @level.uses_lab2? | ||
|
||
# If the user is on the play view '/projects/channel_id', set `response_content`.` | ||
if params[:share] == true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is checked in application.html.haml
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if we should technically use the sharing
value computed on line 374 so that we're consistent with what we pass into level_view_options
. It shouldn't matter for now since we don't do anything special for embedded projects in lab2 currently, but just to be safe? Curious if @breville has thoughts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah - I was wondering about this earlier. Thanks! Will wait on Brendan to weigh in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline - I'll go ahead and update to use sharing
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good overall! A few comments/questions
gap: 0.5rem; | ||
gap: 1rem; | ||
|
||
input[type=range] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool stuff!
return nil unless @level.uses_lab2? | ||
|
||
# If the user is on the play view '/projects/channel_id', set `response_content`.` | ||
if params[:share] == true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if we should technically use the sharing
value computed on line 374 so that we're consistent with what we pass into level_view_options
. It shouldn't matter for now since we don't do anything special for embedded projects in lab2 currently, but just to be safe? Curious if @breville has thoughts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor things but LGTM! Nice work!
This PR updates the Music Lab play view and follows up #58068.
Note that the adhoc based on this branch is available at https://adhoc-alice-play-view-updates-studio.cdn-code.org/home.
Example project in play view.
Updates in this PR include:
MusicPlayView
toMusicLabView
so that whenisShareView
is set totrue
, the play view is rendered.MusicView
, whenisPlayView
is set totrue
, a headlessmusicBlocklyWorkspace
is initialized, i.e., the UI of the blockly workspace is not rendered. Thanks to @sanchitmalhotra126 for pairing with me on this! I based this part of the PR on Sanchit's WIP branch.redirectToView
toprojectsApi
.The 'Share' button in play view is displayed on most mobile devices. But you can view this button if you add the query param '?canShare=true' to the end of the project play view url, e.g., https://adhoc-alice-play-view-updates-studio.cdn-code.org/projects/music/lpef7b3VcqvntTmBLG2c1w?canShare=true
After Update
Play view card on desk top:
Play view full screen on desk top:
Play view on mobile:
Screencast video of play view on desktop:
demo-design.mp4
Links
Testing story
Deployment strategy
Follow-up work
Follow-up will be to refactor the slider and include adding color to progress.
Privacy
Security
Caching
PR Checklist: