Skip to content

Releases: noatpad/obsidian-banners

2.0.5-beta - check your libraries

14 Oct 19:04
Compare
Choose a tag to compare
Pre-release

Note to self: check if your installed libraries are using Node APIs

  • Fix crash on mobile by removing a desktop-only library (#134)
  • Refine banner positioning on mobile
    • There is a bug where there's an empty space can be seen when scrolling horizontally to the right for notes with a banner. Can only replicate it on a mobile device (so not with this.app.emulateDevice(true) so I'm having trouble finding the culprit there
  • Fix edge case when a banner isn't cleared when switching from a note with a banner to an empty note

2.0.4-beta - begone position: absolute

14 Oct 00:04
Compare
Choose a tag to compare
Pre-release

the evil has been defeated, the position: absolutes are all (but one) gone and the positioning cheats are no more (okay there's a little bit of cheating still, but only a little!)

  • ❗ Implement an alternative way to place banners in your notes. This new way should conflict a lot less with other plugins and themes. There is now only a single position: absolute statement in this codebase, and it's just for a specific setting. This relies a lot less on hacky positioning and more on...actual positioning. Rejoice theme and plugin devs! (And also sorry! Very sorry!)
    • A word of caution that this does behave differently than before, so be wary that this is still a tad experimental and any existing CSS snippets you may have may not work anymore. But hopefully you won't need them anymore if they were hacky fixes.
  • CSS variables are now being used wherever able instead of inline styles. Should also be good to play nicer with other plugins/themes.
  • Add a Download banner in note to vault command to download remote banners in your note into your vault (this should follow the Default location for new attachments setting in Obsidian)
    • With that said, there is also a new Auto-download pasted banners setting, so that the Paste banner from clipboard command will download the image and link it instead of pasting the URL. Neat if you want to download some banner images locally!
  • Banner caching is now implemented, which is especially useful for remote banners that are loaded from the web
    • An extra button is added in the settings to flush said cache if you need to as well
  • Rework how the banner header is positioned and sized to behave better with long titles (#129)
  • Rework a substantial amount on how settings are retrieved within the Svelte components (for my sanity)
  • Fix header alignment when there's no banner
  • Fix some typos in the settings

2.0.3-beta - had an exam week

29 Sep 21:51
Compare
Choose a tag to compare
Pre-release
  • Change behavior of empty banner_header fields and fix the "type mismatch" warning on said field (#121, #125)
    • You can now reference file properties in the header by using {{property}}, as well as use {{filename}} to reference the filename. It is also possible to use multiple fields within the curly braces to act as fallbacks, such as {{prop1, prop2, filename}} (thanks @Lisandra-dev for #126!)
    • Setting an empty value on the banner_header field will no longer use the file's filename in favor of {{filename}} (sorry that I changed this so quickly! It's probably better not to deal with a null edgecase...)
  • Fix proper checking for the Remove header command
  • Add a new setting (Adjust width to readable line length) to set a banner's maximum width to Obsidian's readable line width (#127)
  • Bring back versions.json into the repo (i forgot to put this back earlier, whoops)
  • Gave myself a mini version bump script
  • A bit more cleanup and stuff

2.0.2-beta - an evil might be bested in a bit

20 Sep 03:43
Compare
Choose a tag to compare
  • Fix possible conflicts with other plugins that use transactionExtender for editor extensions (#124)
  • Fix unusable cards in canvas notes when Banners is enabled (#122)
  • Properly change the banner drag modifier key without needed to reload the plugin
  • Use an empty string value for banner_header fields instead of a true value for automatically inserting the filename into a banner header (#121)
    • This is to keep this field with a consistent type to futureproof it for the upcoming database changes for Obsidian

2.0.1-beta - so far so good

18 Sep 00:44
Compare
Choose a tag to compare
Pre-release

thankfully a rather clean beta test so far, phew

  • Fix unopenable/locked file when a file has invalid frontmatter, which happens when manually editing it (#120)
  • Remove unnecessary .scss file and processing for external Sass files that are not associated with Svelte components
    • I forgot to remove those test files, whoops
  • Fix CORS errors for loading applicable images, such as redirects (#118, #119, thanks @RyotaUshio!)
  • Add a new modal to facilitate updating notes that used the legacy source syntax in Banners 1.x
    • BRAT users can find this modal at the bottom of the Banners settings tab!
  • Restyle a few things and organized other things

2.0.0-beta - It's been a bit, ahah...

15 Sep 03:16
Compare
Choose a tag to compare
Pre-release

Long story short, I took a long hiatus from the plugin, focused on other things since then (literally had moved countries and started grad school as of this past month or so), found out that 1.4 broke Banners, and realized there was a lot of cleaning up to do. So here we are, procrastination defeated by completely rewriting it from scratch, phew...

This is a beta version meant to be tested using BRAT. Most of the important functionality is there and it feels tested enough to put out there while I clean up just a few more things. Though it will be a beta prerelease for now in case there were bugs I had missed. Please leave an issue for problems you may come across so I can try fixing some of them before I make a proper release, and thank you in advance!

Also, because of the nature of rewriting the plugin from scratch to function again in 1.4 (more on that later), this beta prerelease and its upcoming release doesn't particularly target any of the issues that were sent in the Issues tab, but I will be looking through them to see if they had been resolved as a side effect of this change. There are also PRs that I couldn't make the merge due to this rewrite, but will be addressing them and took some as reference as I progressed. Now with that said...

image

  • ✨ Banners is now compatible with 1.4's new Properties view! ✨ Banners will once again show up in both Reading and Editing modes appropriately and more reliably to avoid covering other elements of the note in the future (I hope).
    • The banner field now accepts internal file links properly, so Banners will now parse image files through that format now instead of the previous "![[file]]" format. Not sure if an automatic change should be implemented or just a simple warning
    • And all of that is possible because...
  • 🔧 Banners was completely rewritten from scratch.
    • The codebase was redone from scratch to clean up a lot of the spaghetti code and use cleaner implementations to avoid the various pitfalls of its predecessor
    • Almost all of the banner elements and their functionality has been replaced with Svelte. It has been very helpful to work with and make better solutions instead of manual HTML
    • pnpm is now being used to develop instead of npm. Faster and nicer on the memory
    • The solutions that were in place previously were getting harder to maintain and ended up frankenstein-ing solutions that I feel like wouldn't be good to keep on the long run. As much as I wanted to put out a quick patch, it ended up getting too messy and that was the tipping point for the full rewrite.
  • Add headers to your notes! They are essentially like Obsidian's native Inline titles, but they work closer with Banners to customize how your notes look. It is recommended to toggle off Obsidian's inline titles through Appearance -> Show inline titles, as they are essentially a replacement to them.
    • You can add headers with the Add/Change header command or by adding a banner_header field in the file's properties view. This can be any string, or you can set it to true (Checkmark property) to use the filename instead
    • These headers, alongside banner icons, now form part of a "header" element that can be positioned to your choosing. Basically it functions like how icon placement worked, but now they're together
    • Headers replace the icon allignment settings with the same options, including a new option to place your header in the vertical center of a banner
  • There's now a lock button on a banner's corner if you'd like to lock a banner's position in place via a button instead of a command. You can hide this button in the settings if you'd like.
  • Better setting management! Also redone in Svelte, though it looks almost identical to the native UI. Difference now is that it behaves more nicely to setting changes and has a bit of styling/animations to them.
    • Various settings were renamed and redefined, so a new settings updater has been implemented to "migrate" settings if you had a previous version appropriately (or at least to the best of its ability; it's not too robust, but it can get the job done)
  • Banner height settings can now accept CSS length values (as well as just number values in pixels), so relative unit measurements like 25vh or 4em are now possible
  • Added settings for allowing banner drags within an internal file embed and the file preview popover (though the latter may act a bit finicky)
  • Added a setting for setting a banner's height for only mobile devices
  • Added a setting to adjust an icon's size
  • Removed the experimental mobile drag setting, since the gestures aren't working anymore as far as I've tested

Known issues (so far)

  • There are some scenarios where banners don't rerender properly within internal file embeds and require a restart. These include reloading the plugin, changing the frontmatter field or "show in internal embed" settings, and changing the filename
    • Still not quite sure what's going on here or how to fix it...
  • When displaying a linked view between Reading/Editing views of a note, scrolling on the Reading side causes the Editing side to "snap" across banners. Scrolling through internal file embeds with banners can also feel a bit "off"
    • Not sure if there's a solution for this one actually
  • Opening files in a new window within the Editing mode won't render the banner until a change is made. Still investigating a solution for this
  • Undos and redos do not have the latest banner data in the Editing view, causing desynced banner data to pass through until an additional change is done

1.3.3

20 Apr 20:20
Compare
Choose a tag to compare

Ya can't have an open-source project without a few hiccups

Just a small hotfix because I missed a thing, whoops

Fixed

  • Fix error log for files without frontmatter (#51, #54)

Changed

  • Updated README

Full Changelog: 1.3.2...1.3.3

1.3.2

14 Apr 21:36
Compare
Choose a tag to compare

Finally got a new computer!

For context, I've been using the same, hand-me-down 2013 Mac laptop for years, and it's so nice to not only get a much needed upgrade, but I can actually run stuff for once in this Windows computer! Also play Tunic & Kirby and the Forgotten Land. Very good games

Added

  • ⌨ Allow directly inputting emojis into the Emoji Icon modal (#43)

Fixed

  • 🛠 Copy static files (manifest.json & .hot-reload) while using the dev script
  • Fix Live Preview rerendering when changing settings
  • Fix banner drag state when changing the Banner drag modifier key setting
  • Fix banner placement in Live Preview for Obsidian 14.2+ (#44)
  • Fix misplaced YAML fold indicator (#42)
  • Fix parsing frontmatter when empty lines precede it (#47)
  • Skip unnecessary file writes when no changes were made to the frontmatter

Changed

  • Some code cleanup and whatnot
  • Readjust icon placements to be more consistent between modes and with variable font sizes

Full Changelog: 1.3.1...1.3.2

1.3.1

06 Mar 04:38
Compare
Choose a tag to compare

ESBuild you absolute son of a goat

i know it wasn't your fault, but dang, that threw me off guard

Fixed

  • Plugin should now run properly for versions below 0.13.24
    • I just find it funny that the public version right now was just one off from the fix with ESBuild, so just my luck
  • Also forgot to remove a console.log whoops

1.3.0

06 Mar 03:28
Compare
Choose a tag to compare

We're going live!

Though a tad belated...

Added

  • ✨ Add preliminary support for Live Preview (#19)
  • For icons that use regular emojis (non-Twemoji) or single letters, their positions have been adjusted.
    • Positioning in general is also more consistent and better placed between modes
  • Add Remove icon command
  • Add Lock/Unlock banner position command (#31)
    • A new banner_lock field is used to lock the banner position in place
  • Add Banner drag modifier key command (#31)
    • Alternatively to above, you can set a modifier key that must be used to drag the image, which can help avoid accidental banner movements
  • While running commands, close unfinished YAML sections if needed
  • When dragging a banner, it will now only add/update the appropriate drag position (banner_x or banner_y) instead of both
  • 🔧 Use ESBuild instead of Rollup for development, which is much faster and nicer
  • 🔧 Quite a bit of cleanup to organize things and makes things easier on myself
    • Especially for refactoring for live preview. That took a bit of moving around, ahah

Fixed

  • Banner images will no longer go past its boundaries when manually entering a horizontal or vertical positional value
    • For some reason, I never tested putting in like...10000 or something in there
  • Remove banner command now only removes banner-specific fields, in case you had set an icon for the file.
  • Fix Add/Change banner with local image command from showing no results when Banners folder is set to its default value (#33)
  • Fix lower part of the banner being uninteractable when an icon is present

Changed

  • When loading the plugin/opening a file, the banner source field will be pre-wrapped in quotes if it isn't already
    • This is to avoid parsing errors for Live Preview
  • Rename the Add/Change banner from clipboard command to Paste banner from clipboard
  • Paste banner from clipboard command now wraps link in quotes
    • I made the mistake of not doing this earlier, and thus why I have to do a precheck to pre-wrap the banner source field now, ay

Full Changelog: 1.2.2...1.3.0