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

[FC-0059] feat: Add content sidebar in library home #38

Conversation

ChrisChV
Copy link
Member

@ChrisChV ChrisChV commented Jun 6, 2024

Description

This PR adds:

  • Library Sidebar with feature of "squash the page"
  • Add new content sidebar.
  • New button, disabled if the user doesn't have permissions

Supporting information

Testing instructions

from openedx.core.djangoapps.content_libraries.models import ContentLibrary
lib = ContentLibrary.objects.all()[0]
lib.allow_public_read = True
lib.save()

Settings

EDX_PLATFORM_REPOSITORY: https://github.com/open-craft/edx-platform.git
EDX_PLATFORM_VERSION: taxonomy-sandbox-20240614

GROVE_REDIRECTS:
 - domain: {{ LMS_HOST }}
 - domain: cms.{{ LMS_HOST }}
 - domain: app.{{ LMS_HOST }}
 - domain: meilsearch.{{ LMS_HOST }}

PLUGINS:
- mfe
- grove
- s3
- meilisearch

Tutor requirements

git+https://github.com/overhangio/tutor.git@nightly
git+https://github.com/overhangio/tutor-discovery.git@nightly
git+https://github.com/overhangio/tutor-ecommerce.git@nightly
git+https://github.com/overhangio/tutor-xqueue.git@nightly
git+https://github.com/overhangio/tutor-forum.git@nightly
git+https://gitlab.com/opencraft/dev/tutor-contrib-grove.git@main

git+https://github.com/open-craft/tutor-mfe.git@7d1e1e0dad2c0e4247a4fd8280c257f13ed28432
git+https://github.com/open-craft/tutor-contrib-s3.git@04c7491442fa231e79840995f1f8707eed6353fd

yusuf-musleh and others added 30 commits June 3, 2024 15:44
When lib mode is set to "mixed", both "Libraries" and "Legacy Libraries" tabs are show in the Studio Home. When "Libraries" is clicked, v2 libraries are fetched, when "Legacy Libraries" is clicked, v1 libraries are fetched.

When lib mode is set to "v1 only" or "v2 only", only one tab "Libraries" is show and only the respective libraries are fetched when the tab is clicked.
This is to switch between different library modes.
The path updates when selecting tabs, when accessing the url with the path directly it will open its respective tab. Navigating using the browser back/forward buttons is also supported.
This commit is temporary as the current frontend build system in tests doesnt support TS syntax. That should be fixed soon, and this commit should be removed.
This is a temporary commit since there are currently no webpack loaders that support tsx files in the test running. This commit should be removed once that is fixed upstream.
When lib mode is set to "mixed", both "Libraries" and "Legacy Libraries" tabs are show in the Studio Home. When "Libraries" is clicked, v2 libraries are fetched, when "Legacy Libraries" is clicked, v1 libraries are fetched.

When lib mode is set to "v1 only" or "v2 only", only one tab "Libraries" is show and only the respective libraries are fetched when the tab is clicked.
This is to switch between different library modes.
The path updates when selecting tabs, when accessing the url with the path directly it will open its respective tab. Navigating using the browser back/forward buttons is also supported.
This commit is temporary as the current frontend build system in tests doesnt support TS syntax. That should be fixed soon, and this commit should be removed.
This is a temporary commit since there are currently no webpack loaders that support tsx files in the test running. This commit should be removed once that is fixed upstream.
@rpenido rpenido force-pushed the rpenido/fal-3753-library-home-page-bare-bones branch from 18a8482 to 2d3be09 Compare June 20, 2024 02:22
@rpenido rpenido force-pushed the rpenido/fal-3753-library-home-page-bare-bones branch from e3daf6a to 55acb06 Compare June 24, 2024 12:32
@ChrisChV ChrisChV changed the title feat: Add content sidebar in library home [FC-0059] feat: Add content sidebar in library home Jun 26, 2024
Copy link

codecov bot commented Jun 26, 2024

Codecov Report

Attention: Patch coverage is 23.07692% with 10 lines in your changes missing coverage. Please review.

Please upload report for BASE (rpenido/fal-3753-library-home-page-bare-bones@62fe7f5). Learn more about missing BASE report.

Files Patch % Lines
src/generic/toast-context/index.jsx 23.07% 10 Missing ⚠️
Additional details and impacted files
@@                               Coverage Diff                                @@
##             rpenido/fal-3753-library-home-page-bare-bones      #38   +/-   ##
================================================================================
  Coverage                                                 ?   92.58%           
================================================================================
  Files                                                    ?      697           
  Lines                                                    ?    12382           
  Branches                                                 ?     2714           
================================================================================
  Hits                                                     ?    11464           
  Misses                                                   ?      886           
  Partials                                                 ?       32           

☔ 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.

Hi @ChrisChV ! Great work here! Thank you!
I tested and everything is working fine.

I made some comments for small changes.

src/library-authoring/LibraryLayout.tsx Show resolved Hide resolved
src/library-authoring/add-content/messages.ts Outdated Show resolved Hide resolved
src/library-authoring/common/context.tsx Outdated Show resolved Hide resolved
src/library-authoring/LibraryAuthoringPage.tsx Outdated Show resolved Hide resolved
src/library-authoring/add-content/AddContentContainer.tsx Outdated Show resolved Hide resolved
src/library-authoring/library-sidebar/LibrarySidebar.jsx Outdated Show resolved Hide resolved
src/library-authoring/data/apiHook.ts Show resolved Hide resolved
src/library-authoring/index.ts Outdated Show resolved Hide resolved
src/library-authoring/library-sidebar/index.js Outdated Show resolved Hide resolved
src/library-authoring/LibraryAuthoringPage.tsx Outdated Show resolved Hide resolved
@rpenido rpenido force-pushed the rpenido/fal-3753-library-home-page-bare-bones branch from ca33c18 to 6acee0a Compare July 3, 2024 14:27
@ChrisChV ChrisChV closed this Jul 10, 2024
@ChrisChV
Copy link
Member Author

Closed. Follow openedx#1065

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.

4 participants