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

Support Multiple of The Same Block #99

Open
ShaanCoding opened this issue May 7, 2024 · 1 comment
Open

Support Multiple of The Same Block #99

ShaanCoding opened this issue May 7, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@ShaanCoding
Copy link
Owner

Feature Details

Following up from #92 as this UX was intrusive from the user, in #92 I've decided to hide / remove this functionality on the UI to prevent this issue from occurring until a fix for colliding template names / UUID is resolved.

Do what was discussed in #92

@ShaanCoding ShaanCoding added the enhancement New feature or request label May 7, 2024
@ShaanCoding
Copy link
Owner Author

Notes

From @MathPow

Describe the bug

When we add blocks from the current template, nothing seems to update in the preview but we can see the change in the blocks area. If we select "Add Block" from an other template on the right (with the new feature), it works fine.

To Reproduce

Steps to reproduce the behavior:

  1. Go to othneildrew-best-readme-template
  2. Click on 'Add Block' from any of the option of the right. It needs to be a block from the current template
  3. Scroll down to the bottom of the page
  4. See that nothing updates in the preview

Expected behavior

We want the markedown preview to update in real time everytime

Screenshots

image

From @ShaanCoding

I think this is due to the useEffect that generates the template not containing blocks to regenerate it upon adding. As usually on a new block being added a macro is added, which is not the case for duplicate blocks.

Another issue here is they share the same keys, and thus will share the same form values / cause conflicts. As they use global values, we need to uplift #24, or generate new UUID keys on query or just make it 1 block per template as realistically you would never need 2 duplicate sections

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant