Skip to content
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

fix: editing buttons missing in admin when file present #1511

Merged
merged 2 commits into from
Dec 5, 2024

Conversation

pajowu
Copy link
Contributor

@pajowu pajowu commented Dec 5, 2024

Description

This PR adds the image-preview-container to the admin file preview. This is needed so that the sass-rules from _image-info.scss gets applied. This fixes the issue described in #1499

Related resources

  • #...
  • #...

Checklist

  • I have opened this pull request against master
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined #workgroup-pr-review on
    Slack to find a “pr review buddy” who is going to review my pull request.

I did not do the last item, as the slack-channel no longer exists :)

Summary by Sourcery

Bug Fixes:

  • Fix the missing editing buttons in the admin interface when a file is present by adding the 'image-preview-container' class.

Copy link
Contributor

sourcery-ai bot commented Dec 5, 2024

Reviewer's Guide by Sourcery

This PR fixes a UI issue in the admin interface by adding the 'image-preview-container' class to the file preview element, which enables the proper application of existing SASS styling rules for editing buttons.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Added 'image-preview-container' class to the file preview element in the admin interface
  • Added 'image-preview-container' class to the filer-dropzone div when an object is attached
  • Ensures proper application of existing SASS styling rules from _image-info.scss
filer/templates/admin/filer/widgets/admin_file.html

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @pajowu - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@fsbraun
Copy link
Member

fsbraun commented Dec 5, 2024

@pajowu Thanks for the PR! I suggested a slightly different approach (see above), since I think the issue was introduced by #1490.

Would you like to bump the version in filer/__init__.py and add a comment to the changelog, too? I'd love to release the fix quickly!

@pajowu
Copy link
Contributor Author

pajowu commented Dec 5, 2024

@fsbraun yes, that fixed it as well. I updated the commit accordingly. Thanks :)

Copy link
Member

@fsbraun fsbraun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 🙏

@fsbraun fsbraun merged commit fc34247 into django-cms:master Dec 5, 2024
34 checks passed
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.

2 participants