iragm / fishauctions

Run online and in-person auctions
https://auction.fish
GNU General Public License v2.0
11 stars 2 forks source link

Customize what gets printed on a lot label #238

Closed iragm closed 3 weeks ago

iragm commented 1 month ago

This was originally requested by @kmur as part of #122, but it's different enough that it needs its own discussion.

Would it be possible to configure the system to allow users to choose which fields to add to the label? Labels of different sizes have more space for additional fields such as the description, donation (Y/N), QR code, category, auction name (or date), reserve price, seller email, etc.

Another club has requested

Would it be possible at some point in the future to be able to customize what prints on the label ?

Example for our auction we would not want the minimum bid – ( everything is minimum bid 1 dollar) to print, but would like the category would be helpful, as scientific name is not an available option. Without digging in more to how you have the report setup ( eg built on a crystal report or similar report building software) to generate the label

Having scientific name added in would help since common names can be all over the place with the names but that is an enhancement request for the future.

The main issue here is that the requirements need to be set on a per-auction basis, but users print on all different label types. To illustrate with an example:

Bob adds lots to an auction that requires printing lot number, lot name, quantity, and description. Bob prints on small Avery labels, which have just enough space for the lot number and name. What should happen to the stuff that doesn't fit?

And related to this, the description field can be up to 10000 characters long, too big to fit on even large thermal labels. Should it just get cut off? That seems bad.

Certainly, you can reprint the labels for your users when they arrive, but that defeats a lot of the advantage to preregistering lots. Comments on this are appreciated.

@jamescurtin what does BAS use/need for labels?

kmur commented 1 month ago

Bob adds lots to an auction that requires printing lot number, lot name, quantity, and description. Bob prints on small Avery labels, which have just enough space for the lot number and name. What should happen to the stuff that doesn't fit? And related to this, the description field can be up to 10000 characters long, too big to fit on even large thermal labels. Should it just get cut off? That seems bad.

Seconding the suggestion that some of the fields can be cut based on the club's needs. Eg. Our club does not use the Quantity field but it's required.

A few ideas on accommodating limited space:

iragm commented 1 month ago

Just to give an update on this: The PDF engine used (ReportLab) is an absolute nightmare for label generation, a lot of stuff that seems like it should work (like auto-scaling of Flowables to fit in a table cell) is just plain wrong. It's likely that my poor understanding of ReportLab is to blame, but ChatGPT doesn't seem to be any more skilled than I am at getting things to work. I'm ripping it out and replacing it with a different library (WeasyPrint, which has its own set of idiosyncrasies like pinning pydyf==0.8.0, (edit: and this nonsense with page breaks not working) but seems pretty solid).

Given the scale of this change, and that there's several large auctions scheduled for the next few days, I really don't want to break label printing. So, this is on hold for at least a week, probably two.

For long descriptions the option to "spill over" onto additional labels. Eg. Lot 101 (pg 1/3), Lot 101 (pg 2/3), Lot 101 (pg 3/3).

This is brilliant, I think it'll take care of things perfectly. Resizing doesn't really work as people can't read smaller fonts, and the character counter/soft limit will just confuse people.

iragm commented 3 weeks ago

This is now the third major rewrite of label printing. The following changes have been made:

Fun stats: label printing is not very popular. Only 144 users have printed labels. Of those:

These data are not entirely accurate because the system does not record who prints the label -- perhaps most people are simply getting their labels printed after they get to the club auction, I know this is the case for our club.

You can definitely still create all sorts of issues with the system as is, for example, a custom lot number that's 9 characters long will run over into the lot name. No one is currently customizing lot numbers, and I'll probably remove the ability to change them at all in the future.

Still having trouble? Drop a comment below and see if you can get me to go for a fourth major rewrite of label printing!