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
Add a Left Sidebar for Placing Schemas #400 #452
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Ignored Deployments
|
Hi @peteward, |
const initialTop = (active.rect.current.initial?.top || 0) - rect.top; | ||
const initialLeft = (active.rect.current.initial?.left || 0) - rect.left; | ||
const _scale = scale < 1 ? scale + 1 : scale; | ||
const adjust = 0.915; // TODO: Investigate later as to why it needs to be adjusted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When dragging an element to the bottom of the page, its position gets misaligned.
Furthermore, if the page is zoomed in, the misalignment becomes even greater.
However, I have determined that this issue does not qualify as a release blocker, and we can fix it in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very cool!
I would be happy to look at the positioning issues soon if you like?
@@ -27,6 +28,12 @@ import Root from '../Root'; | |||
import ErrorScreen from '../ErrorScreen'; | |||
import CtlBar from '../CtlBar'; | |||
|
|||
const px2mm = (px: number): number => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we already have px2mm in the image schema, should we add it to the common/helper.ts file where the other conversion functions are?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes. It should be.
defaultSchema: { | ||
type: 'signature', | ||
// icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-pen"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"/></svg>', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you intend to leave this commented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is example if not set icon, left sidebar icon will be plugin's Key text
Co-authored-by: Peter Ward <pete@pennyblack.io>
Thank you @peteward !
Oh god. Please look this problem. |
Sure, let's get this merged into |
* Reconsider the internal data types and the template types (#389) * Change SchemaForUI's data and readOnlyValue to content * Fix bug * Remove sampledata and instead always use content. & Use content regardless of readOnly or not. & Eliminate defaultValue and replace it with always using content. * Change website template * Fix placeholder bug * Change generator test template * Change content to optional * Move getInputFromTemplate to common * Remove columns * Fix test * move dynamictable.excalidraw * remove idea dir * New basePdf type and Support adding new pages to template (#394) * Minor fix * IMPL Support adding new pages to template #111 * Fix test * Minor fix * IMPL padding behavior * Update snapshot * Minor fix * Update snapshot * add i18n * remove option from BlankPdf.padding * Minor fix * Minor fix * format * Add changeSchemas unit test (#403) * Minor fix * Add a version number to pdfme template from V4 onwards (#404) * Impl * Minor fix * Padding move width (#407) * Refactor position and size handling in helper.ts * Fix bug * Add DynamicTable Schema #332 (#408) * [tmp] add some comment * Update snapshot * Add deploy-table script to package.json * add new template for playground * bug fix for form * fix cell editing bug * Fix Adding rows doesn't change the overall height of the table * fix padding problem * Fix build error * Fix bug * Minor fix * Fix New lines not reflecting correctly * minor fix * Minor fix * Change tableStyles def * add i18n * small bugfix * FIx some TODO * Remove japanese comment * Minor fix * Fix infinity loom for form * fix save inputs bug * fix window resize bug * add skip for failing test and update snapshot * Minor fix * add presets for playground * Minor fix * Reconsider the internal data types and the template types (#389) * Change SchemaForUI's data and readOnlyValue to content * Fix bug * Remove sampledata and instead always use content. & Use content regardless of readOnly or not. & Eliminate defaultValue and replace it with always using content. * Change website template * Fix placeholder bug * Change generator test template * Change content to optional * Move getInputFromTemplate to common * Remove columns * Fix test * move dynamictable.excalidraw * remove idea dir * New basePdf type and Support adding new pages to template (#394) * Minor fix * IMPL Support adding new pages to template #111 * Fix test * Minor fix * IMPL padding behavior * Update snapshot * Minor fix * Update snapshot * add i18n * remove option from BlankPdf.padding * Minor fix * Minor fix * format * Add changeSchemas unit test (#403) * Minor fix * Add a version number to pdfme template from V4 onwards (#404) * Impl * Minor fix * Padding move width (#407) * Refactor position and size handling in helper.ts * Fix bug * Add DynamicTable Schema #332 (#408) * [tmp] add some comment * Update snapshot * Add deploy-table script to package.json * add new template for playground * bug fix for form * fix cell editing bug * Fix Adding rows doesn't change the overall height of the table * fix padding problem * Fix build error * Fix bug * Minor fix * Fix New lines not reflecting correctly * minor fix * Minor fix * Change tableStyles def * add i18n * small bugfix * FIx some TODO * Remove japanese comment * Minor fix * Fix infinity loom for form * fix save inputs bug * fix window resize bug * add skip for failing test and update snapshot * Minor fix * add presets for playground * Minor fix * Minor fix * Update imports and fix font rendering * Add a Left Sidebar for Placing Schemas #400 (#452) * Remove original 'Add new field' Button * add icon * FIx drag position bug * Minor fix * Fix sidebar position * Update snapshot * Minor fix * Update packages/ui/src/components/Designer/index.tsx Co-authored-by: Peter Ward <pete@pennyblack.io> --------- Co-authored-by: Peter Ward <pete@pennyblack.io> * Fix test * Improve left sidebar icon drop placement accuracy (#454) * Fix Spanish translations for v4 (#463) * Fix #431 * V4 (#467) * feat: add french language * feat: relecture * feat: add french language --------- Co-authored-by: regis <regis> * Add French language option to playground * rename table export name to tableBeta --------- Co-authored-by: Peter Ward <pete@pennyblack.io> Co-authored-by: Iker Diez <32014358+ikerd@users.noreply.github.com> Co-authored-by: Régis <regis.charnace@leandco.fr>
ref: #400