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 field and component support #13418

Merged
merged 70 commits into from May 20, 2024

Conversation

deanhannigan
Copy link
Contributor

@deanhannigan deanhannigan commented Apr 5, 2024

Description

Enhance your app with direct signature capture in Budibase forms!

  • Internal data sources now directly support a Signature data type.
  • Forms can now capture and store signatures with the SignatureField component type.
  • Signatures are stored as .png files and can be embedded in your applications.
  • Supports mouse capture and also touch entry for mobile users.

Addresses

Screenshots

View and edit signature in the data section
signing

Capture signatures in your app forms!
Screenshot 2024-04-08 at 17 06 45

Launchcontrol

Signature field support added to internal datasources and forms.

Feature branch env

Feature Branch Link

Copy link
Member

@aptkingston aptkingston left a comment

Choose a reason for hiding this comment

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

Awesome work Dean! Nothing major but just a few suggestions 👌

packages/backend-core/src/environment.ts Outdated Show resolved Hide resolved
packages/bbui/src/Modal/ModalContent.svelte Outdated Show resolved Hide resolved
packages/client/src/components/Component.svelte Outdated Show resolved Hide resolved
packages/client/src/components/app/GridBlock.svelte Outdated Show resolved Hide resolved
@deanhannigan deanhannigan marked this pull request as ready for review April 8, 2024 16:28
@deanhannigan deanhannigan requested a review from a team as a code owner April 8, 2024 16:28
@deanhannigan deanhannigan requested review from adrinr and removed request for a team April 8, 2024 16:28
@deanhannigan deanhannigan added the feature-branch Release this PR code into a feature branch label Apr 9, 2024
Copy link
Member

@aptkingston aptkingston left a comment

Choose a reason for hiding this comment

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

One small suggestion to update the grid cell to use the latest components, but otherwise LGTM! This is so smooth to write on, I love it 😂

@mike12345567
Copy link
Collaborator

Gave this a go myself, Ubuntu + Firefox, all seems to be working well with my graphics tablet
image

Takes a little bit of getting used to due to it not starting immediately where you click, but works nicely!

@aptkingston
Copy link
Member

aptkingston commented May 15, 2024

Bit of a random one, but if you just click (don't drag) you get lines shooting in from the top left... Not a massive issue lol unless there's an easy fix.
image

Edit: as @mike12345567 pointed out it probably actually does need fixed if possible, because it would be impossible to dot an "i" otherwise (you'd get a weird line in the top left).

Edit 2: I can see you dotted i's successfully in your demo video, so I'm puzzled.

@deanhannigan
Copy link
Contributor Author

@aptkingston there appears to be a recent issue around this on the framework itself jakubfiala/atrament#99

Switching to the version from 3 weeks ago might fix the issue.

Copy link
Collaborator

@adrinr adrinr left a comment

Choose a reason for hiding this comment

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

Still being broken for me using firefox on a mac. Happy to debug today to see if we can reproduce it

packages/types/src/documents/app/row.ts Outdated Show resolved Hide resolved
@deanhannigan
Copy link
Contributor Author

deanhannigan commented May 16, 2024

Had a call with @adrinr this morning to run through this and the error he's seeing is definitely happening. It seems that it only occurs when the component is loaded on a native/laptop monitor 🙃. The canvas get's resized to 800x400 irrespective of the configuration. This was reproducible in Firefox and Chrome. Reviewing the issue now.

This was due to devicePixelRatio being 2 for the Mac laptop screen and 1 on external monitors. Restricting the canvas to the configured size will keep it bound within the modal.

…the canvas for devices with higher DPI screens only affecting macs
… until the canvas is actually changed. Upgraded atrament to the latest
@deanhannigan
Copy link
Contributor Author

@aptkingston @mike12345567 added a fix for the issue around clicking on the canvas. The issue manifests itself if you click in exactly same area without moving. I added a check for where the last draw ended and where the pointer is on click. If they match exactly, the draw behaviour will be canned and the odd lines wont appear.

@aptkingston
Copy link
Member

@aptkingston @mike12345567 added a fix for the issue around clicking on the canvas. The issue manifests itself if you click in exactly same area without moving. I added a check for where the last draw ended and where the pointer is on click. If they match exactly, the draw behaviour will be canned and the odd lines wont appear.

Ah I see - I think the common manifestation of this is then if you have never clicked yet, it treats it as if you've clicked in the same area since your reference point is null.

@deanhannigan deanhannigan requested a review from adrinr May 17, 2024 16:17
@deanhannigan deanhannigan dismissed adrinr’s stale review May 20, 2024 11:05

Requested refactoring has been complete

@deanhannigan deanhannigan merged commit d8113dd into master May 20, 2024
10 checks passed
@deanhannigan deanhannigan deleted the feature/signature-field-and-component branch May 20, 2024 11:05
@github-actions github-actions bot locked and limited conversation to collaborators May 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-branch Release this PR code into a feature branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants