-
Notifications
You must be signed in to change notification settings - Fork 80
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 "Recently Modified" library section [FC-0059] #1151
feat: Add "Recently Modified" library section [FC-0059] #1151
Conversation
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.
…753-library-home-page-bare-bones
Type 'ReactElement<any, string | JSXElementConstructor<any>>' is not assignable to type 'ComponentType<{}> | undefined'.
Thanks for the pull request, @yusuf-musleh! What's next?Please work through the following steps to get your changes ready for engineering review: 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. 🔘 Update the status of your PRYour PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate. 🔘 Let us know that your PR is ready for review:Who will review my changes?This repository is currently maintained by Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:
When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
7e5bf28
to
d15231d
Compare
using a re-usable custom hook. Also fixed type/lint errors/console warnings.
…nto jill/FAL-3758-sort-components
The "View All" action appears on sections that pass in a view all action and contain content that exceeds the defined preview limit, which defaults to 4.
d15231d
to
a16c5c2
Compare
Tests should pass after this fix is added upstream. |
fixes failing test
on the LibraryAuthoringPage.
…-home-recently-modified
Co-authored-by: Rômulo Penido <[email protected]>
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.
👍 Works and looks great @yusuf-musleh !
One nit, and there's 2 failing tests, but this is good to go once they're fixed.
- I tested this using my tutor dev stack and the PR test instructions
- I read through the code on feat: Add "Recently Modified" library section (TEMP) open-craft/frontend-app-authoring#52
- I checked for accessibility issues by using my keyboard to navigate
- Includes documentation
- User-facing strings are extracted for translation
…' into yusuf-musleh/lib-v2-home-recently-modified
Merged this branch into WIP #1147, so will get this merged upstream as part of that. |
@yusuf-musleh Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future. |
Description
This PR adds the "Recently Modified" section in the Library Home Page along with the "View All" button that appears in other sections if there is more content than what is previewed.
Recently Modified Section
This section shows the most recently modified/created 4 or less library components. If there are no components yet in the library the section will not appear on the page. This section will always show those components regardless of whatever search terms or filters have been applied.
View All button
The "View All" button appears on all sections in the library page (excluding the "Recently Modified" section) when the number of content in the section exceeds what is being previewed (currently that limit is 4). Clicking on the "View All" button should navigate to the sections Tab to view all the content, while maintaining any search terms/filters/sorting applied.
Supporting information
Related Tickets:
Testing instructions
./manage.py cms reindex_studio --experimental
in the cms container to update the search indexes with latest dataPrivate-ref: FAL-3759