Skip to content

Add attachment "deletable" filter and show usage #3335

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

Merged
merged 7 commits into from
Jul 25, 2025

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Jul 18, 2025

What is this pull request for?

As with the picture we want to show the pages and elements a file is used on and make it only deletable if it has not been attached yet.

Notable changes

Rebuilds the attachment preview dialog in order to show file usage in nice way without removing the
preview feature and make room for the usages list.

Screenshots

CleanShot 2025-07-21 at 16 57 07@2x

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.0 milestone Jul 18, 2025
@tvdeyen tvdeyen self-assigned this Jul 18, 2025
Copy link

codecov bot commented Jul 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.10%. Comparing base (40a663a) to head (610568a).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3335      +/-   ##
==========================================
+ Coverage   97.04%   97.10%   +0.05%     
==========================================
  Files         274      276       +2     
  Lines        7168     7207      +39     
==========================================
+ Hits         6956     6998      +42     
+ Misses        212      209       -3     

☔ 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 attachment-deletable-scope branch from 970bd75 to 9c51ed3 Compare July 21, 2025 14:42
@tvdeyen tvdeyen changed the title Attachment deletable scope Add attachment "deletable" filter and show usage Jul 21, 2025
@tvdeyen tvdeyen force-pushed the attachment-deletable-scope branch 2 times, most recently from f6791b6 to 15550b3 Compare July 22, 2025 08:13
@tvdeyen tvdeyen marked this pull request as ready for review July 22, 2025 08:14
@tvdeyen tvdeyen requested a review from a team as a code owner July 22, 2025 08:14
@tvdeyen tvdeyen removed their assignment Jul 22, 2025
@tvdeyen tvdeyen force-pushed the attachment-deletable-scope branch 2 times, most recently from 9a62096 to 77cd42f Compare July 23, 2025 12:24
tvdeyen added 7 commits July 25, 2025 10:36
A convenient module that provides scopes, methods and relations
for resources that are relatable to ingredients having a
`related_object_alias` like `Alchemy::Picture` or `Alchemy::Attachment`.
This provides us with the `deletable` filter.
Custom elements behave like inline elements not taking any
space in the DOM. We want the tooltip to be placed around
the whole button, but just the text of the button. This fixes it
Make it reusable for other resources and adjust the style
to be more pleasant.
Make it a bit darker for better contrast to the form background
This was a hard-coded color. Need to use border-color here.
As with the picture we want to show the pages and
elements a file is used on.
@tvdeyen tvdeyen force-pushed the attachment-deletable-scope branch from 77cd42f to 610568a Compare July 25, 2025 08:37
@tvdeyen tvdeyen merged commit 35e05b2 into main Jul 25, 2025
18 checks passed
@tvdeyen tvdeyen deleted the attachment-deletable-scope branch July 25, 2025 08:44
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

Successfully merging this pull request may close these issues.

1 participant