public inbox for [email protected]  
help / color / mirror / Atom feed
From: Joao Pedro De Almeida Pereira <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: Re: Pains and thoughts about refactoring the Tree Menu using React
Date: Fri, 21 Apr 2017 14:52:03 -0400
Message-ID: <CAE+jjamTfgb4wTQS7MdwMM5xQudzPXV_eZB4Z4AeW=MWmZExiQ@mail.gmail.com> (raw)
In-Reply-To: <CAE+jja=T2q9-6LPsnZuUs4q3YO8jvYB3eUOKhU=VUSsaW6RoPg@mail.gmail.com>
References: <CAE+jja=T2q9-6LPsnZuUs4q3YO8jvYB3eUOKhU=VUSsaW6RoPg@mail.gmail.com>
List-Unsubscribe:  <mailto:[email protected]?body=unsub%20pgadmin-hackers>

Hi Hackers,

The attachment was missing in the previous email, so there you go.

Note:
 We had to remove the extension of the file due to security reasons, just
add a .js

Thanks
Joao & Oliver

On Fri, Apr 21, 2017 at 2:47 PM, Joao Pedro De Almeida Pereira <
[email protected]> wrote:

> Hi Hackers,
>
> After a conversation with Dave we believe that we need to provide more
> context on our pains and what we propose as a first step for implementing
> the Tree Menu using React.
>
> The pain:
>
> Here is a quick description of what we think we understand and where we
> got stuck while doing our refactor.
>
> If you look at the above image, both the NodeJS and CollectionJS classes
> are templates. Our goal was to extract those from being templates so that
> we could test them. We started with the generate_url function. The issue we
> ran into was that the generate_url function is inherited by CollectionJS
> from NodeJS but then over writes some of the functionality that it
> inherits. In order to have one function that our react component would
> delegate to, we have to consolidate these two class methods. This turned
> out to be a non-trivial refactor due to the lack of tests/documentation.
>
> Our proposal:
>
>
> This diagram represents what we believe can be our first approach to
> updating the tree. We can create a very basic tree that only does tree
> stuff (Open Node, Close Nodes) and then delegates to other adapters to
> execute all the business logic functionality (Generate URLs to get the
> node, Right Click menu, …)
>
> Asks:
>
>    -
>
>    Are there any more operation that currently are being triggered by the
>    tree? If so we need to add them to the Adapter List.
>    -
>
>    Because we lack the context and knowledge of the current tree
>    implementation, we need your help to extract these methods from the places
>    they are currently in. We believe that a good place to start would be
>    writing tests for and implementing the generation of URLs used to fetch the
>    child nodes.
>
> Attached you can find an example of the JavaScript tests that we have been
> writing that can be applied to this extracted method.
>
>
> Thanks
>
> Rob, Oliver & Joao
>
>


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [application/octet-stream] node_url_generator_spec (2.0K, 3-node_url_generator_spec)
  download

view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: Pains and thoughts about refactoring the Tree Menu using React
  In-Reply-To: <CAE+jjamTfgb4wTQS7MdwMM5xQudzPXV_eZB4Z4AeW=MWmZExiQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox