Ticket #740 (defect)

Opened 2 months ago

Last modified 2 months ago

Layout Problem with my Database

Status: closed (fixed)

Reported by: jagipson@pnplus.com Assigned to: bsag
Priority: normal Milestone:
Component: Design/Appearance Version:
Severity: normal Keywords:
Cc:

This seems to be affecting only me, and on all browsers (IE, FF, Safari). There's something about my personal setup that results in the new item form and lists (usually recognized as the right-hand column; the dark form for entering new items and the lists underneath it, which for the purposes of brevity in this ticket I will collectively refer to as "the form"). "The Form" appears below the "containers" (The collapsible groups of lists which make the left column, and the primary subject matter of any given page). "The Form's" right side is flush-right with the right side of the containers.

Attachments

track-layout.jpg (47.7 kB) - added by jagipson@pnplus.com on 06/20/08 14:25:53.
Two combined Screen shots of problem

Change History

06/20/08 14:25:53: Modified by jagipson@pnplus.com

  • attachment track-layout.jpg added.

Two combined Screen shots of problem

06/20/08 14:29:48: Modified by jagipson@pnplus.com

Refer to the attachment, which is a combination of two screenshots.

06/20/08 15:21:01: Modified by jagipson@pnplus.com

Additional observations:

The problem seems to be centered around my "Home" context (ID=2). When I hide the Home context, the problem resolves itself.

Other observations related to the "Home" context:

The "Completed actions" container normally manifests as a separate collapsible container. But when the "Home" context is visible, it appears as a *nested* container, inside the "Home" context's container.

06/20/08 15:48:39: Modified by jagipson@pnplus.com

ISSUE ROOT CAUSE

I found the problem. I had a task (in my Home context) that had a line break in the Description field. After deleting that task, the problem went away.

It would be nice to support having line breaks in the description field, however that could result in substantial problems for a very minor use case (namely me).

I recommend modifying validation in the Todo (model) class by adding something like:

validates_format_of :description, :with => /\A.*\z/i

I haven't tested the above, but the intention is to use validation to guarantee that a newline doesn't exist in :description. Additionally, it may be desirable to add something like:

@todo.description.tr!("\n", " ")

where @todo.save is called. The point being to replace newlines with spaces before validation occurs, to hopefully avoid the validation failure that having a newline would cause (if the above validation is added).

I hope this helps. My workload is 120% right now, or I would just submit a patch. I'm behind the curve learning git; so I need to clear that hurdle first.

cheers :)

06/20/08 20:16:34: Modified by lrbalt

are you sure it was a line break, i.e. <br/>?

I've had this before when the notes contained an extra </div> which messed up the containers around the note?

06/20/08 21:06:35: Modified by jagipson@pnplus.com

Offending HTML:

a href="/todos/84" class="icon delete_icon" id="delete_icon_84" title="delete the action 'Wrap Add note form in &lt;DIV&gt; and add link to toggle visibility. '">

Offending value in SQL Database:

Wrap Add note form in <DIV> and add link to toggle visibility.

How'd that DIV tag get in there? Based on that, I'd recommend running:

@todo.description = h @todo.description

Or something like that, before @todo.save.

07/04/08 12:04:09: Modified by lrbalt

  • status changed from new to closed.
  • resolution set to fixed.

fixed in a1072e0007fbc13931d2d592e3bf4136cbab54e7 by adding h to the _todo partial view