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

Add text block edit functionality #12

Merged

Conversation

mrnossiom
Copy link
Contributor

@mrnossiom mrnossiom commented Sep 12, 2023

Hi 👋🏻,

To add the ability of editing text blocks, I quickly duplicated the EditBookmarkCard file and modified the .../{digestId}/block/{blockId} endpoint PATCH implementation. Adding an onEditClick prop to the BlockTextCard component to show the Edit button in the Block Menu Popover.

Didn't test intensively, but it should work fine 😄

Improvements

  • Merge AddTextBlockDialog and EditTextBlockDialog into one component?
  • Cleanup the .../{digestId}/block/{blockId} file to avoid nesting. Factorize if-else statement in functions?

@vercel
Copy link

vercel bot commented Sep 12, 2023

@mrnossiom is attempting to deploy a commit to the Premier Octet Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Sep 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
digestclub ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 16, 2023 11:14am

@baptadn
Copy link
Member

baptadn commented Sep 13, 2023

Feature needed! 🙏 Thanks @mrnossiom

@baptadn
Copy link
Member

baptadn commented Sep 14, 2023

Hello @mrnossiom! We have slightly updated the UI related to your PR, see #15

@mrnossiom mrnossiom force-pushed the feat/add-text-block-edit-functionality branch from 4e01324 to cfa28ab Compare September 14, 2023 16:09
@mrnossiom mrnossiom marked this pull request as ready for review September 14, 2023 16:09
@mrnossiom
Copy link
Contributor Author

I changed the button label of the AddTextBlockDialog from Save to Add. Just as a suggestion, I can revert it in seconds 😉.

mrnossiom and others added 2 commits September 15, 2023 12:52
Co-authored-by: Baptiste Adrien <adrien.baptiste@gmail.com>
Co-authored-by: Baptiste Adrien <adrien.baptiste@gmail.com>
@baptadn
Copy link
Member

baptadn commented Sep 15, 2023

Thanks @mrnossiom! I have spot a bug, when the user edits the text and re-edit, the textarea still contains the old text :

Kapture.2023-09-15.at.19.00.56.mp4

@mrnossiom
Copy link
Contributor Author

I have spot a bug, when the user edits the text and re-edit, the textarea still contains the old text

Good catch 👍🏻

@baptadn
Copy link
Member

baptadn commented Sep 16, 2023

Thanks a lot @mrnossiom! :shipit:

@baptadn baptadn merged commit 49eedba into premieroctet:main Sep 16, 2023
3 checks passed
@mrnossiom mrnossiom deleted the feat/add-text-block-edit-functionality branch September 16, 2023 12:36
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 this pull request may close these issues.

None yet

2 participants