#8971 closed defect (fixed)
Enabling the hide rule wide textarea fields are not automatically put on their own lines
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Component: | DynamicFieldsPlugin |
Severity: | normal | Keywords: | |
Cc: | Jan Beilicke | Trac Release: | 0.12 |
Description
Using Trac 0.12.2, dynamic fields 1.2.1 I have a 60 column wide textarea field that ends up in the right hand column either in the yellow "view ticket" area or in "modify ticket" area (but never both at the same time) when I have the hide rule enabled. Doesn't seem to matter if i'm using the hide_always rule or not, just enabling the rule causes this strangeness. Attaching two screenshots, only difference is enabling the hide component.
Attachments (6)
Change History (35)
Changed 13 years ago by
Attachment: | trac_hide_disabled.png added |
---|
Changed 13 years ago by
Attachment: | trac_hide_disabled.2.png added |
---|
modify area when hide is disabled (i.e. how it should look)
Changed 13 years ago by
Attachment: | trac_hide_enabled.png added |
---|
when hide is enabled, the "investigation_notes" field ends up in the right hand column
comment:1 Changed 13 years ago by
I've been able to hide fields using the blackmagictweaks plugin, but your hide_always option works much better for hiding from query pages, so I would prefer to get this working if possible.
comment:2 Changed 13 years ago by
Cc: | Jan Beilicke added; anonymous removed |
---|
comment:3 Changed 13 years ago by
I had this problem too. I found that disabling the bit of code that re-calculates layout when fields are hidden made it go away. Although not a perfect solution, this is a reasonable workaround. Simply delete or comment out the following lines from htdocs/layout.js:
// get new field order var new_fields = jQuery.merge(visible, hidden); // warning: side-effects! // order the fields this.order_fields(new_fields);
Diff attached.
comment:4 Changed 13 years ago by
Sue et al, I see. As @fleeblewidget figure out, I dynamically change the layout to fill gaps left by hidden fields. I've never used textarea custom fields before - I didn't even know they were available! - and so missed this when designing the layout algorithm.
It seems textarea fields need to enjoy their own row and not be crammed into one column or the other. I'll see if I can change the layout algorithm to accommodate.
comment:5 Changed 13 years ago by
comment:6 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Sue / fleeblewidget - I think I may have solved this one. Please give it a try and let me know. Reopen this ticket if it's not quite right for you.
comment:7 Changed 12 years ago by
Hi Rob, I finally got around to trying this and I dont see any change, I'm not sure I've included your code correctly. The fields still end up in the wrong spot as soon as i enable the hiderul. I am using a shared plugins folder, and I downloaded the latest plugin into my main projects plugins directory and ran setup.py install again, is it possible it's using some cached version of the plugin? how can I ensure it's using the latest? Thanks, sue
Changed 12 years ago by
Attachment: | enableHideRule.png added |
---|
comment:8 follow-up: 9 Changed 12 years ago by
Hi Rob, I was able to use fleeblewidget's workaround. For whatever reason, any update you implemented did not fix the problem (I did figure out how to ensure my plugin was not cached)
comment:9 Changed 11 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Replying to sue.sml2006@…:
Hi Rob, I was able to use fleeblewidget's workaround. For whatever reason, any update you implemented did not fix the problem (I did figure out how to ensure my plugin was not cached)
Same problem. Will reopen.
comment:11 Changed 10 years ago by
I am using version 2.2.0 of the plugin, with Trac 1.0.1, and I think I am experiencing the same thing. My situation looks like the attached screen shots.
More detail:
- If I have a textarea custom field that has EXACTLY an even number of fields that are displayed prior to it (laid out above it) in the edit area of the ticket, then things behave. If I have an ODD number of fields above, then the textarea doesn't jump to a new row; I tried several variations and even saw it become the third column (<TD>) in the HTML row at one point. If I turn off the plugin, this behavior doesn't happen, this textarea that is 60 characters wide always gets to start a new row.
- Even if I have an exact even number of fields laid out above this textarea, any time that the plugin causes any field to be hidden (using the hide rule), then the textarea misbehaves in the same way. In other words, if any field is hidden, I see the layout error, whether having an even or odd count of prior fields shown in the edit area.
comment:12 Changed 10 years ago by
Cc: | Ryan J Ollos added |
---|
comment:13 Changed 6 years ago by
Owner: | Rob Guttman deleted |
---|---|
Status: | reopened → new |
comment:14 Changed 4 years ago by
Cc: | Ryan J Ollos removed |
---|
comment:15 Changed 4 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Textareas are put on their own line now. Tested with 1.4-stable and r17720.
Changed 4 years ago by
Attachment: | 2020-10-13T19:59:21+02:00.png added |
---|
comment:16 follow-up: 17 Changed 4 years ago by
For information, it looks like I still get the same problem with TracDynamicFields-2.6.0.dev0 (r17865) and Trac 1.0.2 as seen in the attached image.
comment:17 follow-up: 18 Changed 4 years ago by
Replying to anonymous:
For information, it looks like I still get the same problem with TracDynamicFields-2.6.0.dev0 (r17865) and Trac 1.0.2 as seen in the attached image.
Did you recently upgrade TracDynamicFields? It looks like you may need to redeploy or refresh static resources: TracUpgrade#a5.Refreshstaticresources.
Please upgrade to Trac 1.0.20. I'm not able to support such old versions of Trac.
comment:18 follow-up: 19 Changed 4 years ago by
Replying to Ryan J Ollos:
Please upgrade to Trac 1.0.20. I'm not able to support such old versions of Trac.
Yes of course you're right. I'll keep you postponed if something is still wrong after update by the instance owner. Thank you very much for your time.
comment:19 Changed 4 years ago by
Replying to mathieu@…:
Yes of course you're right. I'll keep you postponed if something is still wrong after update by the instance owner. Thank you very much for your time.
Happy to help and I'll keep an eye out for a follow-up.
comment:20 Changed 4 years ago by
I just tried with trac 1.0.20 and I have the same problem. Do you have any insight to what I shall look for in order to troublehot the problem ?
comment:21 follow-up: 22 Changed 4 years ago by
Did you try refreshing your browser cache and refreshing static resources?
comment:22 Changed 4 years ago by
Replying to Ryan J Ollos:
Did you try refreshing your browser cache and refreshing static resources?
Yes I refreshed my browser cache (Ctrl+R and event disable caching in webdev console) and If I understand well I don't think that refreshing static resources applies as the trac is served by a standalone tracd
command.
comment:23 Changed 4 years ago by
If you post your [ticket-custom]
section I can do some testing. I'm probably going to drop support for Trac < 1.2 soon.
comment:25 Changed 4 years ago by
Sorry for the delay, I was offline for a week. Here is the ticket-custom session.
[ticket-custom] analyse = textarea analyse.cols = 83 analyse.format = wiki analyse.label = Analyse analyse.order = 95 analyse.value = Mettez ici la justification si cette règle n'a pas été modélisée analyse.show_when_type = task chrono = text chrono.format = plain chrono.label = Chrono chrono.show_when_type = delivery chrono.clear_on_hide = false complete = select complete.order = 10 complete.label = Completed [%] complete.options = 0|5|10|15|20|25|30|35|40|45|50|55|60|65|70|75|80|85|90|95|100 complete.order = 10 complete.show_when_type = task date_prevue = text date_prevue.date = true date_prevue.date_empty = true date_prevue.label = Date prévue (Y-m-d) date_prevue.order = 40 date_prevue.show_when_type = delivery|action|output|input date_realisee = text date_realisee.date = true date_realisee.date_empty = true date_realisee.label = Date réalisée (Y-m-d) date_realisee.order = 99 date_realisee.show_when_type = meeting|risk|document|action|delivery|input|output #date_realisee.hide_when_type = task|defect|container date_realisee.clear_on_hide = false due_assign = text due_assign.date = true due_assign.date_empty = true due_assign.label = Date début (Y-m-d) due_assign.order = 30 date_realisee.hide_when_type = input|output model_verif = textarea model_verif.cols = 83 model_verif.format = wiki model_verif.label = Relecture du modèle model_verif.order = 96 model_verif.value = Relecture par XXX le XX/XX/201X sur le modèle XXXXXX. [éventuel commentaire] Bilan de la relecture NON OK/ OK. model_verif.show_when_type = task parent = text parent.format = wiki parent.label = Parent ID parent.order = 20 test_verif = textarea test_verif.cols = 83 test_verif.format = wiki test_verif.label = Relecture des tests test_verif.order = 97 test_verif.value = Relecture par XXX le XX/XX/201X sur le modèle XXXXXX. [éventuel commentaire] Bilan de la relecture NON OK/ OK. test_verif.show_when_type = task test_verif.clear_on_hide = true risk_proba = select risk_proba.label = Probability risk_proba.options = |Low|Medium|High risk_proba.show_when_type = risk risk_proba.clear_on_hide = true risk_impact = select risk_impact.label = Impact risk_impact.options = |Weak|Medium|Strong risk_impact.show_when_type = risk risk_impact.clear_on_hide = true version.hide_when_type=risk ref = text ref.label= Reference ref.show_when_type = input|output version.hide_when_type = input|output|meeting|risk|action
I'll try to migrate to 1.2, but it not so easy has the trac is in production and I don't want to brake things. But I'll set up a local instance to try anyway.
comment:28 Changed 4 years ago by
Resolution: | worksforme → fixed |
---|
Confirmed the issue, and should be fixed now.
comment:30 Changed 4 years ago by
I confirm it works.
Thank you very much again for your time and benevolent support !
modify area when hide is disabled (i.e. how it should look)