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

codemirror: add config options to style selection #5529

Merged
merged 5 commits into from Nov 21, 2018

Conversation

futurist
Copy link
Contributor

@futurist futurist commented Oct 26, 2018

Fixes #5528

Below is a demo to use these options:

Screenshots

DEMO

@blink1073
Copy link
Member

cc @tgeorgeux for UX input.

Copy link
Member

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

Thanks!

@futurist
Copy link
Contributor Author

futurist commented Nov 8, 2018

@tgeorgeux Can you review this PR? need any update please kindly let me know.

@tgeorgeux
Copy link
Contributor

@futurist Sorry to take so long to get on this. First off, thank you for the issue/pull request being organized and easy to read/understand. That's very helpful, but I digress.

I like the styling here, I also think it makes sense to also bring those options into the advanced setting editor.

@blink1073 do you have thoughts? Given these add-ons have not been previously installed I think it makes sense to give people the option to turn them back off.

The relevant files that will need to be updated to include these in the advanced settings editor are:
jupyterlab/packages/codemirror-extension/schema/commands.json
jupyterlab/packages/codemirror-extension/src/index.ts

Otherwise looks great.

@blink1073
Copy link
Member

Yeah I think making the highlighting configurable is fair.

@futurist
Copy link
Contributor Author

@tgeorgeux I think the point is when user switching theme, the selection style should not mess up the theme style? If this is the case, I suggest the default value for these three options should be false, that case nothing changed except for after the user styling their selections, then manually turn on.

@futurist
Copy link
Contributor Author

@tgeorgeux The latest commit set all these options false as default, please have a check.

@tgeorgeux
Copy link
Contributor

@futurist I don't mind turning them on by default.

What I was addressing with my earlier comment is to add those options to the code mirror tab in the advanced settings editor. See the screenshot:

screen shot 2018-11-20 at 9 59 21 am

In order to add these options to the advanced settings editor, you will need to build out the relevant schema in these files:
jupyterlab/packages/codemirror-extension/schema/commands.json
jupyterlab/packages/codemirror-extension/src/index.ts

Also, CI stuff isn't my specialty but it looks like the appveyor build is breaking. @blink1073 are tests at 100 right now?

@blink1073
Copy link
Member

Appveyor has been flaky...

@futurist
Copy link
Contributor Author

@tgeorgeux I've pushed new commits, and think below really make sense:

image

@blink1073
Copy link
Member

LGTM, thanks!

@blink1073 blink1073 merged commit 0befb13 into jupyterlab:master Nov 21, 2018
@tgeorgeux
Copy link
Contributor

Thank you so much @futurist !

@lock lock bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Aug 8, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement pkg:codemirror status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should allow user to style the codemirror selection
3 participants