-
Notifications
You must be signed in to change notification settings - Fork 0
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: create library form (TEMP) #42
feat: create library form (TEMP) #42
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
…nido/fal-3768-create-new-library-form
ca33c18
to
6acee0a
Compare
* fix(deps): update dependency @openedx/paragon to v22.6.1 * fix: lint errors from stricter types in new paragon version --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…nido/fal-3768-create-new-library-form
const intl = useIntl(); | ||
const navigate = useNavigate(); | ||
|
||
const [apiError, setApiError] = useState<React.ReactNode>(); |
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.
You don't need to create your own apiError
state. When you call useCreateLibraryV2()
below, it returns an error
and isError
state variables that you can use. It also returns an isLoading
which you can use to disable the UI and display a spinner while the API call happens. See https://tanstack.com/query/v4/docs/framework/react/reference/useMutation
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.
Thank you @bradenmacdonald!
Didn't think this way the first time. I liked it: 9a23204
4d9da7f
to
63e7593
Compare
Co-authored-by: Hunia Fatima <[email protected]>
…nido/fal-3768-create-new-library-form
Closed in favor of openedx#1116 |
Description
This PR adds a Create Library form to course-authoring.
More Info
Testing Instructions
Private ref: FAL-3768