Skip to content

Changes to the NavigationHistory feature. #495

Description

@jesperlauridsen

Hey @VictorHarbo / @jorntx / @thomasegense.

I didn't get to review the NavigationHistory, but I looked through it after the merge, and was puzzled by the way of handling storage of the history count. (I also still don't quite understand the feature, but that's on me ;-))

The way it currently works, as I understand it, is that you push changes to the backend, and then every 2 seconds asks the backend for a new object containing the count. This is done regardless of any chances made.

Image

I would recommend that this should be rewritten so a store on the frontend keeps track of everything, and when a change is made, it's pushed to the backend while keeping track at the frontend aswell. We can then ensure that on a fresh load of the page / or a reload, we ask the backend for the count object, and load it into the store, and keep track of it there once again.

That way, we avoid asking for updates (and often just getting the same object with no changes) from the backend. The current appoarch doesn't really scale, imho, if we some day have an instance of solrwayback deployed somewhere with alot of concurrent users.

Also, I think the button should either be renamed to something along the lines of "Download navigation history", or instead open a modal of the navigation history with the option to download it. Right now you just suddenly get a json file thrown into your download folder. :-)

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions