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

Make edit post page #58

Closed
17 tasks done
2blo opened this issue Feb 13, 2023 · 0 comments · Fixed by #61
Closed
17 tasks done

Make edit post page #58

2blo opened this issue Feb 13, 2023 · 0 comments · Fixed by #61
Milestone

Comments

@2blo
Copy link
Owner

2blo commented Feb 13, 2023

  • use the existing upload component
  • move out upload component to own file
  • new edit page
  • mode variable upload or edit
  • populate fields with thumbnail data
  • save button
  • cancel button
  • editById instead of upload
  • update meny dropdown link
  • dont persist to local storage for edit page
  • convert vid to youtube link for ux when populating edit fields
  • avoid make prettier loading state - in user list - we query all posts anyway to get before, after + title, id just need to include desc
  • make id query param too.
  • edit post from post page + delete
  • Minor code quality improvements #66
  • disallow nav to edit page from url,
  • figure out whether to allow nullish and undefined description vs ""

Notes

  • null is a value
  • undefined means undefined XD
  • "" is ... well

toilet paper analogy

lets try with empty strings everywhere, undefined in prisma may mean we dont update a field, or even include it

  • a required field cannot be set to null, but it can be set to undefined in the query - it means we dont update it.

null seems like bad practive, prefer undefined

@2blo 2blo added this to the MVP milestone Feb 13, 2023
@2blo 2blo linked a pull request Feb 14, 2023 that will close this issue
2blo added a commit that referenced this issue Feb 16, 2023
* make edit page (copy of upload)
* no local store, does not interfere with upload
* dont force image ending, some have query params
* decide managePost behavior based on post prop
* use router.push(actual_path, visible_path) to pass params
* make 3 button intents
* Allow edit and delete from post page.
* extract menu button
* replace some fragmented props with a single "post" prop
* Eject from edit page on manual url nav
* Remove null and undefined values from desc.
* and remove http

Signed-off-by: 2blo <2blo.dev@gmail.com>
@2blo 2blo closed this as completed in #61 Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant