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

File Tree Diff: initial implementation #424

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

humitos
Copy link
Member

@humitos humitos commented Nov 7, 2024

Added a new addon to show all the filenames and URLs that were added, deleted or modified in the current PR compared to the LATEST version.

Screenshot_2024-11-07_12-44-02

I'm rendering this data in a new notification decoupled from the existing one on purpose. I don't want to entangle the code of these two different addons for now, in particular while we are under development/testing. I also see that in the future they may have different UI elements, or the data will be integrated in a more bigger UI element (eg. toolbar) or similar.

We can discuss more how this addon will grow and where is a good place to add this data and make that work in a following PR. For now, I want something that we can start testing internally in our own projects.

Examples

Screenshot_2024-11-07_14-15-37

Screenshot_2024-11-07_14-35-41

Screenshot_2024-11-07_14-51-06

Closes #409
Requires readthedocs/readthedocs.org#11749

Added a new addon to show all the filenames and URLs that were added, deleted or
modified in the current PR compared to the LATEST version.

Closes #409
@humitos humitos marked this pull request as ready for review November 7, 2024 13:58
@humitos humitos requested a review from a team as a code owner November 7, 2024 13:58
@humitos
Copy link
Member Author

humitos commented Nov 7, 2024

Usage example (together with docdiff)

Peek 2024-11-07 15-13

@astrojuanlu
Copy link

OOOF I WANT THIS

Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

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

This looks like a great start. I'm 👍 on shipping it overall. I'm not well versed on the JS style other than my silly comment below :)


showDiff() {
// const outdated = objectPath.get(this.config, "addons.filetreediff.oudated", false);
const diffdata = objectPath.get(this.config, "addons.filetreediff.diff");
Copy link
Member

Choose a reason for hiding this comment

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

I think we probably want camelcase if we're being good JS style:

Suggested change
const diffdata = objectPath.get(this.config, "addons.filetreediff.diff");
const diffData = objectPath.get(this.config, "addons.filetreediff.diff");

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

Successfully merging this pull request may close these issues.

File tree diff client
3 participants