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

feat: add library v2 component in course #75

Merged
merged 4 commits into from
Nov 14, 2024

Conversation

navinkarkera
Copy link
Member

@navinkarkera navinkarkera commented Nov 12, 2024

Description

Implements 2a. from openedx#1462

Supporting information

Testing instructions

*You might have to manually increase the height of course unit iframe via developer console. Ref: openedx/edx-platform#35802

@navinkarkera navinkarkera marked this pull request as ready for review November 12, 2024 05:56
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (navin/improve-lib-buttons@f8e00da). Learn more about missing BASE report.

Additional details and impacted files
@@                     Coverage Diff                      @@
##             navin/improve-lib-buttons      #75   +/-   ##
============================================================
  Coverage                             ?   93.01%           
============================================================
  Files                                ?     1048           
  Lines                                ?    20490           
  Branches                             ?     4418           
============================================================
  Hits                                 ?    19059           
  Misses                               ?     1361           
  Partials                             ?       70           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@rpenido rpenido left a comment

Choose a reason for hiding this comment

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

LGTM 👍
Thank you for your work, @navinkarkera!

  • I tested this using the instructions from the PR
  • I read through the code
  • I checked for accessibility issues
  • Includes documentation

Comment on lines +140 to +151
<StandardModal
title="Select component"
isOpen={isAddLibraryContentModalOpen}
onClose={closeAddLibraryContentModal}
isOverflowVisible={false}
size="xl"
>
<ComponentPicker
showOnlyPublished
onComponentSelected={handleLibraryV2Selection}
/>
</StandardModal>
Copy link
Member

Choose a reason for hiding this comment

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

We have the ComponentPickerModal, but I'm fine as you did here.
Maybe we shouldn't need the modal component after all.

Copy link
Member Author

@navinkarkera navinkarkera Nov 13, 2024

Choose a reason for hiding this comment

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

@rpenido Yes, we can use it but then have to modify it to have the same props as the ComponentPicker component in addition to StandardModal props.

Maybe we shouldn't need the modal component after all.

Agreed, it doesn't seem to be doing much except for wrapping component picker in a modal component.

Update: Removed: f32ae3e

Replace with standard modal and component picker components.
@navinkarkera navinkarkera force-pushed the navin/v2-library-content branch from 6c489d1 to f32ae3e Compare November 13, 2024 05:03
@navinkarkera navinkarkera merged commit b6ee727 into navin/improve-lib-buttons Nov 14, 2024
6 checks passed
navinkarkera added a commit that referenced this pull request Nov 14, 2024
* feat: add library v2 component in course

* test: add test for lib v2 component

* test: fix failing tests

* refactor: remove ComponentPickerModal component

Replace with standard modal and component picker components.
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.

2 participants