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

Balsamiq Import creates blank frames #42

Open
justingeeslin opened this issue Jul 9, 2020 · 3 comments
Open

Balsamiq Import creates blank frames #42

justingeeslin opened this issue Jul 9, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@justingeeslin
Copy link
Member

There exists a case where importing a Balsamiq BMML file creates blank frames in CogTool.

Example BMML files

Frame 1

<mockup version="1.0" skin="sketch" fontFace="Balsamiq Sans" measuredW="328" measuredH="77" mockupW="278" mockupH="48">
  <controls>
    <control controlID="1" controlTypeID="com.balsamiq.mockups::TextInput" x="50" y="50" w="278" h="-1" measuredW="79" measuredH="27" zOrder="0" locked="false" isInGroup="-1"/>
    <control controlID="2" controlTypeID="com.balsamiq.mockups::Label" x="50" y="29" w="-1" h="-1" measuredW="61" measuredH="21" zOrder="1" locked="false" isInGroup="-1">
      <controlProperties>
        <href>Input%20and%20Label%20Warning%20Shown%26bm%3BInput%20and%20Label%20Warning%20Shown.bmml%26bm%3BInput%20and%20Label%20Warning%20Shown.bmml%26bm%3BInput%20and%20Label%20Warning%20Shown.bmml</href>
      </controlProperties>
    </control>
  </controls>
</mockup>

Frame 2

<mockup version="1.0" skin="sketch" fontFace="Balsamiq Sans" measuredW="392" measuredH="87" mockupW="342" mockupH="58">
  <controls>
    <control controlID="1" controlTypeID="com.balsamiq.mockups::TextInput" x="50" y="50" w="278" h="-1" measuredW="79" measuredH="27" zOrder="0" locked="false" isInGroup="-1"/>
    <control controlID="2" controlTypeID="com.balsamiq.mockups::Label" x="50" y="29" w="-1" h="-1" measuredW="61" measuredH="21" zOrder="1" locked="false" isInGroup="-1">
      <controlProperties>
        <href>Input%20and%20Label%26bm%3BInput%20and%20Label.bmml%26bm%3BInput%20and%20Label.bmml%26bm%3BInput%20and%20Label.bmml</href>
      </controlProperties>
    </control>
    <control controlID="3" controlTypeID="com.balsamiq.mockups::Icon" x="344" y="39" w="-1" h="-1" measuredW="48" measuredH="48" zOrder="2" locked="false" isInGroup="-1">
      <controlProperties>
        <icon>exclamation-triangle%7Clarge</icon>
      </controlProperties>
    </control>
  </controls>
</mockup>

Imported in to CogTool produces blank frames and the following empty CogTool XML

<?xml version="1.0" encoding="UTF-8"?>
<cogtoolimport version="1">
  <design name="JustinFun">
    <device>keyboard</device>
    <device>mouse</device>
    <frame name="Input and Label Warning Shown">
      <topLeftOrigin x="156.0" y="39.0"/>
    </frame>
    <frame name="Input and Label">
      <topLeftOrigin x="78.0" y="166.0"/>
    </frame>
  </design>
</cogtoolimport>

Expected

I expected that the frames in CogTool would contain the Label and the Text Input contained in both frames. The label in each frame contains a link to the opposite frame; I expected this link would also be replicated in CogTool.

@justingeeslin
Copy link
Member Author

The class that powers the Balsamiq import is named BalsamiqButtonAPIConverter; this may be a clue that only Buttons can be imported.

@justingeeslin
Copy link
Member Author

Links and buttons can be imported successfully, but not much else.

The BalsamiqButtonAPIConverter class lists other elements it is aware of, other than links and buttons...

	if ((widgetType == null)||
				widgetType.equalsIgnoreCase("com.balsamiq.mockups::Button"))
		{
			return BUTTON_WIDGETTYPE;
		}
		if (widgetType.equalsIgnoreCase("com.balsamiq.mockups::Link")) {
			return LINK_WIDGETTYPE;
		}
		if (widgetType.equalsIgnoreCase("com.balsamiq.mockups::CheckBox")) {
			return CHECKBOX_WIDGETTYPE;
		}
		if (widgetType.equalsIgnoreCase("com.balsamiq.mockups::RadioButton")) {
			return RADIO_WIDGETTYPE;
		}
		if (widgetType.equalsIgnoreCase("com.balsamiq.mockups::TextBox")) {
			return "text";
		}
		if (widgetType.equalsIgnoreCase("com.balsamiq.mockups::Breadcrumbs")) {
			return "breadcrumbs";
		}
		if (widgetType.equalsIgnoreCase("__group__")) {
			return "group";
		}

		if (widgetType.equalsIgnoreCase("com.balsamiq.mockups::LinkBar")) {
			return "linkbar";
		}

... but a quick tests reveals that only Buttons and Links are successfully imported into Cogtool frames.

Screen Shot 2020-07-08 at 10 40 57 PM

@justingeeslin
Copy link
Member Author

To be clear, the existing Balsamiq Import functionality only works on the previous Balsamiq Wireframe file format BMML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant