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

Containers with relative positioning to solve overflow problem #102

Closed
maharshivpatel opened this issue Dec 8, 2023 · 8 comments
Closed

Comments

@maharshivpatel
Copy link
Collaborator

Biggest Limitation of Print Designer for now is Everything is Absolute positioned so we can't design formats that have huge difference it Information and or want to designer multi page formats.

Read this to understand the problem right now all elements in print designer are out of flow
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_flow_layout/In_flow_and_out_of_flow

Solution:
create a structure with combination of in_flow and out_of_flow elements with right balance so we can create as many pages as required.

biggest issue is to find a way to structure that it doesn't limit users ability to move elements everything that user have right now and add it in a way that it doesn't ruin the user experience.

@maharshivpatel maharshivpatel changed the title We need Dynamic Containers to solve Overflow problem Containers with relative positioning to solve overflow problem Dec 8, 2023
maharshivpatel added a commit to maharshivpatel/print_designer that referenced this issue Dec 13, 2023
There are many cases where you have more then 1 table.
we can't set relative postioning so i have added option to set primary table.
table set as primary will span accross multiple pages and will have dynamic height.

Actual Fix for this issue is frappe#102 but this is a workaround for now.
maharshivpatel added a commit that referenced this issue Dec 13, 2023
* fix: option to set primary table

There are many cases where you have more then 1 table.
we can't set relative postioning so i have added option to set primary table.
table set as primary will span accross multiple pages and will have dynamic height.

Actual Fix for this issue is #102 but this is a workaround for now.

* fix: update schema version for primary table

As we can't guess for the user which is primary table,
we need to apply logic only to new schema without changing old behavior.
@qsarthi
Copy link

qsarthi commented Jan 8, 2024

any more update here @maharshivpatel eagerly waiting for fixes . this is really critical

@maharshivpatel
Copy link
Collaborator Author

@qsarthi can you share your use case ? it will help with validating ideas as well.

@batonac
Copy link
Contributor

batonac commented Jan 8, 2024

I don't know if this is inter-related or not, but we have an issue where a rectangle and it's contents should be contained on a single page, but they're currently arbitrarily split between pages if pushed down by a table:
image
In this screenshot, the rectangle in question can be identified by the green border on the left side. The grey line in the middle is a page break, and the three lines of text on the second page are part of the design header. All of the contents of the rectangle should be kept together, ideally.

@qsarthi
Copy link

qsarthi commented Jan 9, 2024

@qsarthi can you share your use case ? it will help with validating ideas as well.

Basically in our case we have bundled products . For Delivery note Printing (applies to even other doc types) , we need to print table of bundled items and the table of individual item list (packed list) ..along with some comments like certain items have some minor issues... Currently i can set only one table as Primary ... One of Option you can consider is to allow having multiple primary/flex size blocks.. (not only table but even other types).

if too complex..for short time , may be allow a new type "page break" and allow one primary type in each page...

@maharshivpatel
Copy link
Collaborator Author

dynamic containers / relative positioning is now available on develop branch #205 .
better support will be added by #209 you can also checkout this branch and try it out this just have pdf table header issue.

please test and share your feedback.

@maharshivpatel
Copy link
Collaborator Author

🎉 This issue has been resolved in version 1.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@maharshivpatel
Copy link
Collaborator Author

closing as most of this is solved. if you face any specific issue please create a separate issue.

Thank you

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

3 participants