-
Notifications
You must be signed in to change notification settings - Fork 128
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
chore: Merge develop to main #268
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Instead of computing layout and then checking for overlaps, we can check for overlaps while computing layout. also, fixed bug in auto header / footer height calculation causing overlapping error. added 1px on both sides ( top/bottom ) of the table element.
moved computeRowElementDimensions & computeColumnLayout function calls inside computeRowLayout. this is cleaner code and will be better design to allow recursive layout parsing.
- Current Logic for dynamic containers is not recursive. It loops through the elements and compute possible rows then it loops again and compute possible columns. - This was less efficient, less flexible, and not recursive. Impact will be more apparent when we have multi pages and 100s to Elements. - Now, I have added recursive logic to handle nested dynamic containers. current implementation have 2 functions computeRowLayout and computeColumnLayout. this functions that call each other to create a recursive layout until it's not possible. first, we compute main layout where we split it into 3 sections ( header, body, footer). then we run these functions on each of these sections and save the layout. In theory, we can set dynamicHeight for any element as long as it's not overlapping.
if rectangle is only ( basically no element is overlapping with it) or last element inside row or column, row and column layout is computed for children. - if rectangle is overlapping with other element and we make it relative placement of other element will be broken so for now it is set to compute layout as per above condition created patch that will convert isDynamicHeight Boolean to heightType with value "fixed" or "auto". updated default objects and control in Properties Panel. changed schema version number to 1.2.0 as schema is changed and is incompatible with old formats (1.1.0) we need to handle old formats. updated jinja render template - modified relative_containers to be recursive - updated all templates to use heightType properties - updated logic to include min-height - added logic for backwards compatibility. - also introduced dynamic height for static text if it has parseJinja enabled. - updated rectangle template to be dynamic height misc: is_older_schema now handles really old formats which don't have schema_version reverted styles for relative column
added logic to run patches on output print_formats that are used by jinja when required
when patch was modified to also run on print_designer_print_formats field. i accidentally messed up lines and spacing, this commit fixes it. went unnoticed because the patch was already applied locally in the first run.
now that i am sorting elements by starting x and y position. it messes up the overlapping designs that people are creating. this will allow people to set the zIndex of the element.
instead of rendering template directly call the framework pdf_body_html function to render the html.
fixed html that was broken on modern browsers due to changes made by recursive containers PR.
well 0 is false in JS, so hurray. updated logic to check for int field type and return the value 0 if present instead of going to parent properties
* fix: patch utils for old patches As patch utils are used by all patches there isn't print_designer_print_format field when old patches are running and there is no need to try and update it. * chore: fix typo in patch utils * chore: added custom_field_patch in pre_model_sync * chore: moved introduce_dynamic_containers to pre_model_sync
we need to remove specific comparison of elements array in the code as now we are planning to create multi page structure.
In recent change we added 3 types of height fixed, auto, auto (min-height) so we converted property to string from boolean. check in dynamic text was for boolean so changed it to string comparison
Moved header / footer to separate doctype.
- added patch to convert all json to match new format with pages. - updated jinja formats to loop over pages and render them. - modified code to design multiple headers and footers. - added option to add new pages. - updated drag, resize, drop to work with multiple pages. - updated marquee tool. - added options to select headers / footers for first / last / odd /even pages - Changed Canvas to render multiple pages. - Header / footer now needs to designed separately.
element parent references causes circular import issue when we stringify with json.
old schema had isDynamicHeight so if heightType is not available we can use isDynamicHeight
there are times when DOM Reference is not available, so we need to check if it exists before accessing it
previously, we set the property in element but it is better to just check it in realtime.
- fix: commented out debugging code - fix: footer element positional values were incorrect - fix: overlapping elements were causing layout breaks - updated elementOverlapping code to only allow consider if element is directly overlapping (x,y axis) another element
- update print_designer_print_format to use the new object syntax
it still have some breaking issues so it's better to have a copy of the original format.
This reverts commit 1d5caf9.
This reverts commit c2121e8.
🎉 This PR is included in version 1.3.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.