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

Docdiff: initial work to toggle enabled/disabled #63

Merged
merged 21 commits into from
Aug 31, 2023
Merged

Conversation

humitos
Copy link
Member

@humitos humitos commented Apr 25, 2023

Peek 2023-04-25 16-43

Closes #62
Closes #23
Closes #11

@humitos
Copy link
Member Author

humitos commented Apr 27, 2023

I added a smaller example in the public/ folder so we can test it locally and play with it.

Peek 2023-04-27 15-49

- copy the code from doc-diff repository into this client directly.
- create a small example at http://localhost:8000/docdiff.html
- automatically inject document/global styles
Decide whether or not inject our own styles into the document.
They are injected by default, but users can disable it if they want and declare
their own `.doc-diff-*` classes.
@humitos
Copy link
Member Author

humitos commented May 1, 2023

Note that I'm not putting this anywhere in the page automatically for now. I think this will probably be part of #53 instead.

@humitos humitos marked this pull request as ready for review May 1, 2023 21:15
@humitos humitos requested a review from a team as a code owner May 1, 2023 21:15
@humitos humitos requested a review from agjohnson May 1, 2023 21:15
@humitos
Copy link
Member Author

humitos commented Jul 10, 2023

Note that I'm not putting this anywhere in the page automatically for now. I think this will probably be part of #53 instead.

Since we are not ready for the new flyout yet and we decided to copy the same flyout we currently have in the new implementation as an addon first, I will hide the checkbox for now and I will add a hotkey to enable/disable instead. That way we can deploy it easily without breaking any UI layout and users can start testing it.

@humitos
Copy link
Member Author

humitos commented Jul 13, 2023

I've used Control + Shift + f as the hotkey for now. I'd appreciate other ideas here, but we will need to discuss about a more general "hotkey pattern" we want to follow with all our addons. It works great for now:

Peek 2023-07-13 15-52

@humitos
Copy link
Member Author

humitos commented Jul 13, 2023

I'd like to have a review here so we can merge it and start testing it in our projects at least.

@humitos
Copy link
Member Author

humitos commented Jul 19, 2023

I've used Control + Shift + f as the hotkey for now

I reverted this decision and use single-stroke d after researching a little more about this in #80

@agjohnson
Copy link
Contributor

Just a note here for now, but I could see this implementation drifting closer to either a multiposition slider, pair of toggle bars, or even just a dropdown instead (I lean towards this). There are a few modes that I'm finding useful, depending on the pull request contents:

  • On, show deletes and additions
  • On, only show additions
  • Off

This doesn't need to affect the direction here yet, but will be something we want to consider in the future. Just noting so we don't cement too much of our implementation around a single, binary toggle bar. For the purpose of turning the diff off, this likely works fine for now.

@humitos
Copy link
Member Author

humitos commented Aug 31, 2023

I'm going to merge this because it's working fine. The only way to discover this feature right now is by hitting d when viewing a Pull Request. I will be promoting slowly this to start getting feedback.

We can easily disable from the API response if we notice it breaks for some reason.

@humitos humitos merged commit 32a0449 into main Aug 31, 2023
@humitos humitos deleted the humitos/docdiff branch August 31, 2023 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants