aaFn / Bookmark-search-plus-2

Displays and filters bookmarks on search string, show parent folders. This is a Web Extension add-on version of the old "Bookmark search plus" XUL extension published by Alice0775, not working anymore in latest Firefox, and which was very useful.
114 stars 11 forks source link

Add Ctrl+Z and Ctrl+Y shortcut keys to BSP2 #75

Closed Muddy7 closed 1 year ago

Muddy7 commented 5 years ago

It would be nice if you could add the shortcut keys Ctrl+Z (for Undo) and Ctrl+Y (for Redo) to the keyboard options (carried forward, as requested by developer, from Issue #74 in order for this to be treated as a separate request)

Muddy7 commented 4 years ago

Btw I think the wording of my request should be slightly modified to: "You already have a 'Delete' option in the Context Menu. It would be great to also add an 'Undelete' option to that Context Menu."

aaFn commented 4 years ago

Helllo @Muddy7, as a matter of fact, I am considering to record all actions in an history, and then to show the history of actions in a pane in place of the search pane when needed, for the user to:

Ctrl-Z and Ctrl-Y would just be keyboard shortcuts to "navigate" the current position in that pane, even when it is not shown.

Let me know your thoughts.

Muddy7 commented 4 years ago

Sounds amazing!!

It sounds like a much more sophisticated (and snappier) version of what we had in the archives module of Xmarks Sync before that excellent FF add-on was tragically discontinued by LogMeIn. Brilliant idea!

Then the 'Undelete' button—if you decided to add that as well—would simply be another shortcut for going back to the immediate last state (or the last state +1/+2/+3/etc).

I like it :-))

Muddy7 commented 4 years ago

Great to see from the 2.0.74+ Release Notes ("2.0.71 Improvements") that this is an active project in progress 😀. Thanks!

aaFn commented 4 years ago

Hello @Muddy7, today with 2.0.76, I added a first significant step for that feature, which is the "Bookmark history" window.

It allows to examine the history of all recorded bookmark actions since 2.0.71 is out, as well as some meta actions (like BSP2 start, or reload).

It is only for browsing so far. No undo/redo operation available either for now, that will be a next step.

The window can be open from the context menu on the BSP2 icon in the toolbar, or from the magnifying glass search button menu in the sidebar.

Let me know here if anybody has problems with, or suggestions on, that new feature. AaFn.

Muddy7 commented 4 years ago

Nice. Very nice.

Thank you 😊. Very much.

I haven’t yet thought this (tentative) suggestion out clearly, but do you think it would be a good idea to have a display mode that is able to group together multiple changes to a single bookmark?

This could be effected by having the option to sort the changes:

Just an idea. But perhaps too complicated code-wise to make it worthwhile for the sake of this modest improvement? And I’m still not sure if it’s really desirable. Still thinking this through.

Keith

From: aaFn notifications@github.com Sent: 28 April 2020 16:53 To: aaFn/Bookmark-search-plus-2 Bookmark-search-plus-2@noreply.github.com Cc: Muddy7 keith.mills@ils-international.be; Mention mention@noreply.github.com Subject: Re: [aaFn/Bookmark-search-plus-2] Add Ctrl+Z and Ctrl+Y shortcut keys to BSP2 (#75)

Hello @Muddy7 https://github.com/Muddy7 , today with 2.0.76, I added a first significant step for that feature, which is the "Bookmark history" window.

It allows to examine the history of all recorded bookmark actions since 2.0.71 is out, as well as some meta actions (like BSP2 start, or reload).

So it is only for browsing then. No undo/redo operation available either for now, that will be a next step.

The window can be open from the context menu on the BSP2 icon in the toolbar, or from the magnifying glass search button menu in the sidebar.

Let me know here if anybody has problems with, or suggestions on, that new feature. AaFn.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aaFn/Bookmark-search-plus-2/issues/75#issuecomment-620656641 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCGKFZFLSH7CTBZRXGGLR3RO3UTFANCNFSM4GJRGRFQ . https://github.com/notifications/beacon/ADCGKF7DEJU4RU4LRCCNDFTRO3UTFA5CNFSM4GJRGRF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOET7HQAI.gif

Muddy7 commented 4 years ago

Changes in red for further clarity

From: Keith at ILS keith.mills@ils-international.be Sent: 30 April 2020 03:27 To: 'aaFn/Bookmark-search-plus-2' reply@reply.github.com Subject: RE: [aaFn/Bookmark-search-plus-2] Add Ctrl+Z and Ctrl+Y shortcut keys to BSP2 (#75)

Nice. Very nice.

Thank you 😊. Very much.

I haven’t yet thought this (tentative) suggestion out clearly, but do you think it would be a good idea to have a display mode that is able to group together multiple changes to a single bookmark?

This could be effected by having the option to sort the changes:

Just an idea. But perhaps too complicated code-wise to make it worthwhile for the sake of this modest improvement? And I’m still not sure if it’s really desirable. Still thinking this through.

Keith

From: aaFn <notifications@github.com mailto:notifications@github.com > Sent: 28 April 2020 16:53 To: aaFn/Bookmark-search-plus-2 <Bookmark-search-plus-2@noreply.github.com mailto:Bookmark-search-plus-2@noreply.github.com > Cc: Muddy7 <keith.mills@ils-international.be mailto:keith.mills@ils-international.be >; Mention <mention@noreply.github.com mailto:mention@noreply.github.com > Subject: Re: [aaFn/Bookmark-search-plus-2] Add Ctrl+Z and Ctrl+Y shortcut keys to BSP2 (#75)

Hello @Muddy7 https://github.com/Muddy7 , today with 2.0.76, I added a first significant step for that feature, which is the "Bookmark history" window.

It allows to examine the history of all recorded bookmark actions since 2.0.71 is out, as well as some meta actions (like BSP2 start, or reload).

So it is only for browsing then. No undo/redo operation available either for now, that will be a next step.

The window can be open from the context menu on the BSP2 icon in the toolbar, or from the magnifying glass search button menu in the sidebar.

Let me know here if anybody has problems with, or suggestions on, that new feature. AaFn.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aaFn/Bookmark-search-plus-2/issues/75#issuecomment-620656641 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCGKFZFLSH7CTBZRXGGLR3RO3UTFANCNFSM4GJRGRFQ . https://github.com/notifications/beacon/ADCGKF7DEJU4RU4LRCCNDFTRO3UTFA5CNFSM4GJRGRF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOET7HQAI.gif

Muddy7 commented 4 years ago

Or, better (regarding the second sort option below), to be able to click on a bookmark or a folder in the sidebar and see if, and if so what, changes have been made to it.

Keith

From: Keith at ILS keith.mills@ils-international.be Sent: 30 April 2020 03:29 To: 'aaFn/Bookmark-search-plus-2' reply@reply.github.com Subject: RE: [aaFn/Bookmark-search-plus-2] Add Ctrl+Z and Ctrl+Y shortcut keys to BSP2 (#75)

Changes in red for further clarity

From: Keith at ILS <keith.mills@ils-international.be mailto:keith.mills@ils-international.be > Sent: 30 April 2020 03:27 To: 'aaFn/Bookmark-search-plus-2' <reply@reply.github.com mailto:reply@reply.github.com > Subject: RE: [aaFn/Bookmark-search-plus-2] Add Ctrl+Z and Ctrl+Y shortcut keys to BSP2 (#75)

Nice. Very nice.

Thank you 😊. Very much.

I haven’t yet thought this (tentative) suggestion out clearly, but do you think it would be a good idea to have a display mode that is able to group together multiple changes to a single bookmark?

This could be effected by having the option to sort the changes:

Just an idea. But perhaps too complicated code-wise to make it worthwhile for the sake of this modest improvement? And I’m still not sure if it’s really desirable. Still thinking this through.

Keith

From: aaFn <notifications@github.com mailto:notifications@github.com > Sent: 28 April 2020 16:53 To: aaFn/Bookmark-search-plus-2 <Bookmark-search-plus-2@noreply.github.com mailto:Bookmark-search-plus-2@noreply.github.com > Cc: Muddy7 <keith.mills@ils-international.be mailto:keith.mills@ils-international.be >; Mention <mention@noreply.github.com mailto:mention@noreply.github.com > Subject: Re: [aaFn/Bookmark-search-plus-2] Add Ctrl+Z and Ctrl+Y shortcut keys to BSP2 (#75)

Hello @Muddy7 https://github.com/Muddy7 , today with 2.0.76, I added a first significant step for that feature, which is the "Bookmark history" window.

It allows to examine the history of all recorded bookmark actions since 2.0.71 is out, as well as some meta actions (like BSP2 start, or reload).

So it is only for browsing then. No undo/redo operation available either for now, that will be a next step.

The window can be open from the context menu on the BSP2 icon in the toolbar, or from the magnifying glass search button menu in the sidebar.

Let me know here if anybody has problems with, or suggestions on, that new feature. AaFn.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aaFn/Bookmark-search-plus-2/issues/75#issuecomment-620656641 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCGKFZFLSH7CTBZRXGGLR3RO3UTFANCNFSM4GJRGRFQ . https://github.com/notifications/beacon/ADCGKF7DEJU4RU4LRCCNDFTRO3UTFA5CNFSM4GJRGRF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOET7HQAI.gif

Muddy7 commented 4 years ago

Changes, once again, in red!

From: Keith at ILS keith.mills@ils-international.be Sent: 30 April 2020 03:38 To: 'aaFn/Bookmark-search-plus-2' reply@reply.github.com Subject: RE: [aaFn/Bookmark-search-plus-2] Add Ctrl+Z and Ctrl+Y shortcut keys to BSP2 (#75)

Or, better (regarding the second sort option below), to be able to click on a bookmark or a folder in the sidebar and see a history of the creation and, where appropriate, changes that have been made to it. Also the option of being to be able to display ( in grey?) deleted items and to display their history?

As I say, I’m not yet sure whether the effort codewise would be worthwhile for the (possibly?) modest improvement that this would provide.

Keith

From: Keith at ILS <keith.mills@ils-international.be mailto:keith.mills@ils-international.be > Sent: 30 April 2020 03:29 To: 'aaFn/Bookmark-search-plus-2' <reply@reply.github.com mailto:reply@reply.github.com > Subject: RE: [aaFn/Bookmark-search-plus-2] Add Ctrl+Z and Ctrl+Y shortcut keys to BSP2 (#75)

Changes in red for further clarity

From: Keith at ILS <keith.mills@ils-international.be mailto:keith.mills@ils-international.be > Sent: 30 April 2020 03:27 To: 'aaFn/Bookmark-search-plus-2' reply@reply.github.com Subject: RE: [aaFn/Bookmark-search-plus-2] Add Ctrl+Z and Ctrl+Y shortcut keys to BSP2 (#75)

Nice. Very nice.

Thank you 😊. Very much.

I haven’t yet thought this (tentative) suggestion out clearly, but do you think it would be a good idea to have a display mode that is able to group together multiple changes to a single bookmark?

This could be effected by having the option to sort the changes:

Just an idea. But perhaps too complicated code-wise to make it worthwhile for the sake of this modest improvement? And I’m still not sure if it’s really desirable. Still thinking this through.

Keith

From: aaFn <notifications@github.com mailto:notifications@github.com > Sent: 28 April 2020 16:53 To: aaFn/Bookmark-search-plus-2 <Bookmark-search-plus-2@noreply.github.com mailto:Bookmark-search-plus-2@noreply.github.com > Cc: Muddy7 <keith.mills@ils-international.be mailto:keith.mills@ils-international.be >; Mention <mention@noreply.github.com mailto:mention@noreply.github.com > Subject: Re: [aaFn/Bookmark-search-plus-2] Add Ctrl+Z and Ctrl+Y shortcut keys to BSP2 (#75)

Hello @Muddy7 https://github.com/Muddy7 , today with 2.0.76, I added a first significant step for that feature, which is the "Bookmark history" window.

It allows to examine the history of all recorded bookmark actions since 2.0.71 is out, as well as some meta actions (like BSP2 start, or reload).

So it is only for browsing then. No undo/redo operation available either for now, that will be a next step.

The window can be open from the context menu on the BSP2 icon in the toolbar, or from the magnifying glass search button menu in the sidebar.

Let me know here if anybody has problems with, or suggestions on, that new feature. AaFn.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aaFn/Bookmark-search-plus-2/issues/75#issuecomment-620656641 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCGKFZFLSH7CTBZRXGGLR3RO3UTFANCNFSM4GJRGRFQ . https://github.com/notifications/beacon/ADCGKF7DEJU4RU4LRCCNDFTRO3UTFA5CNFSM4GJRGRF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOET7HQAI.gif

Muddy7 commented 4 years ago

Sorry for the avalanche of mails ☹☹☹

From: Keith at ILS keith.mills@ils-international.be Sent: 30 April 2020 03:47 To: 'aaFn/Bookmark-search-plus-2' reply@reply.github.com Subject: RE: [aaFn/Bookmark-search-plus-2] Add Ctrl+Z and Ctrl+Y shortcut keys to BSP2 (#75)

Changes, once again, in red!

From: Keith at ILS <keith.mills@ils-international.be mailto:keith.mills@ils-international.be > Sent: 30 April 2020 03:38 To: 'aaFn/Bookmark-search-plus-2' <reply@reply.github.com mailto:reply@reply.github.com > Subject: RE: [aaFn/Bookmark-search-plus-2] Add Ctrl+Z and Ctrl+Y shortcut keys to BSP2 (#75)

Or, better (regarding the second sort option below), to be able to click on a bookmark or a folder in the sidebar and see a history of the creation and, where appropriate, changes that have been made to it. Also in the sidebar the option of being to be able to display ( in grey?) deleted items and to click to display their history?

As I say, I’m not yet sure whether the effort codewise would be worthwhile for the (possibly?) modest improvement that this would provide.

Keith

From: Keith at ILS <keith.mills@ils-international.be mailto:keith.mills@ils-international.be > Sent: 30 April 2020 03:29 To: 'aaFn/Bookmark-search-plus-2' <reply@reply.github.com mailto:reply@reply.github.com > Subject: RE: [aaFn/Bookmark-search-plus-2] Add Ctrl+Z and Ctrl+Y shortcut keys to BSP2 (#75)

Changes in red for further clarity

From: Keith at ILS <keith.mills@ils-international.be mailto:keith.mills@ils-international.be > Sent: 30 April 2020 03:27 To: 'aaFn/Bookmark-search-plus-2' <reply@reply.github.com mailto:reply@reply.github.com > Subject: RE: [aaFn/Bookmark-search-plus-2] Add Ctrl+Z and Ctrl+Y shortcut keys to BSP2 (#75)

Nice. Very nice.

Thank you 😊. Very much.

I haven’t yet thought this (tentative) suggestion out clearly, but do you think it would be a good idea to have a display mode that is able to group together multiple changes to a single bookmark?

This could be effected by having the option to sort the changes:

Just an idea. But perhaps too complicated code-wise to make it worthwhile for the sake of this modest improvement? And I’m still not sure if it’s really desirable. Still thinking this through.

Keith

From: aaFn <notifications@github.com mailto:notifications@github.com > Sent: 28 April 2020 16:53 To: aaFn/Bookmark-search-plus-2 <Bookmark-search-plus-2@noreply.github.com mailto:Bookmark-search-plus-2@noreply.github.com > Cc: Muddy7 <keith.mills@ils-international.be mailto:keith.mills@ils-international.be >; Mention <mention@noreply.github.com mailto:mention@noreply.github.com > Subject: Re: [aaFn/Bookmark-search-plus-2] Add Ctrl+Z and Ctrl+Y shortcut keys to BSP2 (#75)

Hello @Muddy7 https://github.com/Muddy7 , today with 2.0.76, I added a first significant step for that feature, which is the "Bookmark history" window.

It allows to examine the history of all recorded bookmark actions since 2.0.71 is out, as well as some meta actions (like BSP2 start, or reload).

So it is only for browsing then. No undo/redo operation available either for now, that will be a next step.

The window can be open from the context menu on the BSP2 icon in the toolbar, or from the magnifying glass search button menu in the sidebar.

Let me know here if anybody has problems with, or suggestions on, that new feature. AaFn.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aaFn/Bookmark-search-plus-2/issues/75#issuecomment-620656641 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCGKFZFLSH7CTBZRXGGLR3RO3UTFANCNFSM4GJRGRFQ . https://github.com/notifications/beacon/ADCGKF7DEJU4RU4LRCCNDFTRO3UTFA5CNFSM4GJRGRF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOET7HQAI.gif

aaFn commented 4 years ago

Hello @Muddy7 , thank you, yes currently things are sorted by time-date. I have in plan to implement a search panel like in the normal sidebar, so I guess it could address your second option.

The search panel would then combine the filter to reduce the view, and the time sort, plus a similar "show" feature as in the normal BSP2 sidebar to highlight where it is. It is all then a matter of which filtering criteria we can use .. and my plan is to use the same settings as in the BSP2 main search configuration (do a click on the magnifying glass button to see them). Hoping this would address the majority of cases.

How does that sound ?

Btw, just note that for storage limits purpose, I am trimming the history list to 30 days (for now not configurable, I guess I will add that as an option later :-) ).

Muddy7 commented 4 years ago

I haven’t completely understood, but from what I have, that sounds (as per usual 😉) even better than my suggestion!! I greatly look forward to the full functionality of this excellent undo/redo feature (though even at this early stage, it has already proved great: I managed only yesterday to easily get myself out of my mistaken renaming of a folder—I had intended to add a child folder but mistakenly renamed the existing folder—and easily go back to the original name)

From: aaFn notifications@github.com Sent: 30 April 2020 09:17 To: aaFn/Bookmark-search-plus-2 Bookmark-search-plus-2@noreply.github.com Cc: Muddy7 keith.mills@ils-international.be; Mention mention@noreply.github.com Subject: Re: [aaFn/Bookmark-search-plus-2] Add Ctrl+Z and Ctrl+Y shortcut keys to BSP2 (#75)

Hello @Muddy7 https://github.com/Muddy7 , thank you, yes currently things are sorted by time-date. I have in plan to implement a search panel like in the normal sidebar, so I guess it could address your second option.

The search panel would then combine the filter to reduce the wiew, and the time sort, plus a similar "show" feature as in the normal BSP2 sidebar to highlight where it is. It is all then a matter of which filtering criteria we can use .. and my polan was to use the same settings as in the BSP2 main search configuration (do a click on the magnifying glass button to see them). Hoping this would address the majority of cases.

How does that sound ?

Btw, just note that for storage limits purpose, I am trimming the history list to 30 days (for now not configurable, I guess I will add that as an option later :-) ).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aaFn/Bookmark-search-plus-2/issues/75#issuecomment-621658038 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCGKFYCAMCAMPLQMU32QNTRPEQVHANCNFSM4GJRGRFQ . https://github.com/notifications/beacon/ADCGKFYZLYZMU7TV2DF646TRPEQVHA5CNFSM4GJRGRF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEUG37NQ.gif

Muddy7 commented 4 years ago

To add: I am really impressed by this new BSP2 undo/redo feature (currently under development). It is so much more sophisticated than the basic Windows version. Thanks!

Alpengreis commented 3 years ago

About the trashfolder: deleting works ok after it's activated in options, if NOT activated, after deleting (with mouse) it needs a "refresh" till the deleted bookmark is no more visible.

aaFn commented 3 years ago

Hello @Alpengreis , indeed, I see I introduced a bug in 2.0.95 generating a code exception when removing a bookmark to the BSP2 Trash while the trash is invisible (see BSP2 options page to make it visible for debug).

Sorry I missed that test case. This is corrected in 2.0.96, which is out now. Let me know if all ok or if you still experience a problem, thanks aFn.

Alpengreis commented 3 years ago

Hi @aaFn All good now, thank you very much for fast fix!

Cr8zyIvan commented 1 year ago

I was coming to the GitHub to file an Enhancement Suggestion for Ctrl + Z (Undo), and found this thread, and I found the Bookmark history option.

I am writing only to say that I am in Awe and that this is amazing. This Firefox Add-On is steadily becoming my favourite. Just... great job!

Muddy7 commented 1 year ago

I was coming to the GitHub to file an Enhancement Suggestion for Ctrl + Z (Undo), and found this thread, and I found the Bookmark history option.

I am writing only to say that I am in Awe and that this is amazing. This Firefox Add-On is steadily becoming my favourite. Just... great job!

I totally agree! 150% so!! Can't wait for the activation of the Undo tool. While waiting for it, the Bookmark History feature (essential building block for the Undo option, I imagine) is mega-bigly impressive.

aaFn commented 1 year ago

Correct, the history feature is a building block for it. That enhancement (Undo Ctrl-Z and Redo Ctrl-Y) is now next on my list .. should be coming soon, hopefully in the next release after the one of today 🤞

Muddy7 commented 1 year ago

Correct, the history feature is a building block for it. That enhancement (Undo Ctrl-Z and Redo Ctrl-Y) is now next on my list .. should be coming soon, hopefully in the next release after the one of today 🤞

Great news! Just the bookmark history feature alone is already epic (sooo useful). The Undo and Redo shortcuts will make it perfect!

aaFn commented 1 year ago

At last, that long due undo/redo function is now provided, in BSP2 2.0.117, which was just published. This went through intensive testing, but I might have missed a few things. So let me know if any problem. Thank you, aaFn.

Muddy7 commented 1 year ago

That's really great news!! Thanks for all the hard work that this must have entailed!

However, I seem to be having some teething problems:

  1. When I went to my Firefox app, I found myself on the previous version of BSP2. so I needed to manually update from v.116 to v.117
  2. Unfortunately, the Actions option Undo(Ctrl-Z) etc. in the Bookmarks History window is still greyed out after updating to the latest BSP2 version
  3. I tried adding a new webpage bookmark to my BSP2 favourites, and then deleted the entry. However, when I went to this deleted entry in the BSP2 Bookmarks History, I still found the Undo(Ctrl-Z) is greyed out
  4. I closed and restarted Firefox, but the problem persisted
  5. I restarted Windows (a full restart) but the problem still persisted, even after repeating point 3 above.

FYI I am on Windows 10 Home Version 22H2 (OS Build 19045, 3324).

I am hoping this problem can be ironed out, as I am very much looking forward to using this brilliant new addition to your (already fantastic) extension.

aaFn commented 1 year ago

Hello @Muddy7 , for now the way to undo/redo is through keyboard = Ctrl-Z and Ctr-Y, on the main panel (and not in the history). I will look at enabling buttons, and also activating Ctrl-Z and Ctrl-Y in the history window, in the next version.

Sorry for the inconvenience.

Muddy7 commented 1 year ago

Aaah! Right! Got it. Many thanks.

Btw I'm amazed at what this will be like when everything is activated in the history window!!

mzso commented 1 year ago

What is this history window you guys speak of?

Muddy7 commented 1 year ago

What is this history window you guys speak of?

To the left of the search box:

  1. Click the button with a square and a diagonal line inside it
  2. Click "Bookmark history" at the bottom of the pop-up menu Voilà!
mzso commented 1 year ago

@Muddy7 commented on Sep 9, 2023, 2:08 PM GMT+2:

What is this history window you guys speak of?

To the left of the search box:

  1. Click the button with a square and a diagonal line inside it
  2. Click "Bookmark history" at the bottom of the pop-up menu Voilà!

Originally posted by @Muddy7 in https://github.com/aaFn/Bookmark-search-plus-2/issues/75#issuecomment-1712496305

Ah. So this is some list about what BSP2 done with bookmarks? The last items are fairly old, so it can't be all bookmarks changes. dropping tabs/windows into bsp's sidebar don't even seem to be listed.

Muddy7 commented 1 year ago

@mzso No. It's an exhaustive history of the last 30 days (I think) of deleted, modified, moved and new bookmarks. This is the first stage in my request to be able to undo (Ctrl+Z), or redo undone (Ctrl+Y), past actions in the BSP2 bookmark history. It goes much further than my original request, and will be streets ahead of the FF native bookmarks Ctrl+Z and Ctrl+Y option.

aaFn commented 1 year ago

I confirm that this is the last 30 days by default, but you can change it in the options, to a value between 1 and 9999 days.

The history pruning is happening at each BSP2 restart, which is in general when you start Firefox (you can also provoke it by disabling and re-enabling BSP2 in the add-ons page, whic is triggering a stop and a restart).

All bookmark changes are there, including the ones made through the native FF bookmark panel, or made through any other add-on manipulating bookmarks. This can be title or URL modification, moves, delete, creation (by drag and drop of tabs or any other).., Note, that there is no way to know which ones were made by which, as we cannot place any signature in bookmarks, and we do not know who originated the action when it is sent tot the add-on by the FF API.

Muddy7 commented 1 year ago

Thanks, @aaFn, for all that really helpful information.

mzso commented 1 year ago

@aaFn commented on Sep 9, 2023, 5:32 PM GMT+2:

All bookmark changes are there, including the ones made through the native FF bookmark panel, or made through any other add-on manipulating bookmarks. This can be title or URL modification, moves, delete, creation (by drag and drop of tabs or any other).., Note, that there is no way to know which ones were made by which, as we cannot place any signature in bookmarks, and we do not know who originated the action when it is sent tot the add-on by the FF API.

Doesn't seem like that to me the latest bookmarks I created are not there and there's repetitive stuff I didn't touch for a long while that is shown moved many times.

Muddy7 commented 1 year ago

@mzso I dunno what to say. Works flawlessly for me.

aaFn commented 1 year ago

2.0.118 is out, with buttons enabled in the history window. And there is now an expandable menu in the sidebar, under the search box, which contains also an undo and a redo button. Use the twisite on the left of the search box to show it / hide it.

The buttons are enabled when it is possible to do the corresponding action, or disabled when not possible.

I also enabled Ctrl-Z and Ctrl-Y in the history window.

Let me know if any problem. aaFn

aaFn commented 1 year ago

@mzso , do you still see problems on your side ? Would you mind wharing a screen capture of what you see, and what you believe is abnormal or missing ?

Thank you, aaFn.

Muddy7 commented 1 year ago

Great stuff. Thanks, @aaFn !!

The Undo and Redo buttons in the Expandable Box under the Sidebar Search Box work flawlessly. Fantastic!!

However, at the moment, on my device at least, the Undo and Redo buttons now enabled in the History Window only work in the same way as those in the Expandable Box under the Sidebar Search Box, i.e. I can undo the latest creation/modification/deletion, or I can undo a string of the latest creations/modifications/deletions, but cannot (yet) select one particular past creation/modification/deletion in isolation for Undoing (except, of course, for the latest creation/modification/deletion). I imagine this is because you are building the Undo/Redo programming code step by step. If that is so, so far it's perfect!

Oh, just one tiny point: I seem to have lost, with this latest update, the shortcut key to open and close the BSP2 sidebar (Ctl-Q by default). It is also greyed out in the Options menu.

Thanks for all your excellent work 😁 !

Muddy7 commented 1 year ago

This morning I have discovered an interesting apparent quirk.

Yesterday I began testing the new BSP2 Undo/Redo function by adding a new bookmark (let's call it Bookmark X). In the process of testing I Undid, i.e. removed, and Redid, i.e. restored, this bookmark numerous times. It would seem that when I turned off my computer last night, I had Undone, ie. removed, that bookmark and subsequently added another bookmark (let's call it Bookmark Y).

Here is the apparent quirk: this morning I find that Bookmark X is greyed out in the Bookmark History window, and it is no longer possible to Undo (or Redo?), i.e. restore, this bookmark with the Undo (or, indeed, the Redo) button in the Expandable Box. Bookmark Y and the preceding bookmarks in Bookmarks History, with the exception of Bookmark X, can be Undone without problem.

Maybe this is normal? Maybe any "Undone" bookmarks can no longer be restored once the computer has been turned off or restarted??

aaFn commented 1 year ago

Yes, the "undo all after" and "redo all until" functions are not activated, they will come later, as they are iterative calls to the base undo & redo functions towards the objective position. Incremental coding and release 😄

On the second post, yes this is normal, this is the notion of active and passive branches in the history, and it acts like any undo/redo stack in an editor, or any other software:

Example: in an editor, type ABCDEF, then Ctrl-z, Ctrl-z, Ctrl-z (= 3 times in past). At this stage, you will see ABC Then press Ctrl-Y, and you will see ABCD = D was just redone, and "EF" are still in the stack as being undone, waiting to be redone. Then type G -> you will see ABCDG, and it is not possible anymore to do Ctrl-Y and see the E and F appear, because the "G" action replaced "EF" in the stack, and so "EF" are lost forever. Of course, you can still do Ctrl-z on "G" to undo it, and on "D" and previous ones, as they are still in the stack of actions, but it will never be possible to come back to "E" and "F".

In BSP2, "E" and "F" still show because I implemented the history in a bit different way than just a pure stack. However the effect is the same, the undo "E" and undo "F" become inactive, so are greyed out, and cannot be redone anymore, since the state on which they apply is not valid anymore, because "G" appeared, changed the state, and so forced a fork of the branch, leaving the "E" "F" branch inactive and non applicable anymore.

Hope this is clear.

Muddy7 commented 1 year ago

OK! Thanks for that very clear explanation 😀.

What I hadn't realised is that what I imagined to be undo an earlier bookmark will be in fact "undo all after" that earlier bookmark. I thought it would be "undo just this single (earlier) bookmark creation/modification/deletion". I would have preferred the latter, and was hoping for and expecting (due to my misunderstanding 😳) this latter. Perhaps it is impossible*? If so, never mind. But if by any chance it is possible, might this be feasible to build into the programming code? If too much work, don't bother! But if possible, that would be really great!


*Sometimes of course, this will indeed be (presumably) impossible such as the creation of a folder, which is subsequently renamed and then subsequently filled with new bookmarks.

Muddy7 commented 1 year ago

The sidebar shortcut key is working again! I don't know if this was some quirk to do with my computer, or something you fixed on the backend? Anyway, whatever the reason I'm glad I've got that back.

aaFn commented 1 year ago

Yes, that is the point, the state on which you want to undo / redo must be the same. If the state changed, you cannot do an undo or redo.

It can be a "recreate", or a "delete", or a "rename/change to", but it won't be the same action exactly, and neither an undo nor undo. To your point, once finished on "restore to" or "replay to", I will see how to add another one where you can select one action in the history, and "reproduce" it .. but for example, if the action is "undo remove", then this will simply execute a recreate, and if the bookmark already exists, another one will appear besides ...

Muddy7 commented 1 year ago

Re your above comment: excellent!!

aaFn commented 1 year ago

On the shortcut, this is now managed through FF, so I am showing it in the options page, but it is greyed out, because only one place to manage it, in FF. You can only reset to default ni the options page, because "reset to default" does not exist in FF.

Note: the place to manage shortcut keys is in the cogwheel menu of the FF manage extensions page.

Muddy7 commented 1 year ago

Yes. For some strange reason, I lost the BSP2 sidebar shortcut key yesterday after manually updating to latest BSP2 version, but it seems to have returned after booting this morning.

I was a bit confused when you said: On the shortcut, this is now managed through FF ... Note: the place to manage shortcut keys is in the cogwheel menu of the FF manage extensions page. but now I've just seen it. Yes, at the top of the Extensions page, I see the title "Manage your Extensions" and a cogwheel to the right of this. When I click the cogwheel, I see "Manage Extension Shortcuts" at the bottom of the Context Menu that appears.

Thanks for that!

Why I momentarily lost that shortcut key after manually updating BSP2 will have to presumably remain lost to the mists of time. But I got it back, which is the main thing!

aaFn commented 1 year ago

ok, great, thank you 😺 aaFn

Muddy7 commented 1 year ago

Today, I had for the first time the occasion to use the Undo feature outside of test conditions, and as expected it worked like a dream. For some inexplicable reason. I had unknowingly moved two important folders out of their normal paths. I spotted this very quickly and so, as these remained the most recent two changes I had made to FF bookmarks, I was able to use this new BSP2 function. It worked flawlessly 😁.

Muddy7 commented 10 months ago

Unfortunately, two retrogade steps have taken place in the evolution of the Bookmark History window.

  1. When you enabled the Undo feature in a BSP2 update (which was great!), quite a few of the changes made started manifesting themselves as "Multiple selection" in the Bookmark History window. Unfortunately, the "Muliple Selection" entries did not display any details of what changes had occurred in these Multiple Selections. That is to say, all fields in the Bookmark History window regarding changes made (eg. Bookmark id, Bookmark type) were blank. Multiple Selection Entry What I found excellent about the Bookmark History window is that I can see details of every change made and so can manually undo any individual change (eg. recreate a deleted bookmark, undo modifications made to an edited bookmark). However, now that I can't see those changes in the Multiple Selection entries, that is no longer possible.
  2. Today this situation has unfortunately escalated. As of today, I can no longer see the details of ANY of the Bookmark History changes, not only Multiple Selections but also Single Entries as well. So I am unable to reverse ANY of the changes I have made, except by using the Undo button. Single Selection entry

I do hope the two above problems can be rectified as I have found this Bookmark History window to be extremely well-conceived and, as a result, VERY useful.

Thanks!

aaFn commented 10 months ago

Ok, sorry for that, if you switch to the "Raw list" view mode, could you show me what you see ?

Muddy7 commented 10 months ago

Already tried that. I see the same, unfortunately, ie blank fields.

Is this a problem with the BSP2 code, or may it be a problem with a corruption in the installation of the extension on my computer?

aaFn commented 10 months ago

I do not have the problem, but there might be a bug remaining in spite of all my testing, showing off on your side and not on mine. What is strange is that:

  1. I do not see the "undo/redo" cursor on your capture
  2. I do not see either the #xx value at top of the right detailed pane, which should always be there.

All looks like the window is not terminating its display .... and so is not really operational.

Can I ask you to:

Hopefullly, we will catch an error message / an exception which will indicate what is going wrong.

Muddy7 commented 10 months ago

OK. No problem. But before I do this, can you tell me where I will find the Browser Console so that I can be sure to capture any error messages/exceptions. Will it just appear automatically at Step 5 of your procedure?

BTW I'm not sure what you mean by the "undo/redo cursor"?? As you see I have an Undo and a Redo button in my Bookmarks History window. And of course, at the top of the BSP2 bookmarks sidebar on my Firefox Browser Pages, I can unhide the two buttons with semicircular arrows for Undo and Redo by clicking the downwards facing arrow to the left of the magnifying glass in the BSP2 search window. But I don't understand what the undo/redo cursor is.