You are here: Foswiki>Tasks Web>Item13662 (10 Oct 2015, GeorgeClark)Edit Attach

Item13662: EditRowPlugin does not leave at least one space in an empty cell.

pencil
Priority: Normal
Current State: Closed
Released In: 2.0.2
Target Release: patch
Applies To: Extension
Component: EditRowPlugin
Branches: master
Reported By: KennethLavrsen
Waiting For:
Last Change By: GeorgeClark
EditRowPlugin does not leave an empty space in an empty cell like EditTablePlugin does

This creates a lot of unwanted merge situations.

I have two very common use cases where this becomes a problem.

One is the collection of major milestones in the managers hotlines.

We have schedules that look like this

Milestone PlannedSorted ascending Actual Status
Goal 1
03 Jun 2014
03 Jun 2014
Complete
Goal 2
03 Sep 2014
02 Sep 2014
Complete
Goal 3
17 Nov 2014
17 Nov 2014
Complete
Goal 4
26 Nov 2014
 
 
Goal 5
01 Feb 2015
 
 

We have two ways to use these.

INCLUDE where we set %INCLUDE{"SomeScheduleTopic" EDITTABLE=""}%

This is a simple way to hide the EDITTABLE macro so the reports for the managers do not have any edit buttons for the tables. In this case any empty cells without at least one space get merged with the previous cell and it looks bad. It is therefore important that EditRowPlugin leaves an empty space in an empty cell.

The other use case is where we use a SEARCH and pick up only the milestones highlighted as major. We simply use the italic milestones for this.

%SEARCH{"^\| *?_[^\|]*?_ *?\|[^\|]*?\|[^\|]*?\|[^\|]*?\|"
  topic="SomeScheduleTopic"
  regex="on"
  nonoise="on"
  casesensitive="on"
  multiple="on"
  format="| $pattern(.*?\| *?(_[^\|_]*?_) *?\|.*) $pattern(.*?\|[^\|]*?(\|[^\|]*?\|[^\|]*?\|[^\|]*?\|).*)"
}%

And again. The result is a table where EDITTABLE macro is active. And if there are no spaces in empty cells the cells make ugly unwanted merges.

Here is an example of how bad the result is (you cannot see the bad here on f.o because the old ERP bug is still active and hit the table below

Milestone PlannedSorted ascending Forecast/Actual Status
Goal 1
03 Jun 2014
03 Jun 2014
Complete
Goal 2
02 Sep 2014
02 Sep 2014
Complete
Goal 3
17 Nov 2014
17 Nov 2014
Complete
Goal 4
26 Nov 2014
26 Nov 2014
Complete
Goal 5
08 Sep 2015
 
 

Here is a screenshot of the bad table

badtable.png

-- KennethLavrsen - 02 Sep 2015

The plugin behaves strangely. If there is a space already around the text and I clear the field it saves the empty cell with spaces. If I create a new row, then the cells are empty and no matter what I fill in them, they will not have spaces before or after. If I clear the cell the cell will be empty with no space. There is no real consequence or logic in it. The users are going to be editing and saving all the time trying to make sense in it and they will not be able to get whitespace in a cell any other way than Edit Wikitext and add the darn spaces. The plugin should leave one space behind if you edit a cell or clear it. And when it adds a new row it should not create empty cells with no space.

-- KennethLavrsen - 02 Sep 2015

The reason it worked the way it did was to let you merge empty cells. I have changed it to work the way you suggest, though there may be cases not described herein that do not work for you. Please check and raise a new report describing the specific cases.

-- Main.CrawfordCurrie - 28 Sep 2015 - 08:33
 

ItemTemplate edit

Summary EditRowPlugin does not leave at least one space in an empty cell.
ReportedBy KennethLavrsen
Codebase
SVN Range
AppliesTo Extension
Component EditRowPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins distro:aeb5dd16a31e
TargetRelease patch
ReleasedIn 2.0.2
CheckinsOnBranches master
trunkCheckins
masterCheckins distro:aeb5dd16a31e
ItemBranchCheckins
Release01x01Checkins
I Attachment Action Size Date Who Comment
badtable.pngpng badtable.png manage 19 K 02 Sep 2015 - 09:07 KennethLavrsen  
Topic revision: r7 - 10 Oct 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy