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 "Recently Modified" library section [FC-0059] #1151

Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
4191ecb
feat: Add lib v2/legacy tabs in studio home
yusuf-musleh May 27, 2024
15c678b
feat: Add `LIBRARY_MODE` config variable
yusuf-musleh May 28, 2024
14b8b3a
feat: Add url paths/navigation for each tab
yusuf-musleh May 28, 2024
515cc71
feat: LibraryV2 redirect to lib mfe or placeholder
yusuf-musleh May 30, 2024
9c6e1e6
feat: Add pagination support for lib v2s
yusuf-musleh May 30, 2024
da189c1
fix: Redirect to placeholder create lib in v2/mixed disabled mfe
yusuf-musleh Jun 3, 2024
85d9ff2
temp: This removes TS code to get tests to run
yusuf-musleh Jun 3, 2024
c6b7bf8
test: Update existing tests to support changes
yusuf-musleh Jun 3, 2024
14933d2
temp: Rename .tsx -> .jsx & .ts -> .js for tests
yusuf-musleh Jun 3, 2024
8b96268
fix: Fix lint issues
yusuf-musleh Jun 3, 2024
f8db853
feat: library home page bare bones
rpenido Jun 4, 2024
7a8488d
test: Add tests for new functionality
yusuf-musleh Jun 4, 2024
7842ce0
fix: update search modal for new library urls
rpenido Jun 5, 2024
462cda9
feat: Add lib v2/legacy tabs in studio home
yusuf-musleh May 27, 2024
be8b2f4
feat: Add `LIBRARY_MODE` config variable
yusuf-musleh May 28, 2024
27b2581
feat: Add url paths/navigation for each tab
yusuf-musleh May 28, 2024
4ffd651
feat: LibraryV2 redirect to lib mfe or placeholder
yusuf-musleh May 30, 2024
7f97243
feat: Add pagination support for lib v2s
yusuf-musleh May 30, 2024
c86b85a
fix: Redirect to placeholder create lib in v2/mixed disabled mfe
yusuf-musleh Jun 3, 2024
efbc625
temp: This removes TS code to get tests to run
yusuf-musleh Jun 3, 2024
21da6f8
test: Update existing tests to support changes
yusuf-musleh Jun 3, 2024
79e6516
temp: Rename .tsx -> .jsx & .ts -> .js for tests
yusuf-musleh Jun 3, 2024
262cb3f
fix: Fix lint issues
yusuf-musleh Jun 3, 2024
1ea229f
test: Add tests for new functionality
yusuf-musleh Jun 4, 2024
a0a30b7
refactor: Change /legacy-libraries -> /libraries-v1
yusuf-musleh Jun 6, 2024
4deaea9
fix: add i18n messages
rpenido Jun 6, 2024
c2bdecf
fix: libraryAuthoring enabled check
rpenido Jun 6, 2024
5213eff
Merge branch 'yusuf-musleh/lib-v2-tab-studio-home' into rpenido/fal-3…
rpenido Jun 6, 2024
a24b3ba
fix: add Create Library placeholder
rpenido Jun 6, 2024
2859741
refactor: Remove hardcoded mfe path
yusuf-musleh Jun 6, 2024
d853f29
refactor: rename .ts files to .js
rpenido Jun 6, 2024
567dcb4
feat: Add function to construct Lib Auth MFE URL
yusuf-musleh Jun 6, 2024
094086e
feat: Make URL /library-v1 when referencing legacy
yusuf-musleh Jun 6, 2024
a95c990
fix: Add missing part of path
yusuf-musleh Jun 6, 2024
e3ebc55
fix: type and lint errors
rpenido Jun 6, 2024
8ed168d
fix: Issue with destinationUrl
yusuf-musleh Jun 6, 2024
beda37f
test: Add checks for Tab.eventKey in tests
yusuf-musleh Jun 6, 2024
2e3fa43
fix: Revert card item url changes to keep simple
yusuf-musleh Jun 7, 2024
72edfac
fix: add tests
rpenido Jun 7, 2024
8086ebf
Merge branch 'yusuf-musleh/lib-v2-tab-studio-home' into rpenido/fal-3…
rpenido Jun 7, 2024
91443e9
fix: removing unused file
rpenido Jun 7, 2024
a29cf7e
fix: add ts-check
rpenido Jun 7, 2024
4deab76
fix: removing deleted file references
rpenido Jun 7, 2024
e8bca34
chore: trigger CI
rpenido Jun 7, 2024
0078c0e
feat: Initial structure of ComponentCard
ChrisChV Jun 13, 2024
388c40e
fix: fixes from review
rpenido Jun 13, 2024
7d6096e
fix: fix default parameter syntax
rpenido Jun 14, 2024
19b2935
feat: Connect TagCount, Colors and Icons with library components card
ChrisChV Jun 17, 2024
c87c481
feat: Infinite scroll implemented on Components tab
ChrisChV Jun 18, 2024
c63bc2f
fix: new library redirect
rpenido Jun 18, 2024
efe0bed
Revert "fix: new library redirect"
rpenido Jun 19, 2024
942cbff
chore: trigger CI
rpenido Jun 19, 2024
7560fa2
style: Style nits on card component
ChrisChV Jun 19, 2024
2d3be09
fix: new library redirect
rpenido Jun 20, 2024
e8f9f78
fix: remove warning on library home
rpenido Jun 20, 2024
f9920f4
fix: remove unused import
rpenido Jun 20, 2024
7fd6c27
Merge branch 'master' into rpenido/fal-3753-library-home-page-bare-bones
rpenido Jun 20, 2024
94f483b
fix: merging nits
rpenido Jun 20, 2024
b455f97
fix: change version to slug in header
rpenido Jun 20, 2024
3ae6fe8
fix: header outline link for libraries
rpenido Jun 20, 2024
bd12510
style: Add fetchNextPage to infinite scroll useEffect
ChrisChV Jun 20, 2024
d611d29
feat: Variant added to LibraryComponents to show full components or a…
ChrisChV Jun 20, 2024
499aced
style: Nits on lints and code
ChrisChV Jun 20, 2024
da1c2e0
refactor: Create block-type-utils with block type constants
ChrisChV Jun 20, 2024
c8bc5fc
fix: Issues on course-unit tests
ChrisChV Jun 21, 2024
0843a1e
refactor: Calculate tagCount in LibraryComponents instead on serach i…
ChrisChV Jun 21, 2024
e972fb0
Merge branch 'master' into rpenido/fal-3753-library-home-page-bare-bones
rpenido Jun 21, 2024
55acb06
refactor: test renaming to ts
rpenido Jun 21, 2024
a1a0ad8
refactor: renaming files js -> ts
rpenido Jun 24, 2024
87358b7
fix: update typescript code
rpenido Jun 24, 2024
0b4e90e
Merge branch 'master' into rpenido/fal-3753-library-home-page-bare-bones
rpenido Jun 24, 2024
5687b76
test: Added for LibraryComponents
ChrisChV Jun 24, 2024
51d36ce
fix: remove @ts-check
rpenido Jun 25, 2024
fbd418d
fix: remove unused file
rpenido Jun 25, 2024
af011f4
feat: use search manager
rpenido Jun 25, 2024
5c0fadb
refactor: cleanup code
rpenido Jun 25, 2024
3a67927
fix: more cleanup
rpenido Jun 25, 2024
8d9b86b
chore: Fix merge conflicts
ChrisChV Jun 26, 2024
b4374e9
feat: Adjust library home filter styles
yusuf-musleh Jun 26, 2024
01cd595
Merge branch 'master' into rpenido/fal-3764-library-home-filter-by-co…
rpenido Jun 28, 2024
bd3d2c5
fix: remove LibraryV2Placeholder
rpenido Jun 28, 2024
dee7c0b
Merge branch 'master' into rpenido/fal-3753-library-home-page-bare-bones
rpenido Jun 30, 2024
2a5d42b
fix: optional parameters
rpenido Jun 30, 2024
62fe7f5
chore: trigger CI
rpenido Jun 30, 2024
31012df
refactor: Migrate block-type-utils to TS
ChrisChV Jul 1, 2024
1534b61
chore: Fix merge conflicts
ChrisChV Jul 1, 2024
42f2666
test: Fixt LibraryAuthoringPage test
ChrisChV Jul 1, 2024
1af4fbe
Merge branch 'chris/FAL-3757-components-tab' into rpenido/fal-3764-li…
rpenido Jul 2, 2024
99b9b31
feat: fixing merge issues and tests
rpenido Jul 2, 2024
f902335
refactor: create search-manager feature
rpenido Jul 2, 2024
e485ab3
test: fix search-modal locator
rpenido Jul 2, 2024
3cc07ae
Merge branch 'yusuf-musleh/library-home-filters-styling' into rpenido…
rpenido Jul 3, 2024
1bf2708
fix: fix scss files location
rpenido Jul 3, 2024
6aa1b0c
refactor: moving Stats
rpenido Jul 3, 2024
782386f
fix: remove Stats from library home
rpenido Jul 3, 2024
dfd3190
fix: remove loading state if already data is already loaded to avoid …
rpenido Jul 3, 2024
6acee0a
feat: library home page bare bones
rpenido Jul 3, 2024
3400f71
feat: Add clear filter btn to filter widget
yusuf-musleh Jul 3, 2024
7515975
refactor: migrate Header to ts and fix some types
rpenido Jul 3, 2024
c453ef0
fix: add intl to tab names
rpenido Jul 5, 2024
1718c26
fix: remove bottom border to align label with checkbox
rpenido Jul 5, 2024
905dbb5
fix: add intl to tab names
rpenido Jul 5, 2024
fc84f7f
Merge branch 'rpenido/fal-3753-library-home-page-bare-bones' into rpe…
rpenido Jul 9, 2024
d203659
Merge branch 'master' into rpenido/fal-3764-library-home-filter-by-co…
rpenido Jul 9, 2024
8f0971e
fix: removing unused file
rpenido Jul 9, 2024
2ec5a6f
fix: removing unused file
rpenido Jul 9, 2024
e28ef16
feat: adds sort widget to search manager and library component page
pomegranited Jul 9, 2024
9cd428e
fix: type error
pomegranited Jul 10, 2024
2ed545d
fix: move block type intl
rpenido Jul 10, 2024
b440b92
feat: store selected sort option in query string
pomegranited Jul 10, 2024
a10ff79
fix: better way to store sort params in query string
pomegranited Jul 11, 2024
8582f08
Merge branch 'rpenido/fal-3764-library-home-filter-by-content-type' i…
pomegranited Jul 11, 2024
aa1d6dd
feat: Add Recently Modified library section
yusuf-musleh Jul 10, 2024
da1617f
feat: Add "View All" to library sections
yusuf-musleh Jul 11, 2024
0baef3f
feat: Use intl library section titles
yusuf-musleh Jul 11, 2024
a16c5c2
test: Update tests
yusuf-musleh Jul 11, 2024
e96194c
fix: navigate to url + params
pomegranited Jul 12, 2024
34c4b4e
test: adds tests for the SearchSortWidget
pomegranited Jul 12, 2024
60fc5e7
Merge branch 'jill/FAL-3758-sort-components' into yusuf-musleh/lib-v2…
pomegranited Jul 12, 2024
de713db
fix: stringify enumValue to compare with string
pomegranited Jul 19, 2024
187ec8f
fix: minor code nit
pomegranited Jul 20, 2024
b1950e9
Merge remote-tracking branch 'opencraft/jill/FAL-3758-sort-components…
pomegranited Jul 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: add i18n messages
  • Loading branch information
