creecros / MetaMagik

Custom Fields for Kanboard - Plugin MetaMagik
MIT License
99 stars 16 forks source link

Longer text and text size limit in form #54

Closed sulazix closed 4 years ago

sulazix commented 4 years ago

Thanks a lot for this incredible plugin !

It could be great to be able to add "textarea" type field with MD support, the standard "text" field is quiete short and not readable friendly for long text.

Maybe also add a size="..." or maxlength="..." in form attribute for text field to limit size of text in form to be equal with the DB size limit

Best regards, Robin

cjohnsonuk commented 4 years ago

Plus 1 vote for text area. I'm trying to record "Recognised Risks" and "Measures to Address Known Risks" against each task. Ideally this would be in a table format to match up each risk with how we are dealing with it and be able to add as many of these pairs as required like comments are added. Until this is possible having text areas where we can add one risk per line is an acceptable interim.

creecros commented 4 years ago

537ffba541ea6c5b71f44b1d3c9e4f1dfabe4d93

added textarea.

creecros commented 4 years ago

feature added. textarea is now a field "type" and markdown will be applied on the summary/details page of the task, but not when editing. There is no min/max limit.

edit: I say there is no limit, but Kanboards Schema for metadata value will provide a limit, i.e.:

https://github.com/kanboard/kanboard/blob/c238a3f10841d958e9ff8e6f2a8cceb9797f61a9/app/Schema/Mysql.php#L609 https://github.com/kanboard/kanboard/blob/c238a3f10841d958e9ff8e6f2a8cceb9797f61a9/app/Schema/Sqlite.php#L454 https://github.com/kanboard/kanboard/blob/c238a3f10841d958e9ff8e6f2a8cceb9797f61a9/app/Schema/Postgres.php#L499

so, Mysql DB will have a 255 char limit, but Sqlite will not, Postgres will.

You could change the type for Mysql or Postgres to remove the 255 char limit. I could have added a Schema update to do so for those DB's, but, MetaMagik was never a tool intended to change Kanboards native use of Metadata, it was simply to utilize it. So, I will leave that change up to people who wish to remove that limit, to do so, themselves.