evolus / pencil

The Pencil Project's unique mission is to build a free and opensource tool for making diagrams and GUI prototyping that everyone can use.
http://pencil.evolus.vn
GNU General Public License v2.0
9.03k stars 715 forks source link

Load developer stencil directory dosn't work #758

Open spider4216 opened 1 year ago

spider4216 commented 1 year ago

Hi there! First of all I want to say thank you for great tool for make GUI prototypes! I use it quite long and it's very helpful for my projects! Recently I decided to create collection for prototyping GUI int the first time but faced with problem

According to manual Pencil provides a convenient way to load and reload stencil collection that is under development via "Load developer stencil directory" feature but it doesn't work for my project.

I created directory structure:

- icons/
- - - - Header-Purple.png
- Definition.xml 

My xml contains:

<Shapes xmlns="http://www.evolus.vn/Namespace/Pencil"
    xmlns:p="http://www.evolus.vn/Namespace/Pencil"
    xmlns:svg="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    id="ysirotenko-pencil-collection-1"
    displayName="KaIOS Components"
    description="Components for design apps for mobile operation system KaiOS"
    author="Yuriy Sirotenko"
    url="https://ysirotenko.com">
<!--Your shapes go here -->

    <Shape id="header" displayName="Header" icon="icons/Header-Purple.png">
        <p:Content xmlns:p="http://www.evolus.vn/Namespace/Pencil" xmlns="http://www.w3.org/2000/svg">
            <path id="path" fill="none" style="stroke-linejoin: round;"/>
        </p:Content>
    </Shape>

</Shapes>

Then I specified directory where my "Definition.xml" was placed via "Load developer stencil directory" feature

image

but there isn't any my collection in panel:

image

I pressed "F5", and saw popup with message "Developer collections were reloaded" but didn't see my collection

But when I zip this directory and install it from file, it's okay

image image

Actually, when I clicked "Load developer stencil directory" menu's item, error was appeared in log:

[251447:0117/084430.342128:ERROR:browser_main_loop.cc(269)] Gtk: gtk_file_chooser_widget_set_current_name: assertion 'priv->action == GTK_FILE_CHOOSER_ACTION_SAVE || priv->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER' failed

But everything is ok in Pencil GUI

Did I do something wrong? Thank you!

Pencil was installed via source (npm install and npm start)

donPablo2 commented 1 year ago

Tools/DeveloperTools/LoadDeveloperStencilDirectory…/ gives popup titles Select Developer Stencil ‘Definition.xml’ file In menu it sez Directory, but on popup it sez File. Also, in popup the filter allows only for Definition.xml(*.xml)

After I select my Definition.xml and press “Open”, I do not see my new shape in any menu listing.

Windows Edition: Windows 10 Pro Version 21H2 OS build 19044.2486 Pencil version: 3.1.1

rozek commented 1 year ago

I just encountered the same problem: on my Mac, I cannot even open the directory but always have to select a file - which seems to be wrong according to the docs

[Edit] the compressed stencil directory could be loaded without problems - it's just not a "developer stencil" collection...

spider4216 commented 1 year ago

I'm creating new stencil and have to build zip every time to see changes. It take too much time for developing...

donPablo2 commented 1 year ago

yes, building a zip takes time. Last week I discovered a "loophole" !! the myQuad folder does not need to be ZIP-ed; just rename with suffix .zip

I can open the Definition in notepad++, do edits, and save (not exit) and then test via click taskbar Pencil.exe icon (or click VSCode icon & F5) and quit Pencil, come back and do more edits, save, test, etc.

``C:\Users\myUSERID\.pencil\stencils > tree    /f
 └───myQuad.zip
    │     Definition.xml
    └───Icons
          plain-text.png