unfoldadmin / django-unfold

Modern Django admin theme for seamless interface development
https://unfoldadmin.com
MIT License
1.94k stars 188 forks source link

Actions Row dropdown does not show all items when there are limited number of entries on the changelist table. #751

Closed YashitM closed 2 weeks ago

YashitM commented 2 months ago

What version of Unfold are you using?

0.39.0

What version of Django are you using?

5.0

What browser are you using?

Brave (Version 1.69.168 Chromium: 128.0.6613.138 (Official Build) (64-bit))

Did you checked changelog/commit history, if the bug is not already fixed?

Yes, the last commit at this time was for the release of 0.39.0, which is the version this is tested on.

Did you searched other issues, if the bug is not already fixed?

There was a similar issue from a couple months ago (here, but that didn't resolve this issue.

Did you checked documentation?

Yes.

Are you able to replicate the bug in the demo site?

No, this works only on a specific case (when there are limited items in the changelist, and there are more than a couple action row items.

Describe your issue

Assume this example model admin configuration:

@admin.register(Group, site=core_site)
class GroupAdmin(BaseGroupAdmin, ModelAdmin):
    actions_row = ['block_user', 'block_user', 'block_user', 'block_user', 'block_user']

    @action(description="Block User")
    def block_user(self, request, object_id):
        messages.success(request, "Blocked User.")
        return redirect(request.META["HTTP_REFERER"])

Also assume the fact that there is only 1 or maybe 2 entries in the changelist:

image

When clicking on the actions row dropdown trigger, we can see that only 1 item of the 5 action row items are visible:

image

In the screenshot above, I've hovered over the 2nd entry of the Block User button, which shows that the item exists, but isn't fully visible, along with the other options.

lukasvinclav commented 2 months ago

Thanks for report. I was able to replicate the issue.

lukasvinclav commented 2 weeks ago

Fixed in #859