• Resolved nicegamer7

    (@nicegamer7)


    Hi Sayontan,

    I’m trying to fix a bug I noticed in Photonic’s “slideup-show” class. I thought I’d fix it on my end and submit a patch. However, I’m having some trouble building. Is there any special set up I need to do? Or should it work by just cloning, npm install and npm build-all?

    The bug I’ve found is that CSS does not animate transitions to “auto”, it can only animate from a number to a number.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Sayontan Sinha

    (@sayontan)

    Is there any special set up I need to do? Or should it work by just cloning, npm install and npm build-all?

    Unfortunately yes, there is a fair bit of a custom structure that I put in place for this, so replicating that might take quite some effort for you. I just left the build scripts as a part of the distribution.

    If you can tell me what you are trying to fix, I can patch it myself. I didn’t think I was animating to or from auto, but I might be wrong.

    Thread Starter nicegamer7

    (@nicegamer7)

    Ah, that’s okay.

    The issue is with this option, https://imgur.com/qHnmQ6K. The issue is that the title does not actually slide up, it just appears. The reason it sort of looks like it’s sliding is because the padding is animated, but the height isn’t. This happens because CSS cannot animate the height changing from 0 to “auto”.

    Here’s my attempt to fix it. Instead of setting height to “auto” using the slideup-show class, I set the height to the exact height using JS. The issue with this approach is that if the screen is resized while a title is open, it’s height may no longer be correct depending on if the text wrapped to the next line. I was originally trying a different approach to tackle that issue, but it was exhibiting some strange behaviour when quickly moving in and out of thumbnails, so I dropped it. My new idea to solve that is to simply add an event listener for the resize event, and resize any open title that needs resizing. Unfortunately, I didn’t get around to trying that, so here’s the changes I made without that event listener I was talking about.

    I tested these changes by just changing the already built files. It’s my first time working with SVN, so hopefully the patch is fine.

    https://drive.google.com/file/d/1uTrxc9lm0xEGgMhdP28TE16JZAtvP43m/view?usp=sharing

    Plugin Author Sayontan Sinha

    (@sayontan)

    Hi – thanks for the fix. I have bundled this with 2.75 (released earlier today).

    Thread Starter nicegamer7

    (@nicegamer7)

    Awesome! Just updated and it seems to be working well. Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.