Modify

Opened 15 years ago

Closed 12 years ago

#4848 closed defect (fixed)

[Patch] Previewing the edited section shows the whole page, instead of showing the preview of just the edited section.

Reported by: Mark Kharitonov Owned by: Catalin BALAN
Priority: high Component: SectionEditPlugin
Severity: major Keywords:
Cc: Trac Release: 0.11

Description

I am editing a section using the edit button enabled by the plugin. When I wish to preview my changes, the previewer displays the whole page, instead of just the section being edited. This is clearly a bug, because it effectively terminates the usefulness of the feature.

Attachments (3)

preview-section.patch (1.3 KB) - added by Michael Ching 15 years ago.
Preview Page.png (3.1 KB) - added by Ryan J Ollos 14 years ago.
Preview Page.2.png (3.1 KB) - added by Ryan J Ollos 14 years ago.

Download all attachments as: .zip

Change History (21)

comment:1 Changed 15 years ago by Mark Kharitonov

Summary: Previewing the edited section shows the whole page, instead showing just the preview of the just the edited section.Previewing the edited section shows the whole page, instead showing the preview of just the edited section.

comment:2 Changed 15 years ago by Mark Kharitonov

Summary: Previewing the edited section shows the whole page, instead showing the preview of just the edited section.Previewing the edited section shows the whole page, instead of showing the preview of just the edited section.

Changed 15 years ago by Michael Ching

Attachment: preview-section.patch added

comment:3 Changed 15 years ago by Michael Ching

Attached patch which adds "preview_whole_page" setting. When set to false, the preview is restricted to the section being modified only.

comment:4 Changed 15 years ago by Ryan J Ollos

Cc: ryano@… added; anonymous removed

comment:5 Changed 15 years ago by Mark Kharitonov

Thanks mkc. Works great, although I would suggest (and that's what I actually did on my trac install) to change the default of preview_whole_page from True to False, since it makes more sense to preview just the section when editing just the section. Are you going to merge the change in the trunk for the plugin? Because currently it is not there. Thanks, again.

comment:6 Changed 15 years ago by anonymous

The patch works and really enhances usability. Sadly, the Image macro does not work in the section preview. The error is

sequence item 0: expected string, NoneType found

comment:7 Changed 15 years ago by Ryan J Ollos

I can confirm the same problem with the Image macro.

comment:8 Changed 15 years ago by Ryan J Ollos

Cc: Ryan J Ollos added; ryano@… removed

comment:9 Changed 15 years ago by Ryan J Ollos

Summary: Previewing the edited section shows the whole page, instead of showing the preview of just the edited section.[Patch] Previewing the edited section shows the whole page, instead of showing the preview of just the edited section.

Hello cbalan,

Would it be possible to have this integrated into the repository? I'd like to provide some additional fixes for this plugin and it will be more straightforward than to have multiple patches that are dependent on one another.

comment:10 Changed 15 years ago by Ryan J Ollos

One issue with the patch is that it sometimes causes the last line in the section to be replicated.

For instance, suppose my section is composed of:

line1
line2
line3
line4

After several edits and saves, I end up with something like:

line1
line2
line3
line4
line4
line4

However, the number of times the line is replicated doesn't seem to directly correspond to the number of saved revisions.

comment:11 in reply to:  10 Changed 14 years ago by Ryan J Ollos

Replying to rjollos:

One issue with the patch is that it sometimes causes the last line in the section to be replicated.

Someone reported this behavior in #6169, so it may be unrelated to this patch.

comment:12 Changed 14 years ago by Catalin BALAN

(In [7117]) Applied preview whole page patch. Thank you mkc, rjolls. Refs #4848

comment:13 in reply to:  12 ; Changed 14 years ago by Catalin BALAN

Status: newassigned

Replying to cbalan:

(In [7117]) Applied preview whole page patch. Thank you mkc, rjolls. Refs #4848

Hey Guys,

What do you think about moving the preview_whole_page option to wiki edit page ? In this way, the user could switch the preview whole page on and off while editing/previewing

Thank you, Catalin Balan

comment:14 in reply to:  13 Changed 14 years ago by Ryan J Ollos

Cc: anonymous added; Ryan J Ollos removed

Replying to cbalan: What do you think about moving the preview_whole_page option to wiki edit page ? In this way, the user could switch the preview whole page on and off while editing/previewing

I'd find that feature to be useful.

comment:15 in reply to:  13 Changed 14 years ago by Ryan J Ollos

Replying to cbalan:

What do you think about moving the preview_whole_page option to wiki edit page ? In this way, the user could switch the preview whole page on and off while editing/previewing

Would it be alright with you if we closed this ticket and opened another for this additional feature? That way it will be obvious to anyone that the patch has been incorporated into the trunk.

comment:16 in reply to:  13 ; Changed 14 years ago by Ryan J Ollos

Replying to cbalan:

What do you think about moving the preview_whole_page option to wiki edit page ? In this way, the user could switch the preview whole page on and off while editing/previewing

I've been thinking about this. It might be better to add a Preview Section button next to the Preview Page button, rather than having a checkbox to toggle preview section / page.

Currently we have:

We could have:

Preview Page | Preview Section | Review Changes

Changed 14 years ago by Ryan J Ollos

Attachment: Preview Page.png added

Changed 14 years ago by Ryan J Ollos

Attachment: Preview Page.2.png added

comment:17 Changed 14 years ago by Ryan J Ollos

Well, image didn't seem to upload correctly, but I'm sure you get the idea.

comment:18 in reply to:  16 Changed 12 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

Replying to rjollos:

I've been thinking about this. It might be better to add a Preview Section button next to the Preview Page button, rather than having a checkbox to toggle preview section / page.

The preview page button seems like feature bloat. If the user chooses to edit a section, they should only see that section when previewing.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Catalin BALAN.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.