-
-
Notifications
You must be signed in to change notification settings - Fork 1
Adding a publication #39
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
Conversation
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.
- Use for Add Publication
- Remove "Name" input. We will use the name given in the feed
- We need to fetch the feed within the HTTP request of creating a publication and show better error messages. Also, we don't want to add the publication if the RSS feed URL is wrong. (needs discussing)
# Conflicts: # backend/composer.json # backend/composer.lock # backend/src/Api/App/Controller/PublicationController.php # backend/src/Repository/CollectionUserRepository.php # backend/src/Service/Parser/RssParser.php # frontend/src/routes/app/(reader)/+layout.svelte
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.
- Use a Button for + Add Publication (from HDS)
- When the "Add Publication" modal is opened, automatically focus the input
- While the publication is being added, show a loader (Use Modal Loader)
- In the PublicationController::addPublication, the idea of using an inspection is great! I suggest sending this $inspection into PublicationService->createPublication and do everything there (you won't need udpates like $publication->setConditionalGetEtag when you set it when creating the publication).
- Error handling in the UI (ex: when the feed fails)
- Create an ExceptionListener (see Relay). Most parts are handled by the internal lib, which converts the error to a JSON response with the correct response
- Show the error message in the modal when the API fails.
# Conflicts: # backend/composer.json # backend/composer.lock # backend/src/Api/App/Controller/CollectionController.php # backend/src/Api/App/Controller/PublicationController.php # backend/src/Repository/CollectionUserRepository.php
Creating a collection
Nadil-K
left a comment
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.
- Add a test for
POST /collections - In the frontend, move API calls to a separate
tsfile (See this) - Remove
console.log() - Use
toast.error()from HDS instead ofconsole.error()
|
|
||
| return $this->json([ | ||
| 'publication' => new PublicationObject($publication), | ||
| 'created' => $created, |
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.
- Why do we need these created and attached booleans? Within the current codebase, I don't see any instance of it being used. Shall we remove it @supun-io?
No description provided.