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

Project history : Add a version viewer windows in the plugin #630

Open
wants to merge 90 commits into
base: master
Choose a base branch
from

Conversation

ValentinBuira
Copy link
Contributor

@ValentinBuira ValentinBuira commented Oct 4, 2024

This PR is a refactor and enhancement to bring a new history window to browse the history of a project directly from the plugin

To open the new windows a new toolbar button has been added.

The windows is divided in three parts for the users to be able to:

  • Scroll thought projects versions the left
  • Explore change visually in case the version is diffable
  • Viewing layer changed, version metadata (author creation date, user agent, etc...), and changesets details .

This PR is marked as draft because some testing are still required and the feature still have rough edges

Screenshot from 2024-10-04 10-51-42

For reviewer a brief technical documentation is available in the comment

@tomasMizera tomasMizera linked an issue Oct 7, 2024 that may be closed by this pull request
@tomasMizera tomasMizera requested a review from uclaros November 22, 2024 15:03
@tomasMizera
Copy link
Contributor

Hi @uclaros we have a big one here :) Thanks!

@tomasMizera tomasMizera added the requires dependency release Other dependencies must be released before this one label Nov 29, 2024
Mergin/utils.py Outdated Show resolved Hide resolved
Mergin/utils.py Show resolved Hide resolved
Mergin/utils.py Show resolved Hide resolved
Mergin/images/default/tabler_icons/history.svg Outdated Show resolved Hide resolved
Mergin/version_viewer_dialog.py Show resolved Hide resolved
Comment on lines +418 to +421
def on_scrollbar_changed(self, value):

if self.ui.history_treeview.verticalScrollBar().maximum() <= value:
self.fetch_from_server()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the first page of data fits in the tree view and does not need a scrollbar, then the second page will not be fetched

Copy link
Contributor Author

@ValentinBuira ValentinBuira Dec 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but it's very unlikely to happen as we fetch 100 versions at once.

If @tomasMizera agree we can leave it as is

Mergin/version_viewer_dialog.py Show resolved Hide resolved
# Only fetching when previous is finshed
return
else:
self.fetcher.start()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any visual indication that we are fetching?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not at the moment, I think the cleanest way to do so would be to add a temporary items at the end of the version table Saying "Fetching more versions ⏳"

Mergin/version_viewer_dialog.py Outdated Show resolved Hide resolved
Mergin/version_viewer_dialog.py Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires dependency release Other dependencies must be released before this one
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show history of versions of a project
4 participants