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

I can upload/select an image inline on an image block (starter UI) #36

Open
3 tasks
Tracked by #5
MAX-786 opened this issue May 24, 2024 · 4 comments
Open
3 tasks
Tracked by #5

I can upload/select an image inline on an image block (starter UI) #36

MAX-786 opened this issue May 24, 2024 · 4 comments

Comments

@MAX-786
Copy link
Member

MAX-786 commented May 24, 2024

Image

So quanta offers the following

  • click picker and it opens picker on the sidebar
  • Type a url
    • should be easy to support if volto already has this. if not out of scope
  • upload.
@djay
Copy link
Member

djay commented Aug 1, 2024

@MAX-786 should make the picker and upload appear on the sidebar I think. need to check figma

@MAX-786
Copy link
Member Author

MAX-786 commented Aug 1, 2024

@djay we currently have the image widget on the sidebar where you can type in the url of the img, it is kindof broken but when it is fixed by volto team it can be used to pick/upload image on the sidebar too

@djay
Copy link
Member

djay commented Aug 1, 2024

@MAX-786 I've put in how it works in quanta and the consequences

@djay
Copy link
Member

djay commented Dec 3, 2024

I am an idea on how to do this. I think what we do is generalise the idea of a starter page for some blocks.
The table has a similar custom UI for when the block is initially created.

Image

This is so custom it needs to come from the adminUI side. and for images we have the additional problem of DND and upload events needing to be sent direct to the admin UI.

So rough plan is

  • A block thats empty the frontends responsibility is to make it take up a reasonable amount of space ( a bit like the chooser block)
  • hydra will render a UI in the center on top. This would only appear when the block is selected and when not scrolling.
    • this is because its an overlay and no in teh frontend itself
    • hopefully can be done in a way where the colours and contrast aren't a problem
  • there will need be some registration on the admin UI side to register a schema/component to render inside an empty block.
    • would need to be some rule on what makes the block empty? or any valid submission makes it not empty?
    • the frontend must make sure they have left enough space otherwise it will overlap.
  • quanta shows these empty blocks without a toolbar
    • kind of like they don't exist yet like a chooser block? so can't dnd them?
    • do we say that if there is a starter UI then don't show the toolbar?

This should handle any complex block initialisation

@djay djay changed the title I can upload/select an image inline on an image block I can upload/select an image inline on an image block (starter UI) Dec 3, 2024
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

No branches or pull requests

2 participants