-
Notifications
You must be signed in to change notification settings - Fork 45
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
Feature/1268 accordion blockqoute #1279
Conversation
I'll give this a proper look next week. Regarding the |
I tried removing all the consts, simplifying the logic quite a bit. However, i have never used the document-handler-editor, so i'm not sure if i ruined something or not 😨 Everything seems to work with the new logic. Would it be OK if i push it and you test it again? (Sorry for the extra work, but it felt wrong storing everything twice :) ). @OlofSvahnVbg |
Of course, go for it! As long as the functionality is the same as before :) @Hallbergs |
Sweet! Just pushed it. Let me know if it doesn't seem to work as before. If something is wrong i'll revert the "fix". :) |
This seems to be working perfectly :) Big thanks for the update. I'm guessing the arrow functions have something to do with not needing the two variables? |
Kind of. I saw that the constants and the internal state had the same values when the props updated. Therefore the constants could be removed! |
I don't know if @jacobwod wants to check the code before merging? |
…/Hajk into feature/1268-AccordionBlockqoute
Hi @OlofSvahnVbg, one question:
We have a lot of stuff in production using DocumentHandler and I update frequently from |
I think I made it so that accordion is simply an extra feature. I dont think Ive made changes to existing blockqoutes and that logic. But maybe we can look it over together to be sure, perhaps after todays code meeting? |
Or tomorrow works better, actually :) |
Sure, sounds good! 👍 |
The last two commits are fine too, merge whenever you're ready. |
It seems you need to approve before I can merge @jacobwod :) |
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.
Ooops, missed to tick the Approve
box, sorry! 😄
closes #1268
NOTE:
In the TextAreaInput there is two types of variables that seems to be similar (ex. isAccordion which is a state and currentIsAccordion which is a const). However, the two variables are used to keep track of two different things, the user interaction and the data from the existing blockqoute.
The useState and useEffect I use to keep track of this might not be best practice. If not, I would like to learn of a better way to do it, if that is possible. Thanks.