-
Notifications
You must be signed in to change notification settings - Fork 88
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
Load Entity into Block functionality #480
Conversation
packages/hash/frontend/src/components/BlockContextMenu/BlockContextMenuItem.tsx
Outdated
Show resolved
Hide resolved
packages/hash/frontend/src/components/BlockContextMenu/BlockContextMenuItem.tsx
Outdated
Show resolved
Hide resolved
This pull request introduces 9 alerts when merging d9513cf into f94f332 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 48614a7 into e6f3ba8 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging c867f5c into 3063e76 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 6ce3d8e into 3063e76 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging a6d09c6 into 3063e76 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 22f7792 into 3063e76 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 99f1d29 into 3063e76 - view on LGTM.com new alerts:
|
🌟 What is the purpose of this PR?
This PR adds code to support loading an entity into a block. It also updates BlockContextMenu to match the new designs. Right now it only supports block entities (entities created via a block) since they match the block's schema. Eventually it will be able to support other entities.
addEntity
submenu has a loading state. This will be addressed when in Styles for Selection MenuThere are some typing issues which I have temporarily ignored just to get this in. Will address when working on taskcreateLocalBlock
doesn't properly handle text blocks and that affects loading entities in text blocks . This will be addressed in Fix bug in loading entities in text blocks which will be worked on after Add block config panel. Add block schema to block context #490 has been merged in, since it provides a synchronous way to access the blocks componentSchema and that is needed to determine if a block is a text block🚫 Blocked by
🐾 Next steps
🔍 What does this change?
useAccountEntities
hook for fetching entities based on block'scomponentId
LoadEntityMenuContent
andBlockListMenuContent
which are submenus for loading an entity and swapping blocksxs
to the TextField component and fixes a console error that happens as a result ofFormHelperText
@
opens the load entity submenu while/
opens blocklist sub menuupdateBlockEntityProperties
to handle updating a block's entity in draft entity store.createLocalBlock
method inProsemirrorSchemaManager
for creating blocks whose info have already been fetched.updateBlockData
to handle updating a block's data and prosemirror tree📜 Does this require a change to the docs?
🔗 Related links
🛡 What tests cover this?
❓ How to test this?
hash-load-entity-ui
to local-storage📹 Demo
Screen.Recording.2022-04-12.at.08.54.26.mov
Screen.Recording.2022-04-12.at.09.00.40.mov