Skip to content

Add publication timestamps to element#3573

Merged
tvdeyen merged 2 commits intomainfrom
element-publication-dates
Jan 21, 2026
Merged

Add publication timestamps to element#3573
tvdeyen merged 2 commits intomainfrom
element-publication-dates

Conversation

@tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Jan 20, 2026

What is this pull request for?

This adds two timestamps public_on and public_until instead of the current public boolean.
The toggle switch on the element editor remains a switch, but instead of a true/false value we now
use the date of publication.

Notable changes

  • Deprecates Alchemy::PageVersion.draft and Alchemy::PageVersion.public_on scopes.
  • Deprecates Alchemy::Element.hidden scope.

Screenshots

Remove if no visual changes have been made.

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

@tvdeyen tvdeyen added this to the 8.1 milestone Jan 20, 2026
@tvdeyen tvdeyen force-pushed the element-publication-dates branch 4 times, most recently from df7a033 to 7f8fa6b Compare January 20, 2026 20:27
@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.40%. Comparing base (06f64ed) to head (f362948).
⚠️ Report is 44 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3573      +/-   ##
==========================================
+ Coverage   97.37%   97.40%   +0.02%     
==========================================
  Files         312      314       +2     
  Lines        8091     8174      +83     
==========================================
+ Hits         7879     7962      +83     
  Misses        212      212              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tvdeyen tvdeyen force-pushed the element-publication-dates branch 4 times, most recently from 4c7fc31 to 8139f7a Compare January 21, 2026 10:31
@tvdeyen tvdeyen changed the title Use dates for Element visibility Add publication timestamps to element Jan 21, 2026
@tvdeyen tvdeyen force-pushed the element-publication-dates branch from 8139f7a to 5e69e09 Compare January 21, 2026 10:35
@tvdeyen tvdeyen marked this pull request as ready for review January 21, 2026 10:35
@tvdeyen tvdeyen requested a review from a team as a code owner January 21, 2026 10:35
@tvdeyen tvdeyen force-pushed the element-publication-dates branch from 5e69e09 to da842af Compare January 21, 2026 10:43
Useful if other models want to implement time based publishing.

This slightly changes a) scope names (draft vs drafts) and the
meaning of the public page version. Currently a page was considered
public if any version exists that has a non NULL public_on time.
Now it correctly looks for versions that are public now. Since we
currently do not have more than one public version, this was never
an issue, but with a future where multiple public page versions
exist this is the right thing.

Signed-off-by: Thomas von Deyen <vondeyen@blish.cloud>
This adds two timestamps public_on and public_until instead of the
current public boolean. The toggle switch on the element editor
remains a switch, but instead of a true/false value we now use the
date of publication.

Signed-off-by: Thomas von Deyen <vondeyen@blish.cloud>
@tvdeyen tvdeyen force-pushed the element-publication-dates branch from da842af to f362948 Compare January 21, 2026 11:00
@tvdeyen tvdeyen merged commit cc60bed into main Jan 21, 2026
19 checks passed
@tvdeyen tvdeyen deleted the element-publication-dates branch January 21, 2026 11:12
@tvdeyen tvdeyen added the enhancement New feature or enhancement label Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants