Images in media browser have no hover effect and selected effect in media browser

Created on 28 August 2023, 10 months ago
Updated 8 January 2024, 6 months ago

Images in media browser have no hover effect and selected effect in media browser

πŸ› Bug report
Status

Needs review

Version

2.1

Component

Code

Created by

πŸ‡¨πŸ‡³China murphyW

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @murphyW
  • πŸ‡ͺπŸ‡ͺEstonia rang501 Viljandi

    The hover effect should come from the core media module. We should not add any custom styling, unless absolutely necessary (and then we try to support both claro and gin), because sites may use different admin themes, which most likely will use core media classes for styling.

    I remember the hover worked fine when I worked on it, but maybe something have changed and it does not work anymore?

    What is the Drupal core version and what is the admin theme?

  • πŸ‡¨πŸ‡³China murphyW

    drupal core 10.1 and admin theme is seven

  • πŸ‡¨πŸ‡³China murphyW

    In the previous version of drupal 9.5, it was normal for the media_directories version to be 2.0, which may be a theme problem.

  • πŸ‡ͺπŸ‡ͺEstonia rang501 Viljandi

    I think seven is not supported at the moment. Because the media directories is using core media module classes and styling, it should work, unless theme does something differently, like alters markup or classes, which does not affect media directories.

    Maybe there is a separate js file that does the hover effect? Maybe you need to include that instead? The library definitions are theme specific and I guess seven library is not included.

  • πŸ‡¨πŸ‡³China murphyW

    I also think it is a problem with the seven theme

  • πŸ‡¨πŸ‡³China murphyW

    Sorry for the sloppy way I went about it, I just wanted to get things done quickly.
    I am so sorry

  • πŸ‡ΏπŸ‡¦South Africa Gomez_in_the_South

    I'm also using Drupal 10.1.x, whilst still staying on Seven theme (for now).
    The Media directories UI with the Seven admin theme appears completely broken, the size of the thumbnails was wrong, there was no tiling, and it wasn't useable.

    I came to a similar solution to murphyW, adapting some of the styling rules from the previous version, and hacked a few other CSS overrides to get it to appear close to how it did before.

    I only found murphyW's patch afterwards, which I have found fixes some, but not all of the styling issues I was finding. As such, I thought it worthwhile to still attach my version, in case it helps anyone else in a similar situation.

    It's important to note that both patches attached to this issues are a temporary solution, and anyone using either one should:
    - only use it if you're on the Seven theme (or want to see if it helps an issue with another legacy theme)
    - not expect this to be merged
    - plan to upgrade to Claro/Gin or similar in the near future

    Perhaps the maintainers should change the status of this issue to "Won't fix"?

  • Issue was unassigned.
  • Status changed to Needs review 7 months ago
  • πŸ‡¨πŸ‡­Switzerland ytsurk Switzerland

    We actually did not want to remove support for seven already now.

  • πŸ‡ͺπŸ‡ͺEstonia rang501 Viljandi

    I made some changes that seem to fix Seven theme support. It just includes the libraries in the required places.

  • πŸ‡¨πŸ‡­Switzerland ytsurk Switzerland

    Thank you rang501, but where are these changes?

  • πŸ‡ͺπŸ‡ͺEstonia rang501 Viljandi

    It was quite late and I guess I forgot :D

  • πŸ‡§πŸ‡·Brazil adinancenci

    Patch 11 did not worked for me.

    You see, I am using adminimal which is based on seven.

    Maybe the patch could be modified to be used on themes based on seven.

  • πŸ‡§πŸ‡·Brazil adinancenci

    Hello again, I made some slight modifications to the previous patch to take the base theme in consideration as well:

Production build 0.69.0 2024