rpenido committed Jun 6, 2024
commit 4deaea9a1f3d70aff3d175035f97947c5e996618
6 changes: 4 additions & 2 deletions src/library-authoring/EmptyStates.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ import messages from './messages';

export const NoComponents = () => (
<Stack direction="horizontal" gap={3} className="mt-6 justify-content-center">
<div>You have not added any content to this library yet.</div>
<Button iconBefore={Add}>Add Content</Button>
<FormattedMessage {...messages.noComponents} />
<Button iconBefore={Add}>
<FormattedMessage {...messages.addComponent} />
</Button>
</Stack>
);

Expand Down
4 changes: 3 additions & 1 deletion src/library-authoring/LibraryHome.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @ts-check
/* eslint-disable react/prop-types */
import React from 'react';
import { FormattedMessage } from '@edx/frontend-platform/i18n';
import {
Card, Stack,
} from '@openedx/paragon';
Expand All @@ -9,6 +10,7 @@ import { NoComponents, NoSearchResults } from './EmptyStates';
import LibraryCollections from './LibraryCollections';
import LibraryComponents from './LibraryComponents';
import { useLibraryComponentCount } from './data/apiHook';
import messages from './messages';

/**
* @type {React.FC<{
Expand Down Expand Up @@ -46,7 +48,7 @@ const LibraryHome = ({ libraryId, filter }) => {
return (
<Stack gap={3}>
<Section title="Recently Modified">
Recently modified components and collections will be displayed here.
<FormattedMessage {...messages.recentComponentsTempPlaceholder} />
</Section>
<Section title={`Collections (${collectionCount})`}>
<LibraryCollections />
Expand Down
15 changes: 15 additions & 0 deletions src/library-authoring/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ const messages = defineMessages({
defaultMessage: 'No matching components found in this library.',
description: 'Message displayed when no search results are found',
},
noComponents: {
id: 'course-authoring.library-authoring.no-components',
defaultMessage: 'You have not added any content to this library yet.',
description: 'Message displayed when the library is empty',
},
addComponent: {
id: 'course-authoring.library-authoring.add-component',
defaultMessage: 'Add component',
description: 'Button text to add a new component',
},
componentsTempPlaceholder: {
id: 'course-authoring.library-authoring.components-temp-placeholder',
defaultMessage: 'There are {componentCount} components in this library',
Expand All @@ -26,6 +36,11 @@ const messages = defineMessages({
defaultMessage: 'Coming soon!',
description: 'Temp placeholder for the collections container. This will be replaced with the actual collection list.',
},
recentComponentsTempPlaceholder: {
id: 'course-authoring.library-authoring.recent-components-temp-placeholder',
defaultMessage: 'Recently modified components and collections will be displayed here.',
description: 'Temp placeholder for the recent components container. This will be replaced with the actual list.',
},
});

export default messages;