Closed aninda052 closed 1 year ago
Hi @aninda052
thanks for the awesome work.
Let's not over-use our upload page and keep it as it is.
Can you create a new VideoEditPage
to edit the text values (NOT the uploaded video itself) please?
Also, take the latest code from main branch. Update the List page and add a Edit button in the actions (keep the Delete action but remove the other actions).
Otherwise all code seems good.
Can you create a new
VideoEditPage
to edit the text values (NOT the uploaded video itself) please?
@foyzulkarim vai, the reason behind the re-use of upload
page is to not use duplicate codes. Codes for upload
and edit
page will be almost same. Also if we use separate file, in future if we have to add a new field in 'upload' page, we also have to do the same things for edit
page.
Is it possible to tell me in details why we want to keep separate files ?
Good point. I like your argument. But it is most likely we will not be showing all fields in the upload page. And we will not edit all fields as well. Also, if we create different logics while uploading and editing, then it will be too much complicated to manage in a single page. For now, it seems duplicate, but in the long run, it is not that much duplicate.
For now, it seems duplicate, but in the long run, it is not that much duplicate.
Now i understand.
another question, what if we have exact number of fields in both upload
and edit
page then would you keep a single file or you will always prefer separate file ? which scenario would be a better option for keeping a single file ?
If the fields are same, then I would like to create a common Form
for these two, but create two different page (wrapper type component) which will have their own separate logics.
For example: if you don't want to give permission to everyone to edit, then the Edit page will be having that logic.
This is a fine contradiction/balance between SRP and DYI principles. 🙂
If the fields are same, then I would like to create a common
Form
for these two, but create two different page (wrapper type component) which will have their own separate logics.
Thank you vai for this suggestion. i'll follow this in future <3
btw, i've pushed my updated code and update pull description.
This will close #55
video update
video validation schema
recordingDate
invideo list
pageupdate
action invideo list
pagevideo list
page navigateNew Video
button toupload video
page