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

When ?readthedocs-diff=true we can't disable visual diff #461

Closed
humitos opened this issue Dec 5, 2024 · 2 comments
Closed

When ?readthedocs-diff=true we can't disable visual diff #461

humitos opened this issue Dec 5, 2024 · 2 comments
Assignees
Labels
Accepted Accepted issue on our roadmap Bug A bug

Comments

@humitos
Copy link
Member

humitos commented Dec 5, 2024

Steps to reproduce it:

  1. https://docs--11751.org.readthedocs.build/en/11751/user-defined-redirects.html?readthedocs-diff=true
  2. Press d

Visual diff should be disabled, but it doesn't --another layer of diff is added somehow.

@humitos humitos added Bug A bug Accepted Accepted issue on our roadmap labels Dec 5, 2024
@github-project-automation github-project-automation bot moved this to Planned in 📍Roadmap Dec 5, 2024
@humitos
Copy link
Member Author

humitos commented Dec 5, 2024

I understand this is because the "enabled" state coming from the URL is read by docdiff itself, but it's not read by hotkeys addon. Instead of calling enableDocDiff() we need to trigger the Event.

humitos added a commit that referenced this issue Dec 5, 2024
We trigger the event here so any other addon that requires to keep the state of
it can perform their corresponding action as well.

Hotkeys addons needs to make change `this.docDiffShowed = true` when the URL
argument is present, otherwise it's not possible to disable it.

Closes #461
@humitos humitos self-assigned this Dec 5, 2024
@humitos humitos moved this from Planned to Needs review in 📍Roadmap Dec 5, 2024
@humitos
Copy link
Member Author

humitos commented Dec 10, 2024

This is working fine now 👍🏼

@humitos humitos closed this as completed Dec 10, 2024
@github-project-automation github-project-automation bot moved this from Needs review to Done in 📍Roadmap Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Bug A bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant