Autosave does not begin autosaving until after the user has first done a manual save.
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Start with config/statamic/autosave.php and follow the reproduction steps for a new collection entry, comparing behavior before and after the first manual save. The issue raises unresolved options around required fields, slug creation, and validation, so first determine the intended behavior for unsaved entries. Done means new-entry content is autosaved reliably, or the form clearly tells users they need to save first.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug description
Autosave does not begin autosaving until after the user has first done a manual save.
Yet many editors will simply create a new entry and start typing, without thinking to do a manual save before they're done — which is kind of the user need for autosave!
So it's important for autosave to either start autosaving straight away, or to clearly inform the user of the need to do a manual save first.
Immediate autosaving approach
The preferred approach would be for autosave to immediately start autosaving, without the need for the user to do the first save manually.
This of course brings some issues:
1. What to do about required system fields, such as Title
Autosave could use a title_format approach until the user has entered a title, such as "Autosaved blog post {hash}'
2. What would happen with the creation of the slug?
Autosave could bypass creation of the slug, leaving that for a manual save
3. What to do about other user-defined required fields
Could autosave bypass validation, that would then only be done on manual saves of the entry?
Inform the user approach
If the above is not possible, or until it can be implemented, the autosave feature could trigger a banner at the top of the entry creation form to say something like:
Activate Autosave
Enter a title (even a placeholder) and click 'Save and continue editing'. After that your content will be autosaved while you work
I understand Autosave is currently experimental, so am opening this issue to contribute to the discussion and refinement. I completely understand if you want to move this discussion somewhere else.
How to reproduce
- Enable autosave in config/statamic/autosave.php
- Enable autosave on a collection, as described in autosave.php
- Create a new entry in that collection. Enter a title, and type in the text field for at least 10 seconds or more to allow for one or two autosaves happening.
- Refresh the page.
- See that the content has gone, it's not listed anywhere in the collection, and git hasn't identified any file changes
- Now repeat the steps, but before refreshing the page click Save once.
- Then type some more text for at least 10 seconds to get one or two autosaves happening
- Now refresh the page, and see that the text you typed since the manual save has been autosaved.
Logs
No response
Environment
Environment
Application Name: Convivio
Laravel Version: 11.17.0
PHP Version: 8.3.9
Composer Version: 2.7.7
Environment: local
Debug Mode: ENABLED
URL: convivio.test
Maintenance Mode: OFF
Timezone: Europe/London
Locale: en
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: smtp
Queue: sync
Session: file
Livewire
Livewire: v3.5.4
Statamic
Addons: 11
Sites: 1
Stache Watcher: Enabled
Static Caching: Disabled
Version: 5.17.0 PRO
Statamic Addons
goldnead/statamic-toc: 1.5
jonassiewertsen/statamic-livewire: 3.6.0
mitydigital/feedamic: 2.4.1
statamic/wikilinks: 2.1.0
stillat/relationships: 2.2.1
studio1902/statamic-peak-browser-appearance: 3.5.0
studio1902/statamic-peak-commands: 8.4.0
studio1902/statamic-peak-seo: 8.15.3
studio1902/statamic-peak-tools: 6.3.0
tv2regionerne/statamic-passport: 1.4.1
tv2regionerne/statamic-private-api: 1.15.0
Installation
Existing Laravel app
Additional details
No response
- Ngôn ngữ chính
- PHP
- Star
- 4.9k
- Fork
- 647
- Merge trung bình
- 1 ngày 45 phút
- Pull request đã merge (30 ngày)
- 221
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của statamic/cms
-
forms ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
accessibility
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
antlers
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Nav: link to the site root with an anchor (/#section) gets is_parent on every pageCó thể đã có người làm @duncanmcclean đã nhận hôm nay. Đang mởnavigations
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Multiple Choice and Checkboxes no longer offer "Inline", but the default views still use itCó thể đã có người làm @duncanmcclean đã nhận hôm nay. Đang mởforms
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
sync-en
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Selection on a line without a docblock tag drops trailing characters (data provider attribute)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
vimeo/psalm#15150 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
taskforcesh/bullmq#5238 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] v-change-database-password reports success but doesn't change the password when MySQL validate_password rejects itCó thể đã có người làm @bfs2021 đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Automattic/jetpack#55517 ·
Maintainer thường phản hồi trong vòng 1 ngày