edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] Bringing Delete Back
@ 2015-09-15 15:50 Karl Dahlke
  0 siblings, 0 replies; only message in thread
From: Karl Dahlke @ 2015-09-15 15:50 UTC (permalink / raw)
  To: Edbrowse-dev

Here are some thoughts on bringing the d command back in browse mode.
Every implementation has some caveats on certain web pages.
We just have to be ok with that.

When a line is deleted, mark all nodes on that line as deleted,
or invisible or some such.
Also mark any descendant nodes of these nodes.
They might not appear on the page at this time,
but innerHTML could add text to them later, and then they would
appear on the page, and we don't want that, since we deleted
the structure that contains it.
With nodes so marked, they would not render, and the line would not reappear.

It would be difficult, though not impossible, to undo this change.
Very likely there would be no undo command.
This is not unusual.
Delete in directory mode deletes the file,
and delete in database mode deletes the row, and there is no undo.
So I think this is ok.
You can always rebrowse or refresh the page if you screwed up.

The last node deleted could extend well beyond the current line.
It could be a preformatted <pre> poem that goes on for 3 pages.
So you delete a line and after rerender, or any javascript action,
the whole poem is gone.
This seems to be quite rare.
A web page can barely put to words together without changing font or style or something.
So I think this would be a very rare case, I'm just saying it could happen.

On the other side, if you delete the fifth line from a preformatted poem,
you haven't deleted any nodes, and upon rerender the entire poem reappears,
including the line you deleted.
Again I think this is rare.
In practice people delete entire blocks or logical sections from a web page,
not the middle of a paragraph.

I'll continue to think about this and other d implementations for a bit.

Karl Dahlke

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-15 15:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-15 15:50 [Edbrowse-dev] Bringing Delete Back Karl Dahlke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).