← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH/RFC] Pcbnew initial startup user experience

 

Only read through this quickly as I'm pretty busy, but it looks good to
me. There's another issue I've had in mind with the pcbnew OOBE: now
that I'm adding footprint preview to eeschema, the pcbnew init routines
happen on the first run of the eeschema component selector...

I was thinking about consolidating the whole thing into one big KiCad
init routine. Thoughts?

On Sun, Mar 05, 2017 at 07:01:03AM +0800, John Beard wrote:
> Hi,
> 
> Here is a (proposed) patchset to modify the "user experience" (to use
> a buzzword) of Pcbnew and cvPcb when the user loads it for the first
> time with no fp-library-table.
> 
> The current behaviour is quite unfriendly, as it doesn't get the user
> to consent to an action when initialising the library, it does one of
> two actions (cpopy default table, or create empty table - which one
> depends on various conditions) which means that users click the OK
> button not fully knowing what just happened.
> 
> Furthermore, if they click though that dialog without reading it, they
> will then be frustrated by the lack of libraries later, which
> manifests as an error or an empty footprint chooser. Bear in mind, as
> far as users are concerned, the libraries are installed (e.g.
> /usr/share/kicad has content), but as far as KiCad is concerned, they
> are not necessarily configured (empty or default fp-lib-table in
> user's home).
> 
> This has caused several people to struggle with getting started with
> KiCad, and people asking how to proceed is a semi-regular occurence on
> IRC.
> 
> This patch changes to the following process:
> 
> * If user fp-lib-table is found and it has at least one library,
> everything is normal
>   and the user isn't disturbed.
> * If fp-lib-table is missing:
>     * On Pcbnew/Cvpcb start, pop up a dialog saying this and giving
> these options:
>         * Quit - exit Pcbnew/cvPcb witohut attempting to create
> fp-lib-table. Users can then make their own arrangements.
>         * Copy default table - attempt to copy the default table. If
> this fails, return to the choice dialog.
>         * Create empty table - if this fails return to the dialog.
>     * In no case did the user get an fp-lib-table they didn't ask for.
>     * If a blank or default table is created, a second dialog appears,
> informing the user that the library table might need configuration.
> This provides three options:
>         * Cancel - user doesn't want to configure the table now, table
> is unchanged
>         * Open Manual - the manual referenced in the dialog message is
> opened so the user can read about library configuration
>         * Open FP Library Manager - go directly to the library
> manager, rather than expecting the user to cancel the dialog and find
> it themselves. The wizard is accessible from the manager dialog.
> * If fp-lib-table is found, but it's empty when the user goes to use
> it (e.g. on a keyword search for footprints), the
> Cancel/Manual/Manager dialog is shown again, but it's a warning rather
> than informational, as it was before.
> 
> The aim here is to ensure that the configuration is "management by
> consent" and that the user is:
> 
> * Not surprised by "secret" configuration behind the scenes
> * Informed of and consenting to specific actions
> * Guided though configuration with dialogs that give access to
> mentioned tools, rather than a block of text and an OK/Cancel button,
> after which they are on their own.
> 
> Technically speaking, this is done by moving the global fp-lib-table
> loading into common, and invoking it only when the frame is shown
> (rather than prior to the kiface load). The reason for this is so that
> the followup dialog can access the manager. Also, it reduces special
> casing before kiface load.
> 
> The on-show invocation is done by a small class subscribed to the
> frame's wx "Show" event, and once the event is received, the class
> unsubscribes itself (so it's a one-shot), and executes a lits of
> startup actions. The class is such that you can add multiple startup
> actions, any of which can "veto" startup if needed.
> 
> Sorry for the long email: the change is not really that complex, but
> the configuration process has several paths. As the first thing a new
> user to Pcbnew sees, I think this is a fairly important thing to get
> right.
> 
> Cheers,
> 
> John



References