django-cms / djangocms-versioning

General purpose versioning package for Django CMS 4 and above.
Other
33 stars 29 forks source link

fix: The version changelist table edit button opens all items outside of the sideframe #278

Closed Aiky30 closed 2 years ago

Aiky30 commented 2 years ago

Description

An issue is present where all items in the Version Changelist table are opened outside of the sideframe when the edit icon is clicked. This should only be the case for PageContents and any other items with Placeholders that require a dedicated edit endpoint with a toolbar. All other items should continue to open in the sideframe.

Due to the nature of the check, the caching (cached property) prevents the calculation happening for every table row when rendering the Changelist, it is done once per model with VersioningItem configuration.

Checklist

codecov[bot] commented 2 years ago

Codecov Report

Merging #278 (0fd3608) into master (ca99544) will increase coverage by 0.06%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #278      +/-   ##
==========================================
+ Coverage   87.23%   87.30%   +0.06%     
==========================================
  Files          29       29              
  Lines        1528     1536       +8     
  Branches      247      249       +2     
==========================================
+ Hits         1333     1341       +8     
  Misses        140      140              
  Partials       55       55              
Impacted Files Coverage Δ
djangocms_versioning/admin.py 86.63% <100.00%> (+0.03%) :arrow_up:
djangocms_versioning/datastructures.py 95.55% <100.00%> (+0.37%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ca99544...0fd3608. Read the comment docs.