Modify

Opened 3 years ago

Last modified 5 months ago

#8971 reopened defect

Enabling the hide rule wide textarea fields are not automatically put on their own lines

Reported by: sue.sml2006@… Owned by: robguttman
Priority: normal Component: DynamicFieldsPlugin
Severity: normal Keywords:
Cc: jbeilicke 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 (5)

trac_hide_disabled.png (158.4 KB) - added by sue.sml2006@… 3 years ago.
modify area when hide is disabled (i.e. how it should look)
trac_hide_disabled.2.png (158.4 KB) - added by sue.sml2006@… 3 years ago.
modify area when hide is disabled (i.e. how it should look)
trac_hide_enabled.png (151.3 KB) - added by sue.sml2006@… 3 years ago.
when hide is enabled, the "investigation_notes" field ends up in the right hand column
disable.patch (491 bytes) - added by fleeblewidget@… 3 years ago.
Workaround
enableHideRule.png (87.8 KB) - added by sue.sml2006@… 2 years ago.

Download all attachments as: .zip

Change History (15)

Changed 3 years ago by sue.sml2006@…

modify area when hide is disabled (i.e. how it should look)

Changed 3 years ago by sue.sml2006@…

modify area when hide is disabled (i.e. how it should look)

Changed 3 years ago by sue.sml2006@…

when hide is enabled, the "investigation_notes" field ends up in the right hand column

comment:1 Changed 3 years ago by sue.sml2006@…

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 3 years ago by jbeilicke

  • Cc jbeilicke added

Changed 3 years ago by fleeblewidget@…

Workaround

comment:3 Changed 3 years ago by fleeblewidget@…

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 3 years ago by robguttman

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 3 years ago by robguttman

(In [11002]) refs #8971: now handles layout of textarea custom fields.

comment:6 Changed 3 years ago by robguttman

  • Resolution set to fixed
  • Status changed from new to 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 2 years ago by sue.sml2006@…

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 2 years ago by sue.sml2006@…

comment:8 follow-up: Changed 2 years ago by 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)

comment:9 in reply to: ↑ 8 Changed 10 months ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to 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:10 Changed 5 months ago by rjollos

In 13650:

Bump version to 1.2.4. Refs #11378, #11118, #11523, #10126, #9605, #9986, #9996, #8971.

Add Comment

Modify Ticket

Action
as reopened .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.