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

Support hiding base editor #705

Conversation

fcollonval
Copy link
Collaborator

Fixes #682

It adds a new CLI option --no-base to switch from a 4-panels to a 3-panels merge view.


Identical with #699 but required after branch rename as it was impossible to check it out on windows

@fcollonval
Copy link
Collaborator Author

bot please update playwright snapshots

@github-actions
Copy link
Contributor

Playwright ubuntu-22.04 snapshots updated.

@github-actions
Copy link
Contributor

Playwright windows-latest snapshots updated.

@fcollonval fcollonval closed this Oct 10, 2023
@fcollonval fcollonval reopened this Oct 10, 2023
Copy link
Member

@krassowski krassowski left a comment

Choose a reason for hiding this comment

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

That's still a long branch name ;)

I restarted the flaky test - if it passes this looks good to me.

@fcollonval fcollonval force-pushed the fix/682-Support-merge-view-with-3-panels-theirs-final-ours-in-addition-to-the-current-4-panels-views branch from 666e6c6 to d93460a Compare October 10, 2023 08:23
@fcollonval fcollonval merged commit 228b6b0 into jupyter:master Oct 10, 2023
13 checks passed
@fcollonval fcollonval deleted the fix/682-Support-merge-view-with-3-panels-theirs-final-ours-in-addition-to-the-current-4-panels-views branch October 10, 2023 10:23
dest='show_base',
action="store_false",
default=True,
help="Don't display the base version.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add this in nbdime/webapp/nbmergeweb instead. It makes no sense for this argument to show up in the CLI command nbmerge

@@ -532,6 +538,7 @@ def args_for_server(arguments):
workdirectory='cwd',
base_url='base_url',
hide_unchanged='hide_unchanged',
show_base='show_base',
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is mainly a convenience for shared args. For a one-off like show_base, it is probably better to add it manually in nbdime/webapp/nbmergeweb.

show_base = Bool(
True,
help="Whether to show the base version (4-panels) or not (3-panels).",
).tag(config=True)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here, only needed for web merge.

const showBase = getConfigOption('showBase', true);

if (!showBase) {
document.querySelector('#nbdime-header-base')!.textContent = 'Merged';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just FYI: this header doesn't seem to be included in UI tests, I assume bc of which node is selected for screenshotting?

@vidartf
Copy link
Collaborator

vidartf commented Oct 13, 2023

@fcollonval Thanks for all the work here and elsewhere! I left some stray comments on a few merged PRs like this. Let me know if you want me to open up issues for them instead, or PRs (might take longer). Thanks again 😃

fcollonval added a commit to fcollonval/nbdime that referenced this pull request Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support merge view with 3 panels (theirs | final | ours) in addition to the current 4 panels views
3 participants