Modify

Opened 6 years ago

Closed 3 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: markell Owned by: cbalan
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 mkc 6 years ago.
Preview Page.png (3.1 KB) - added by rjollos 5 years ago.
Preview Page.2.png (3.1 KB) - added by rjollos 5 years ago.

Download all attachments as: .zip

Change History (21)

comment:1 Changed 6 years ago by markell

  • Summary changed from Previewing the edited section shows the whole page, instead showing just the preview of the just the edited section. to Previewing the edited section shows the whole page, instead showing the preview of just the edited section.

comment:2 Changed 6 years ago by markell

  • Summary changed from Previewing the edited section shows the whole page, instead showing the preview of just the edited section. to Previewing the edited section shows the whole page, instead of showing the preview of just the edited section.

Changed 6 years ago by mkc

comment:3 Changed 6 years ago by mkc

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 6 years ago by rjollos

  • Cc ryano@… added; anonymous removed

comment:5 Changed 6 years ago by markell

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 5 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 5 years ago by rjollos

I can confirm the same problem with the Image macro.

comment:8 Changed 5 years ago by rjollos

  • Cc rjollos added; ryano@… removed

comment:9 Changed 5 years ago by rjollos

  • Summary changed from Previewing the edited section shows the whole page, instead of showing the preview of just the edited section. to [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 follow-up: Changed 5 years ago by rjollos

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 5 years ago by rjollos

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 follow-up: Changed 5 years ago by cbalan

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

comment:13 in reply to: ↑ 12 ; follow-ups: Changed 5 years ago by cbalan

  • Status changed from new to assigned

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 5 years ago by rjollos

  • Cc anonymous added; rjollos 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 5 years ago by rjollos

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 ; follow-up: Changed 5 years ago by rjollos

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 5 years ago by rjollos

Changed 5 years ago by rjollos

comment:17 Changed 5 years ago by rjollos

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

comment:18 in reply to: ↑ 16 Changed 3 years ago by rjollos

  • Resolution set to fixed
  • Status changed from assigned to closed

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.

Add Comment

Modify Ticket

Action
as closed The owner will remain cbalan.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.