Sublime Forum

Mdpopups 1.9.0

#1

If you use the mdpopups dependency for tooltips, and wish it had the same functionality for phantoms, now it does.

Additionally, 2 new template variable were added: is_phantom and is_popup. These can be used to create custom CSS that differs for phantoms and popups.

Read more in the docs: http://facelessuser.github.io/sublime-markdown-popups/usage/

2 Likes

#2

Unfortunately itā€™s not possible to use the PhantomSet API from ST with this because you didnā€™t add a subclass of Phantom with its constructor (and __eq__) changed. I donā€™t have any use for this currently, but just mentioning~

The PhantomSet class only adds and deletes Phantoms on the view that have changed when you call its .update method.

0 Likes

#3

I overlooked this, thanks for bringing it to my attentionā€¦

0 Likes

#4

Okay 1.61 is released with Phantom and PhantomSet classes. Good catch. Thanks @FichteFoll! That makes dealing with phantoms better.

1 Like

#5

My versioned repo was in a separate place from the installed Sublime installed version. They were not quite in sync and the template lib had not been updated which broke everything.

1.6.2 is out and fixes all thatā€¦(man I really need to throw in some tests to catch stuff like this)

1 Like

#6

1.7.0 is released

Noticeable change is going to be that font sizes are now based off of the font size in the current view they are created in. Other than that, there are a couple of new API methods for getting style of a specific scope in the color scheme, tinting an image with a color, and raw variants of image API commands that return the raw byte string opposed to a base64 encoded img element (useful if you want to save an image in a cache or something).

Full list of changes

  • Also, new filter added to template which can allow size of pt, em, or
    px to be relative to font size of view.
  • Fonts in popups and phantoms are now calculated based on current view font size.
  • Added color_box_raw to API to return the raw byte string when creating a color box
  • Added tint to API to tint an image with a color and return the image base64
    encoded in an HTML element.
  • Added tint_raw to API to tint an image with a color and return the raw byte string when creating a tint.
  • Added scope2style to retrieve style of a scope.
  • Add debug setting now must be set to a level instead of just True or False.
  • Tweaks to default CSS.
1 Like

#7

Made some adjustments to relative font sizes as it seems assuming the font size in the settings file as a px gives a more reliable feel. That should be found in 1.7.1.

I am working on support for scaling with high dpi monitors. I have something working on Windows, but I will provide a manual setting for OSX and Linux as I am not sure how to detect font scaling on those systems. I am hoping after the next release I will stop fiddling with this for a while.

2 Likes

#8

High Dpi workaround is in 1.7.2 . If you need to manually scale it for OSX and Linux, you can. You can also override the Windows guessing with your own scale, but hopefully that is not needed.

See the following for more info:

Thatā€™s it for now.

1 Like

#9

New version out. Main things are that we now use the better CSS support that was introduced in 3119+. I added things like options to wrap your content in a div with a class so you can have CSS like .myplugin .myclass {} etc. It still supports the legacy CSS for now, but that will be removed when the next ST beta drops.

Also supports templating in your HTML/Markdown content. You can send in template variables or configure your content template environment by changing the template tags or adding filters etc. Variables are available in both CSS and content under the plugin object, but the template environment options only apply to your HTML/Markdown content. I donā€™t need people mucking with the CSS environment :slightly_smiling:.

For those who donā€™t like the idea of me tweaking the default popup/phantom css, Iā€™ve added a sublime setting to turn off the base formatting. You will loose things like definition lists etc. Put you will have a pure ST formatting then. The default color styling CSS has been stripped down significantly to allow to let Sublime 3119+ generate CSS or let the themes specify the colors. But it can be overriden by creating a mdpopups.css in your user folder.

Thatā€™s the main stuff, you can see the release notes here https://github.com/facelessuser/sublime-markdown-popups/releases/tag/1.9.0.

Most of my plugins that use mdpopups will be updated to better use this stuff moving forward.

As always, let me know of any bugs.

1 Like

#10

Hello, I use the BracketHighlighter package that now require mdpopups 1.9.0, I run Package Controlā€™s Satisfy Dependency command, but the version is still 1.8.0, how can I install the new version? Thanks.

  • ST ver.: 3120
  • Platform: linux
  • Arch: x32
  • Plugin ver.: 2.20.0
  • Install via PC: True
  • mdpopups ver.: 1.8.0
  • backrefs ver.: 1.0.post1
  • markdown ver.: 2.6.6
  • pygments ver.: 2.1a0
  • jinja2 ver.: 2.8
0 Likes

#11

I had the same problem this morning - I think Package Controlā€™s dependency logic is flawed - my solution was just to go Packages -> Browse Packages, delete the mdpopups folder and restart ST, to force it to download the latest version.

0 Likes

ColorHelper 2.0.0
#12

@wbond Iā€™ve got the same problems as stated above by @TheShrike and @kingkeith.

Iā€™m on Win10 Pro x64 with ST3120 x64 portable. PC is v3.1.2.

0 Likes

#13

I just freaked people out on old ST versions that were too old to even use hover events. I released a new BH to calm people down with a message explaining things. Also, I bumped mdpopups to 1.9.1. Had a bug in implementation. Anyways Iā€™m going to bed :slightly_smiling:.

0 Likes

#14

Mine upgraded to 1.9.1 from 1.9.0 successfully after using Satisfy Dependencies :slight_smile: (Win 7 x64, ST3120)

0 Likes

#15

@facelessuser you might wanna fix the typo when you get to it :+1:

0 Likes

#16

Thanks. I would be a typo Iā€™ve copied and pasted between 3 repos though :frowning:.

0 Likes

#17

:man_with_gua_pi_mao: ā† Chang Log

0 Likes

#18

Even he keeps logs :).

0 Likes

#19

New version out 1.11.0.

The only change is that block code tags will no longer wrap. Inline code should still wrap.

0 Likes

#20

New version out:

MdPopups 1.12.0

Released Nov 27, 2016

NEW: Mdpopups now handles CSS color names in color schemes.

Didnā€™t realize CSS color name support was added in color schemes. Be aware if you start putting CSS color names in your color scheme files, you may break plugins that are unaware that Sublime Text can do this. I didnā€™t even know this was possible until yesterday. Mdpopups will now support it, but I know I have other plugins that havenā€™t been updated to support this yet.

Iā€™m sure when people are aware of this, there are going to be lots of color schemes that start using CSS color names. I am hoping I will have all my plugins updated by then to avoid people filing issues.

2 Likes