Skip to content

imagesuggester elements not displayed correctly if bound property is empty #501

@Acenoid

Description

@Acenoid

Please fill out these Check-boxes

  • I checked for existing similar issues
  • I checked that the plugin is up to date
  • The issue persists with all other plugins and themes disabled

Plugin Version

1.3.1

This Issue Occurs on

  • Windows
  • Linux
  • macOS
  • Android
  • iOS

Debug Info

SYSTEM INFO:
	Obsidian version: v1.7.7
	Installer version: v1.4.13
	Operating system: Windows 10 Pro 10.0.19045
	Login status: not logged in
	Language: en
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: off
	Plugins installed: 1
	Plugins enabled: 1
		1: Meta Bind v1.3.1

RECOMMENDATIONS:
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Describe the Issue

  1. If the bound property does not contain an image the "change image" pencil-button is hard to find if showcase is used.
  2. The meta-bind element is completely invisible if showcase is not used and no image is in the bound property.
  3. If the bound property is completely empty , then the defaultValue option has no effect

Steps to Reproduce

In the metabind test vault add the plugin and open the image suggester page.
Add a property "test:" in the frontmatter

  1. is invisible
  2. is invisible and the default value is not shown
  3. Meta-bind-Code is shown and the change image pencil button has to be searched a bit and the default value is not shown.
replaced ´ with ~

# test 1 only optionquery
~~~meta-bind
INPUT[imageSuggester(optionQuery("Other/Images")):test]
~~~

# test 2 with defaultvalue
~~~meta-bind
INPUT[imageSuggester(optionQuery("Other/Images"), defaultValue( No image selected)):test]
~~~


# test 3 with showcase
~~~meta-bind
INPUT[imageSuggester(optionQuery("Other/Images"), showcase, defaultValue( No image selected)):test]
~~~

Result "reading" mode in test vault:

Image``

Expected Behavior

  1. The change image button should be easier to find and correctly positioned at top right - maybe not completely invisible?
  2. The defaultvalue should be shown if there is no matching image
  3. The code should not be shown unless there is an error
  4. Maybe, the whole image suggester element should be visible a bit better (box, colored distinction)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behavior caused by this plugin

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions