Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add second back button #67

Open
petrenkonikita112263 opened this issue May 9, 2023 · 5 comments
Open

Add second back button #67

petrenkonikita112263 opened this issue May 9, 2023 · 5 comments

Comments

@petrenkonikita112263
Copy link

petrenkonikita112263 commented May 9, 2023

Currently, if the user has many files in XWiki, and decides to view some of them, it's a document or an image. After navigation from subfolders and pages in a result table. The user will select the file from a page other than the first -> it will open it to view, and after pressing button "Back to File Manager", the user will be taken to the 1st (initial page) of the result instead of going back to page (preview page) from which the file was selected.

To avoid this behavior, a new button can be added and named "Back to Previous page", which would be at the same level as the button "Back to File Manager".

bJCwZFSoIN

@vmassol
Copy link

vmassol commented May 9, 2023

Note: This looks similar to general page navigation in XWiki. The breadcrumb is there to take you back to another level but otherwise the user is supposed to hit "back" in the browser to go back to the previous page. At least that's how it works ATM. We could decide to provide a different breadcrumb or improve it. I guess all I'm saying is that the need expressed here is more generic than just the file manager and also exists for general page navigation in XWiki. However, it could be decided to implement it here while waiting for a generic implementation in XS.

Note that there is also a "Recently Visited" panel in XWiki, for example: https://playground.xwiki.org/xwiki/bin/view/Panels/RecentlyVisited

@petrenkonikita112263
Copy link
Author

petrenkonikita112263 commented May 9, 2023

Now, then the following question might be what must "Back" button in Web-browser do? Currently, it performs same functionality as the button "Back to the File Manager".

@mflorea
Copy link
Collaborator

mflorea commented May 9, 2023

The browser Back button should load the previous state of the live table (which is stored in the URL so can be restored). I don't think we need a new button. The existing button should take you back to the previous state of the files live table.

@lucaa
Copy link

lucaa commented May 10, 2023

The browser Back button should load the previous state of the live table (which is stored in the URL so can be restored). I don't think we need a new button. The existing button should take you back to the previous state of the files live table.

yes, I thought about that and tested it and it works only on some browsers (FF in my case, not Chrome)

BUT it seems that the URL of the page with the table is not properly a permalink.
The URL does change when the navigation changes - the filesOffset param - but when I copy paste that in a different browser tab I get the first page of the table loaded, not the one I was on and also the filesOffset parameter from the URL is reset to 0. This may explain why the back of the browser doesn't work fine on all browsers.

@lucaa
Copy link

lucaa commented May 10, 2023

Now, then the following question might be what must "Back" button in Web-browser do? Currently, it performs same functionality as the button "Back to the File Manager".

no, it doesn't, it may look like it does, in some cases, but it doesn't.

The back button of the FileManager takes the user to the listing of the folder the file is in, not to whatever the screen the user was looking at before.

For example,

  • if you're looking at the "all files" listing of the FM and you click on a file there, open it, and then you click on "Back to file manager", the FileManager will open to the listing of the folder that the file is in, not to the "all files" screen.
  • if you have opened the file from the listing of its folder, "Back to file manager" will open the listing of the same folder.
  • if you have put a link to the filemanager file on some other page of the wiki (since it's a page like any other page, this link is possible), you click on that link to open the file and then click "Back to file manager", it will take you to the filemanager, not to the page you were before.

So, apart from the second case here, the "Back to file manager" and the Back of the browser are not doing the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants