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

Signature window offset and too small #8603

Closed
ArcheNoah77 opened this issue Oct 23, 2020 · 17 comments
Closed

Signature window offset and too small #8603

ArcheNoah77 opened this issue Oct 23, 2020 · 17 comments
Assignees

Comments

@ArcheNoah77
Copy link

Please confirm you have done the following before posting your bug report:

Describe the bug
When signing for an asset, the signature window cant be used full size and the signature (or the pen i write with) is offset, ca. 1cm to the right.
It happens on all devices in all browsers.

Expected behavior
Use the full signature window

Screenshots
image

Server (please complete the following information):

  • Snipe-IT Version: 5.0.2
  • OS: Ubuntu 18.04
  • Web Server: Apache
  • PHP Version: 7.2.24

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome, Internet Exporer, New Edge
tarlety added a commit to tarlety/snipe-it that referenced this issue Nov 2, 2020
@snipe
Copy link
Owner

snipe commented Nov 2, 2020

So this is fun...

Screen Shot 2020-11-02 at 1 56 36 PM

(See #8656)

It's too big and too small. Schrödinger signature box :D

We're looking into this.

@snipe
Copy link
Owner

snipe commented Nov 2, 2020

Can anyone tell me if this happens only on mobile v desktop?

@tarlety
Copy link

tarlety commented Nov 3, 2020

The signature-pad.min.css is missing.

It looks like webpack.mix.js tries to minify signature-pad.css, but it's just not there.

mix
    .copy('./resources/assets/css/signature-pad.css', './public/css/dist')
    .minify('./public/css/build/signature-pad.css');

Here is my attempt to fix it (b031593) by correct copy target path and commit minified css file.

mix
    .copy('./resources/assets/css/signature-pad.css', './public/css/signature-pad.css')
    .minify('./public/css/signature-pad.css');

Quick fix

Download the minified css file (b031593) and signature pad size shall be correct.

$ curl https://raw.githubusercontent.com/tarlety/snipe-it/b0315930659ded6fe1583cca21eafb2aafa744e3/public/css/build/signature-pad.min.css -o /var/www/html/public/css/signature-pad.min.css

@snipe
Copy link
Owner

snipe commented Nov 3, 2020

We call it directly in the file.

https://github.com/snipe/snipe-it/blob/master/resources/views/account/accept-asset.blade.php#L14

GitHub
A free open source IT asset/license management system - snipe/snipe-it

@snipe
Copy link
Owner

snipe commented Nov 3, 2020

If you copy signature-pad.css in public/css to public/css/signature-pad.min.css does that help?

@snipe
Copy link
Owner

snipe commented Nov 3, 2020

(Should not need to re-run npm for assets)

@tarlety
Copy link

tarlety commented Nov 3, 2020

If you copy signature-pad.css in public/css to public/css/signature-pad.min.css does that help?

On my self-hosted instance, yes it does help.
I am using snipe-it 5.0.4.

@snipe
Copy link
Owner

snipe commented Nov 3, 2020

Okay, that's on develop now, will be in the next release

@denzfarid
Copy link

The signature-pad.min.css is missing.

It looks like webpack.mix.js tries to minify signature-pad.css, but it's just not there.

mix
    .copy('./resources/assets/css/signature-pad.css', './public/css/dist')
    .minify('./public/css/build/signature-pad.css');

Here is my attempt to fix it (b031593) by correct copy target path and commit minified css file.

mix
    .copy('./resources/assets/css/signature-pad.css', './public/css/signature-pad.css')
    .minify('./public/css/signature-pad.css');

Quick fix

Download the minified css file (b031593) and signature pad size shall be correct.

$ curl https://raw.githubusercontent.com/tarlety/snipe-it/b0315930659ded6fe1583cca21eafb2aafa744e3/public/css/build/signature-pad.min.css -o /var/www/html/public/css/signature-pad.min.css

thanks man! I really appreciate,
I tried the quick fix
and it's working

Firefox dekstop 82.0.2 (64-bit)
ezgif com-video-to-gif(3)

mobile version iphone x, portrait
ezgif com-video-to-gif(4)

mobile version iphone x , landscape
ezgif com-video-to-gif(5)

@snipe
Copy link
Owner

snipe commented Nov 3, 2020

Awesome, thanks for the confirmation!

@snipe snipe closed this as completed Nov 3, 2020
@denzfarid
Copy link

denzfarid commented Nov 3, 2020

If you copy signature-pad.css in public/css to public/css/signature-pad.min.css does that help?

confirmed!
I also tried this way
and it works too
cp resources/assets/css/signature-pad.css public/css/signature-pad.min.css

ezgif com-video-to-gif(6)

@snipe
Copy link
Owner

snipe commented Nov 3, 2020

I think the issue was that the asset-acceptance.blade.php was looking in the wrong dir for the minified file.

<link rel="stylesheet" href="{{ mix('css/signature-pad.min.css') }}">
(not working)

vs

<link rel="stylesheet" href="{{ mix('css/build/signature-pad.min.css') }}">
(working)

@denzfarid
Copy link

denzfarid commented Nov 3, 2020

signature-pad.min.css

maybe,
because previously I did not find the file
signature-pad.min.css in the public/css directory, but when that file is added, PHEW!!! , it seems like magic

@snipe
Copy link
Owner

snipe commented Nov 3, 2020

It's the build part that was missing. Webpack minifies the source css from the resources/assets/css file, and puts it into the public/css/build directory, but our CSS link in that blade was omitting the build part of the path I think.

@denzfarid
Copy link

It's the build part that was missing. Webpack minifies the source css from the resources/assets/css file, and puts it into the public/css/build directory, but our CSS link in that blade was omitting the build part of the path I think.

absolutely right and i agree with that,

thank you so much @snipe and all team 🙏🏼

@snipe
Copy link
Owner

snipe commented Nov 3, 2020

No problem - I'm glad we could get you sorted. :)

@ArcheNoah77
Copy link
Author

Thanks for the help! I will try it in the next days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants