Opened 14 years ago
Last modified 2 years ago
#9619 reopened defect
Side-by-side editing fails if Preview significantly longer than source; needs smart, vertical locking!
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | low | Milestone: | 1.0 |
Component: | wiki system | Version: | 0.12-stable |
Severity: | major | Keywords: | side-by-side |
Cc: | Branch: | ||
Release Notes: |
Improved side-by-side Wiki page editing by making the editor side or the preview side scrollable (whichever is taller) |
||
API Changes: | |||
Internal Changes: |
Description
The side-by-side editing is rendered useless, if the Preview is significantly longer (due to large text, tables and inline images) than the source code. You might end up in a situation where the related source code to what you currently see in the Preview is 1 or 2 pages up the screen and it is currently impossible to see source code and related Preview together at once. This is a serious issue in my opinion.
You can make a simple test by positioning a few large images using [[Image(XYZ.jpg)]] underneath each other: The source code only takes a few lines, whereas the last image might by two screens down the window scroll bar.
A solution should look like this: The preview get dynamically positioned in such a way, that it (optionally) aligns vertically with the cursor position in the source code window, so that one really sees what one's editing.
Attachments (0)
Change History (11)
follow-up: 3 comment:1 by , 14 years ago
Component: | general → wiki system |
---|---|
Milestone: | → next-major-0.1X |
Priority: | high → low |
comment:2 by , 14 years ago
(and btw., the workaround I use in this situation is to disable the macros while doing the bulk of editing i.e. [[xxxImage(...)]]
; not optimal but works well most of the time)
comment:3 by , 14 years ago
Replying to cboos:
Sure, that would be a nice improvement. But to say this defect makes the side-by-side editing useless is a bit exaggerated: by the same measure, it would mean that the "normal" preview (vertically stacked edit on top of preview) is useless, as you also can't see both what you type and the preview in that mode, except for very small texts.
Well, side-by-side is definitely an improvement over the normal vertically arranged preview, but still: I soon as you begin embedding pictures or a formatted structure with headlines etc. you are entering the scroll-wheel hell and as longer the page becomes, as more difficult it becomes to find what you want to edit (it also would be nice if we'd see paragraph-limited editing similar to Wikipedia).
comment:4 by , 13 years ago
It would be great if the preview automatically aligned to what you are editing, but, simply, adding scroll bar to the preview area may work so that user can operate independently the source and the preview.
comment:5 by , 12 years ago
Solving this issue would be a very useful and time preserving enhancement!
comment:6 by , 12 years ago
Milestone: | next-major-releases → 1.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
As this was also a feature request from coworkers, I had a try, and as I was quite pleased with the results, I committed the fix in r11109.
Either the textarea or the wikipage preview expands to its natural height (whichever is shorter) and the other adapts accordingly and gets a scrollbar.
Tested with all browsers at my disposal IE9, Chrome 21, FF 13, Opera 12 and Safari 5.1.7 (Windows).
comment:7 by , 12 years ago
Owner: | set to |
---|
follow-up: 9 comment:8 by , 12 years ago
Release Notes: | modified (diff) |
---|
Note that this still doesn't work correctly in the presence of images (or other kind of delayed content)…
comment:9 by , 12 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Replying to cboos:
Note that this still doesn't work correctly in the presence of images (or other kind of delayed content)…
SO:910727 → http://api.jquery.com/load-event/ (the Caveat about img) and https://github.com/desandro/imagesloaded or https://github.com/alexanderdickson/waitForImages. Need to experiment a bit…
comment:10 by , 12 years ago
And even with no images, you can still have a "jump", moving your cursor out of sight. For example, when editing at the bottom of the text area and you delete some content.
comment:11 by , 9 years ago
Severity: | critical → major |
---|
Sure, that would be a nice improvement. But to say this defect makes the side-by-side editing useless is a bit exaggerated: by the same measure, it would mean that the "normal" preview (vertically stacked edit on top of preview) is useless, as you also can't see both what you type and the preview in that mode, except for very small texts.
Implementation idea: send the cursor offset; (WikiDom) have a function to retrieve the node corresponding to that offset, find the closest previous node with an id, send back the preview + that id; in the browser, update the anchor to that id.