Closed djay closed 2 months ago
As discussed
OR: change the add page to always display the form view on add
Do whatever is easier for now and can always come back to it later
OR: change the add page to always display the form view on add
- Then you enter a title and shortname and click save. Save will then redirect you the full edit page
- should be easy to do. just change the condition so it appears even if blocks enabled, but only on add view, not edit
pros
- you can to pick a title before any transaction happens and never left with bad url
cons
- not like plone now. you get an extra screen
I looked into this approach and one way was to have Custom Form whenever user go to '/add' endpoint.
But after looking into volto core I found that this visual prop is passed by Edit and Add views to tell the Form whether to show the Sidebar and Blocks or not.
So, I just changed this visual
prop in Add view to be false always since we are not rendering Blocks and so now Add view shows the Form like it does when adding a File where you can give this page a title and summary and once you click save it will redirect you to that page/edit and you can further edit it. Also cancel works as usual.
Till now it doesn't seems to break anything. so lemme hear what you guys say about this :).
You can look at the code and Demo video in the PR
If possible it would be good to redirect directly to edit mode so it's closer to what plone normally does
If possible it would be good to redirect directly to edit mode so it's closer to what plone normally does
Check the latest commit, it now redirect user to the edit view of newly created page.
plone currently allows for editing before creation.
Instead
This is mockup for adding a folder but maybe we do page the same way?