-
Notifications
You must be signed in to change notification settings - Fork 33
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
fix: video editor and uploader layout fixes #410
fix: video editor and uploader layout fixes #410
Conversation
Thanks for the pull request, @ArturGaspar! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
7cc28e4
to
6adf4e0
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #410 +/- ##
==========================================
+ Coverage 90.49% 90.53% +0.03%
==========================================
Files 228 227 -1
Lines 4115 4111 -4
Branches 822 826 +4
==========================================
- Hits 3724 3722 -2
+ Misses 370 369 -1
+ Partials 21 20 -1 ☔ View full report in Codecov by Sentry. |
ee907e3
to
b637757
Compare
e376690
to
772a9c9
Compare
Change the video uploader close button to always go back in navigation history, and change the gallery to replace its location with the video uploader's when automatically loading it due to an empty video list, so that when the uploader goes back in the history, it goes to what was before the gallery.
772a9c9
to
f550bf9
Compare
The coverage loss is only a move of uncovered line 24 to line 17. Mocking the VideoUploader component and calling the setLoading argument that VideoUploadEditor passes to it should cover it, but I could not figure out how to mock it. |
position: 'fixed', | ||
top: 0, | ||
left: 0, | ||
right: 0, | ||
height: '100%', |
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.
Using CSS classes seems to be better here https://paragon-openedx.netlify.app/foundations/css-utilities
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.
@farhaanbukhsh There is no CSS class for top: 0, left: 0 or right: 0, and I thought leaving everything under style makes it clearer that this entire part is copied from the styling of the Paragon FullscreenModal.
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.
👍
- ✅ I tested this on devstack and it looks good apart from the one comment I have
- ✅ I read through the code
- ❌ I checked for accessibility issues
- ❌ Includes documentation
- ❌ I made sure any change in configuration variables is reflected in the corresponding client's
configuration-secure
repository.
The Editor component uses the pgn__modal-fullscreen class to be fullscreen, but it is not structured like a Paragon FullscreenModal and the fullscreen positioning style is not applied correctly, particularly in the case where the content is smaller than the body - a vertically centred component will be centred to the content size, not to the screen. Here we directly apply the style that would have applied to the relevant elements of a Paragon FullscreenModal.
f550bf9
to
204a70f
Compare
@navinkarkera Can you kindly add the "jira:2u" label to this PR? cc: @cablaa77 |
@tecoholic is this blended work? |
Hi @openedx/teaching-and-learning - this is ready for review! |
I've created issue TNL-11223 in the private 2U Jira. |
@e0d Yes. This is part of the Video Block UX Improvements work. |
<FormControl | ||
className="m-0" |
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.
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.
@KristinAoki Using the trailingElement fixed this.
<IconButton | ||
className="position-absolute align-self-center text-muted bg-transparent shadow-none" | ||
style={{ marginLeft: '20.25rem' }} | ||
alt={intl.formatMessage(messages.submitButtonAltText)} | ||
src={ArrowForward} | ||
iconAs={Icon} | ||
size="inline" | ||
onClick={(event) => { | ||
event.stopPropagation(); | ||
if (textInputValue.trim() !== '') { | ||
onURLUpload(textInputValue); | ||
} | ||
}} | ||
/> |
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.
Is there a reason you are using IconButton
to create the submit button instead of using the trailingElement
attribute for FormControl
? This would eliminate the extra classes and style configurations. For example see the EditableHeader
component:
<Form.Control
style={{ paddingInlineEnd: 'calc(1rem + 84px)' }} // extra style is because there are two buttons
autoFocus
trailingElement={<EditConfirmationButtons {...{ updateTitle, cancelEdit }} />}
onChange={handleChange}
onKeyDown={handleKeyDown}
placeholder="Title"
ref={inputRef}
value={localTitle}
/>
where EditConfirmationButtons
is
<ButtonGroup>
<IconButtonWithTooltip
tooltipPlacement="left"
tooltipContent={intl.formatMessage(messages.saveTitleEdit)}
src={Check}
iconAs={Icon}
onClick={updateTitle}
/>
<IconButtonWithTooltip
tooltipPlacement="right"
tooltipContent={intl.formatMessage(messages.cancelTitleEdit)}
src={Close}
iconAs={Icon}
onClick={cancelEdit}
/>
</ButtonGroup>
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.
@KristinAoki Done.
Also styles the button so it looks the same on hover/active.
f406f56
to
67a53d0
Compare
@ArturGaspar 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
Good morning @ArturGaspar . I work for the Teaching and Learning team (TNL) at edX and have two questions for you, with context below. The first regards your intentions behind styling decisions you recently merged. The second regards whether you'd like to author a fix, or whether you'd prefer us to. Regarding this PR, we ran into a problem yesterday that called for immediate attention, as partners working on exam problems were blocked by the absence of vertical scroll bars. We reverted these changes yesterday, to restore problem editor functionality, and are now looking to clean up. We'd like to have this problem addressed by the end of tomorrow. What's your preference? Would you like to be the one to fix the bug, or would you prefer us to? We are of course happy to review changes you propose if you choose to author the fix. |
@ArturGaspar Bernard Szabo here, also from TNL, following up on Jesper's comment from yesterday. The |
@jesperhodge Hello. Apologies for the delay in responding. The reason for that decision was that, the component previously used the pgn__modal-fullscreen class, which caused some styilng for the Paragon FullscreenModal to be applied to it. However it did not have the entire inner structure of that modal, which caused the lading spinner to not be vertically centred. I changed those CSS properties as they were what would have been applied to an inner part of a FullscreenModal, and they fixed the spinner vertical alignment. |
@bszabo I see that there were changes to frontend-app-course-authoring as well as to flcc. Is there anything I can still help with? |
@ArturGaspar Hi Artur, we were able to create a fix to this that dealt with the most critical problems. I'd need to test whether the loading spinner is positioned correctly now - that was not our big priority due to the incident urgency. |
Description
Fix video editor/upload layout.
Testing instructions
Layout changes
contentstore.mock_video_uploads
enabled for everyone)new_core_editors.use_new_video_editor
andnew_core_editors.use_video_gallery_flow
enabled for everyone)Video uploader close button
contentstore.mock_video_uploads
enabled for everyone)new_core_editors.use_new_video_editor
andnew_core_editors.use_video_gallery_flow
enabled for everyone)