-
-
Notifications
You must be signed in to change notification settings - Fork 392
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
Merge View: collapseUnchanged
doesn't allow customizing "⦚ N unchanged lines ⦚" bars text
#1467
Comments
The text is configurable via |
Not really @marijnh, it wouldn't, for several reasons:
|
So TLDR:
UPD: I really should have stayed on point with customizing the text / removing the squiggles, sorry! Would you like me to create a separate issue for expand unchanged bar + gutter difficulties? But at least you know the background story now 😀 |
Yes, and that'd override the default style, which is what you want here, right?
Does |
They do for some, but not for all, for example
In addition, if we set the same background color for both the element & pseudo-element: we can't use Also: when trying to set an svg icon as a background for the |
Please let me spend a couple hours to experiment with the squiggles being in before/after pseudo elements and if that helps address our concerns, I will come back to you once I know. UPD: Still experimenting, quite tricky to simulate on the fly, plus had another urgent task. |
Those never are—CSS inheritance generally only applies to properties where inheritance makes sense. |
Alright, sorry it took so long to test, I can confirm that this solves at least the need to cover up the squiggly lines manually, and should simplify the necessary style overrides, so let's go ahead and maybe move squiggly lines into |
Attached patch makes this change. |
Big thanks, I will start using this and will update our styles shortly! |
Hey @marijnh, would you be so kind to give an example of using
For example, I'd like to add a class ![]() Is that possible? Did I understand correctly that this is the purpose of I've searched the entire Internet and haven't been able to find a single usage example, and the docs are scarce about this. In fact, I haven't even been able to import it: import { gutterWidgetClass } from '@codemirror/view';
// --> '"@codemirror/view"' has no exported member named 'gutterWidgetClass'. Did you mean 'gutterLineClass'? Am I supposed to import it [somehow] and then just add it to the list of extensions? Configured with PS: Big thanks in advance, sorry for late response on this, currently changing our styles to match your latest patches |
|
Describe the issue
The squiggly
⦚
lines of the "⦚ N unchanged lines ⦚" text, hardcoded intocollapseUnchanged
bars for expanding hidden lines are cool, but we unfortunately couldn't fit them into our theme design, and the text isn't customizable :( It took us significant efforts to customize-hack the text with ninja:before
and:after
CSS elements, but the implementation is clumsy and unreliable.Details
Amount of ninja CSS we had to use for customizing the bar & text
Suggestion
It would be great if we could provide a callback, or something, in
collapseUnchanged
options, that would be passed the number of lines, and return the text for those bars.Reproduction link
We have a complete functioning demo of CodeMirror, wrapped into an Ember.js component over at https://app.codecrafters.io/demo/code-mirror, configurable with most of the standard extensions & their options in realtime, please feel free to test over there. It's ok if people discover the link here on GitHub, but please don't link to it, yet :)
All of the documents used as examples in the Demo's
document
drop-down can be found here. The Ember.js component itself, which wraps CodeMirror, passes it all enabled extensions, and handles updates is here, just in case.Our current CodeMirror & Merge versions
The text was updated successfully, but these errors were encountered: